Skip to content

Commit

Permalink
Fix Markdown in article about camera in Ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
torrocus committed Sep 23, 2024
1 parent fac7852 commit c089abb
Showing 1 changed file with 76 additions and 70 deletions.
146 changes: 76 additions & 70 deletions _posts/2024-09-23-problem-with-camera-in-ubuntu.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ ls: cannot access '/dev/video*': No such file or directory

On my laptop, the same command looks like this:

```
```console
$ sudo ls -l /dev/video*
crw-rw----+ 1 root video 81, 0 /dev/video0
crw-rw----+ 1 root video 81, 1 /dev/video1
Expand All @@ -58,8 +58,8 @@ which groups your user is directly assigned to.

If needed, you can add your user to the `video` group:

```
$ sudo usermod -aG video $USER
```console
sudo usermod -aG video $USER
```

Ubuntu has tools to manage video from the command line.
Expand Down Expand Up @@ -93,47 +93,49 @@ Cannot open device /dev/video0, exiting.

For comparison, I ran the same command on my laptop:

<!-- markdownlint-disable MD013 -->
```console
$ sudo v4l2-ctl --list-devices -D
USB2.0 HD UVC WebCam: USB2.0 HD (usb-0000:00:14.0-5):
/dev/video0
/dev/video1
/dev/media0
/dev/video0
/dev/video1
/dev/media0

Driver Info:
Driver name : uvcvideo
Card type : USB2.0 HD UVC WebCam: USB2.0 HD
Bus info : usb-0000:00:14.0-5
Driver version : 6.8.12
Capabilities : 0x84a00001
Video Capture
Metadata Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format
Driver name : uvcvideo
Card type : USB2.0 HD UVC WebCam: USB2.0 HD
Bus info : usb-0000:00:14.0-5
Driver version : 6.8.12
Capabilities : 0x84a00001
Video Capture
Metadata Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format
Media Driver Info:
Driver name : uvcvideo
Model : USB2.0 HD UVC WebCam: USB2.0 HD
Serial : 0x0001
Bus info : usb-0000:00:14.0-5
Media version : 6.8.12
Hardware revision: 0x00005828 (22568)
Driver version : 6.8.12
Driver name : uvcvideo
Model : USB2.0 HD UVC WebCam: USB2.0 HD
Serial : 0x0001
Bus info : usb-0000:00:14.0-5
Media version : 6.8.12
Hardware revision: 0x00005828 (22568)
Driver version : 6.8.12
Interface Info:
ID : 0x03000002
Type : V4L Video
ID : 0x03000002
Type : V4L Video
Entity Info:
ID : 0x00000001 (1)
Name : USB2.0 HD UVC WebCam: USB2.0 HD
Function : V4L2 I/O
Flags : default
Pad 0x01000007 : 0: Sink
Link 0x02000010: from remote pad 0x100000a of entity 'Extension 4' (Video Pixel Formatter): Data, Enabled, Immutable
ID : 0x00000001 (1)
Name : USB2.0 HD UVC WebCam: USB2.0 HD
Function : V4L2 I/O
Flags : default
Pad 0x01000007 : 0: Sink
Link 0x02000010: from remote pad 0x100000a of entity 'Extension 4' (Video Pixel Formatter): Data, Enabled, Immutable
```
<!-- markdownlint-enable MD013 -->

The system is up to date.
The laptop is not damaged.
Expand All @@ -152,50 +154,52 @@ crw-rw----+ 1 root video 81, 2 /dev/video2
crw-rw----+ 1 root video 81, 3 /dev/video3
```

<!-- markdownlint-disable MD013 -->
```console
$ sudo v4l2-ctl --list-devices -D
Chicony USB2.0 Camera: Chicony (usb-0000:00:14.0-7):
/dev/video0
/dev/video1
/dev/video2
/dev/video3
/dev/media0
/dev/media1
/dev/video0
/dev/video1
/dev/video2
/dev/video3
/dev/media0
/dev/media1

Driver Info:
Driver name : uvcvideo
Card type : Chicony USB2.0 Camera: Chicony
Bus info : usb-0000:00:14.0-7
Driver version : 6.2.16
Capabilities : 0x84a00001
Video Capture
Metadata Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format
Driver name : uvcvideo
Card type : Chicony USB2.0 Camera: Chicony
Bus info : usb-0000:00:14.0-7
Driver version : 6.2.16
Capabilities : 0x84a00001
Video Capture
Metadata Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format
Media Driver Info:
Driver name : uvcvideo
Model : Chicony USB2.0 Camera: Chicony
Serial : 01.00.00
Bus info : usb-0000:00:14.0-7
Media version : 6.2.16
Hardware revision: 0x00000002 (2)
Driver version : 6.2.16
Driver name : uvcvideo
Model : Chicony USB2.0 Camera: Chicony
Serial : 01.00.00
Bus info : usb-0000:00:14.0-7
Media version : 6.2.16
Hardware revision: 0x00000002 (2)
Driver version : 6.2.16
Interface Info:
ID : 0x03000002
Type : V4L Video
ID : 0x03000002
Type : V4L Video
Entity Info:
ID : 0x00000001 (1)
Name : Chicony USB2.0 Camera: Chicony
Function : V4L2 I/O
Flags : default
Pad 0x01000007 : 0: Sink
Link 0x02000013: from remote pad 0x100000a of entity 'Extension 4' (Video Pixel Formatter): Data, Enabled, Immutable
ID : 0x00000001 (1)
Name : Chicony USB2.0 Camera: Chicony
Function : V4L2 I/O
Flags : default
Pad 0x01000007 : 0: Sink
Link 0x02000013: from remote pad 0x100000a of entity 'Extension 4' (Video Pixel Formatter): Data, Enabled, Immutable
```
<!-- markdownlint-enable MD013 -->

It looks like a **restart** did the trick.
The cause of the issue is unknown,
Expand All @@ -207,12 +211,14 @@ or `journalctl -xe` might provide more insight.

So far I don't see anything disturbing:

<!-- markdownlint-disable MD013 -->
```console
$ sudo dmesg | grep video
[ 3.097705] videodev: Linux video capture interface: v2.00
[ 3.211353] usbcore: registered new interface driver uvcvideo
[ 4.791222] ACPI: video: Video Device [GFX0] (multi-head: yes rom: no post: no)
```
<!-- markdownlint-enable MD013 -->

However, deeper research allowed me to better understand
the possible causes of the problems.
Expand Down

0 comments on commit c089abb

Please sign in to comment.