1

My webcam is not working. On Windows 10 it works fine, no problems. lsusb shows no webcam. Cheese says there is an error.

I am running Ubuntu 20.04 LTS. I am new to Ubuntu so my webcam has never worked, as far as I know.

EDIT: This is a laptop, model ThinkPad X1 Tablet G2. It is an integrated webcam.

Output of ls -lah /dev/video*:

crw-rw----+ 1 root video 81,  0 nov.   1 21:00 /dev/video0
crw-rw----+ 1 root video 81,  1 nov.   1 21:00 /dev/video1
crw-rw----+ 1 root video 81, 14 nov.   1 21:00 /dev/video10
crw-rw----+ 1 root video 81, 15 nov.   1 21:00 /dev/video11
crw-rw----+ 1 root video 81, 16 nov.   1 21:00 /dev/video12
crw-rw----+ 1 root video 81, 17 nov.   1 21:00 /dev/video13
crw-rw----+ 1 root video 81,  2 nov.   1 21:00 /dev/video2
crw-rw----+ 1 root video 81,  3 nov.   1 21:00 /dev/video3
crw-rw----+ 1 root video 81,  8 nov.   1 21:00 /dev/video4
crw-rw----+ 1 root video 81,  9 nov.   1 21:00 /dev/video5
crw-rw----+ 1 root video 81, 10 nov.   1 21:00 /dev/video6
crw-rw----+ 1 root video 81, 11 nov.   1 21:00 /dev/video7
crw-rw----+ 1 root video 81, 12 nov.   1 21:00 /dev/video8
crw-rw----+ 1 root video 81, 13 nov.   1 21:00 /dev/video9

Output of lsusb:

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 8087:0a2b Intel Corp. 
Bus 001 Device 004: ID 17ef:60a3 Lenovo ThinkPad X1 Tablet Thin Keyboard Gen 2
Bus 001 Device 003: ID 046d:c52f Logitech, Inc. Unifying Receiver
Bus 001 Device 002: ID 1199:9079 Sierra Wireless, Inc. Sierra Wireless EM7455 Qualcomm Snapdragon X7 LTE-A
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Thanks a lot!

5
  • 1
    Please edit your question to include the model of the webcam. Also, and I realize this may seem silly... is the webcam plugged in all the way? Also, edit your question to include the output of ls -lah /dev/video*
    – cocomac
    Nov 1, 2021 at 19:51
  • Thanks for including the webcam model! Can you also include the output of typing ls -lah /dev/video* into a terminal and pressing enter? Thanks! This will make it easier for us to solve your issue
    – cocomac
    Nov 1, 2021 at 19:58
  • 1
    @cocomac done! Sorry for the lack of information!
    – Knut
    Nov 1, 2021 at 20:04
  • What error does cheese show? Also, have you tried guvcview?
    – mchid
    Nov 1, 2021 at 20:20
  • 1
    @mchid guvcview says "no video device found" - but says I have video drivers installed... but none of the ones seem to work. imgur.com/a/ycgdmFq
    – Knut
    Nov 1, 2021 at 20:38

1 Answer 1

1

Many device access problems can be resolved through group membership changes.

Specifically, since ls -l shows that the group permissions (the second "rwx" triplet) is "rw" (e.g."-rw-rw----"), then, adding oneself to the group that owns the device will grant rw access.

Here's how:

device="/dev/video0"
sudo adduser $USER $(stat -c "%G" $device)

This allows you membership in the group that can rw the device, but there is one more step.

To make all your processes members of the new group, logout and login. Group memberships are set up at login time.

To create a single process in the new group (for testing, prior to logout/login):

newgrp $(stat -c "%G" $device)  

or, just type the group name. See man newgrp.

4
  • device="/dev/video" sudo adduser $USER $(stat -c "%G" $device) what do you mean with this? I write it in the terminal and I get that stat: cannot stat '/dev/video': No such file or directory. This is probably just a beginner error, got no idea what that means.
    – Knut
    Nov 1, 2021 at 21:39
  • Sorry, typo, fixed Use device="/dev/video0". Read man adduser stat sudo bash.
    – waltinator
    Nov 1, 2021 at 22:38
  • Please click the checkmark to "accept" my answer, if it solved your problem, and might help others.
    – waltinator
    Nov 2, 2021 at 2:23
  • 1
    Sadly it didn't work. I added myself to the group "video" like you said... but camera still doesn't work. Even after a restart.
    – Knut
    Nov 2, 2021 at 8:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .