The webcam doesn't work

xaleks

New Member
Joined
Apr 8, 2022
Messages
8
Reaction score
1
Credits
79
Ubuntu 20.04, kernel 5.13.0-39-generic
Some time ago the built-in camera stopped working.
Does anyone know how to solve this problem?
I would be glad for any help.
I see the following messages in the logs when I check with cheese

Apr 8 17:47:35 aleks-ASUS /usr/lib/gdm3/gdm-x-session[1624]: (**) USB2.0 HD UVC WebCam: USB2.0 HD: Applying InputClass "libinput keyboard catchall"
Apr 8 17:47:35 aleks-ASUS /usr/lib/gdm3/gdm-x-session[1624]: (II) Using input driver 'libinput' for 'USB2.0 HD UVC WebCam: USB2.0 HD'
Apr 8 17:47:35 aleks-ASUS mtp-probe: checking bus 1, device 8: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-6"
Apr 8 17:47:35 aleks-ASUS mtp-probe: bus: 1, device: 8 was not an MTP device
Apr 8 17:47:35 aleks-ASUS /usr/lib/gdm3/gdm-x-session[1624]: (II) systemd-logind: got fd for /dev/input/event9 13:73 fd 96 paused 0
Apr 8 17:47:35 aleks-ASUS /usr/lib/gdm3/gdm-x-session[1624]: (**) USB2.0 HD UVC WebCam: USB2.0 HD: always reports core events
Apr 8 17:47:35 aleks-ASUS /usr/lib/gdm3/gdm-x-session[1624]: (**) Option "Device" "/dev/input/event9"
Apr 8 17:47:35 aleks-ASUS /usr/lib/gdm3/gdm-x-session[1624]: (**) Option "_source" "server/udev"
Apr 8 17:47:35 aleks-ASUS /usr/lib/gdm3/gdm-x-session[1624]: (II) event9 - USB2.0 HD UVC WebCam: USB2.0 HD: is tagged by udev as: Keyboard
Apr 8 17:47:35 aleks-ASUS /usr/lib/gdm3/gdm-x-session[1624]: (II) event9 - USB2.0 HD UVC WebCam: USB2.0 HD: device is a keyboard
Apr 8 17:47:35 aleks-ASUS /usr/lib/gdm3/gdm-x-session[1624]: (II) event9 - USB2.0 HD UVC WebCam: USB2.0 HD: device removed
Apr 8 17:47:35 aleks-ASUS /usr/lib/gdm3/gdm-x-session[1624]: (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/input/input27/event9"
Apr 8 17:47:35 aleks-ASUS /usr/lib/gdm3/gdm-x-session[1624]: (II) XINPUT: Adding extended input device "USB2.0 HD UVC WebCam: USB2.0 HD" (type: KEYBOARD, id 13)
Apr 8 17:47:35 aleks-ASUS /usr/lib/gdm3/gdm-x-session[1624]: (**) Option "xkb_variant" ",,"
Apr 8 17:47:35 aleks-ASUS /usr/lib/gdm3/gdm-x-session[1624]: (II) event9 - USB2.0 HD UVC WebCam: USB2.0 HD: is tagged by udev as: Keyboard
Apr 8 17:47:35 aleks-ASUS /usr/lib/gdm3/gdm-x-session[1624]: (II) event9 - USB2.0 HD UVC WebCam: USB2.0 HD: device is a keyboard```
 


Brickwizard

Well-Known Member
Joined
Apr 28, 2021
Messages
2,818
Reaction score
1,839
Credits
21,045
Welcome to the forums
Do you have cheese installed ?
 

Lord Boltar

Well-Known Member
Joined
Nov 24, 2020
Messages
1,794
Reaction score
1,205
Credits
13,361

Alexzee

Well-Known Member
Joined
Jun 1, 2019
Messages
2,323
Reaction score
1,127
Credits
12,107
Maybe give OBS a spin. It works great for me on my Vaio with a built in camera.
 
OP
X

xaleks

New Member
Joined
Apr 8, 2022
Messages
8
Reaction score
1
Credits
79
OP
X

xaleks

New Member
Joined
Apr 8, 2022
Messages
8
Reaction score
1
Credits
79
Maybe give OBS a spin. It works great for me on my Vaio with a built in camera.
No, the problem is not the cheese itself. camera not working in other apps
 

Lord Boltar

Well-Known Member
Joined
Nov 24, 2020
Messages
1,794
Reaction score
1,205
Credits
13,361
you will most likely need to install v4l-utils
Code:
sudo apt install v4l-utils
once the above is installed What is the output of
Code:
v4l2-ctl --list-devices
you should have an output similar to
USB2.0 PC CAMERA (usb-0000:00:1d.7-1):
/dev/video1
Also what is the output of
Code:
xinput --list

last thing - make sure ffmpeg is installed you can do that through the Synaptic Package Manager in the search block type in ffmpeg
 
Last edited:
OP
X

xaleks

New Member
Joined
Apr 8, 2022
Messages
8
Reaction score
1
Credits
79
you will most likely need to install v4l-utils
Code:
sudo apt install v4l-utils
once the above is installed What is the output of
Code:
v4l2-ctl --list-devices
you should have an output similar to
USB2.0 PC CAMERA (usb-0000:00:1d.7-1):
/dev/video1
Also what is the output of
Code:
xinput --list

last thing - make sure ffmpeg is installed you can do that through the Synaptic Package Manager in the search block type in ffmpeg
here is the command output

$ v4l2-ctl --list-devices
USB2.0 HD UVC WebCam: USB2.0 HD (usb-0000:00:14.0-6):
/dev/video0
/dev/video1

$ xinput --list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ ELAN1300:00 04F3:3087 Mouse id=11 [slave pointer (2)]
⎜ ↳ ELAN1300:00 04F3:3087 Touchpad id=12 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Video Bus id=8 [slave keyboard (3)]
↳ Power Button id=9 [slave keyboard (3)]
↳ Asus WMI hotkeys id=13 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=14 [slave keyboard (3)]
↳ USB2.0 HD UVC WebCam: USB2.0 HD id=10 [slave keyboard (3)]


$
ffmpeg version 4.2.4-1ubuntu0.1 Copyright (c) 2000-2020 the FFmpeg developers

but I don't know what to do with it
 

Lord Boltar

Well-Known Member
Joined
Nov 24, 2020
Messages
1,794
Reaction score
1,205
Credits
13,361
Your device is detected - your USB Cam is using two video slots
/dev/video0
/dev/video1
one of them is the "Real cam" the other is most likely metadata - you will have to select the real cam most likely /dev/video0
So we are going to try to view your cam in VLC Media Player
Click Media then Open Capture Device then click tab Capture Device under Capture Mode select Video Camera - under Video Device name select /dev/video0 next under Video standard For example, if you have an NTSC webcam, it’s best to set the video options to that, and not change it. Or, if you’re unsure about the video standard of the webcam, feel free to set it to “Undefined.” This option should allow VLC to tune the camera automatically.
Now click the play button
Do you see the Video? If not - do the same thing except select /dev/video1
Note: the webcam broadcast in VLC may be a bit lagging, as VLC is a media player and not a full-fledged webcam utility
 
Last edited:
OP
X

xaleks

New Member
Joined
Apr 8, 2022
Messages
8
Reaction score
1
Credits
79
Your device is detected - your USB Cam is using two video slots
/dev/video0
/dev/video1
one of them is the "Real cam" the other is most likely metadata - you will have to select the real cam most likely /dev/video0
So we are going to try to view your cam in VLC Media Player
Click Media then Open Capture Device then click tab Capture Device under Capture Mode select Video Camera - under Video Device name select /dev/video0 next under Video standard For example, if you have an NTSC webcam, it’s best to set the video options to that, and not change it. Or, if you’re unsure about the video standard of the webcam, feel free to set it to “Undefined.” This option should allow VLC to tune the camera automatically.
Now click the play button
Do you see the Video? If not - do the same thing except select /dev/video1
Note: the webcam broadcast in VLC may be a bit lagging, as VLC is a media player and not a full-fledged webcam utility
unfortunately this doesn't work for me.
when choosing one and the other device I get errors

Your input can't be opened:
VLC is unable to open the MRL 'v4l2:///dev/video0'. Check the log for details.
Your input can't be opened:
VLC is unable to open the MRL 'v4l2:///dev/video1'. Check the log for details.
 

Lord Boltar

Well-Known Member
Joined
Nov 24, 2020
Messages
1,794
Reaction score
1,205
Credits
13,361
You may need to add yourself to the video user group
Code:
sudo usermod -a -G video LOGNAME
Where LOGNAME is your login name
example: sudo usermod -a -G video xaleks
Reboot and try again
 
Last edited:
OP
X

xaleks

New Member
Joined
Apr 8, 2022
Messages
8
Reaction score
1
Credits
79
You may need to add yourself to the video user group
Code:
sudo usermod -a -G video LOGNAME
Where LOGNAME is your login name
Reboot and try again
I have Windows installed on this laptop. and in this operating system the camera works. so I can conclude that the camera is fine.
 
OP
X

xaleks

New Member
Joined
Apr 8, 2022
Messages
8
Reaction score
1
Credits
79
It's weird, but after installing the updates in windows (probably after that, I'm not sure) the camera worked again.
Thank you all for participating and trying to help.
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Linux.org Hosting Donations
Consider making a donation

Members online


Top