14

My builtin webcam stopped working after a kernel update issued after 22 April 2020 . Before this date i was able to take pictures on cheese and video call etc , and for a while i didn't use my webcam until yesterday i noticed that my webcam is getting detected as "usb 2.0 web camera" but its not working at all . Cheese shows a black screen when opened and Firefox asks for permission and then nothing happens . So i changed the kernel to version 5.0 and webcam started working properly . But i need to work it on the latest Ubuntu kernel . Any help will be thankful .

output of sudo lshw:

*-usb:1
    description: Video
    product: USB 2.0 Web Camera
    vendor: Alcor Micro, Corp.
    physical id: 2
    bus info: usb@1:1.2
    version: 0.08
    capabilities: usb-2.00
    configuration: driver=uvcvideo maxpower=200mA speed=480Mbit/s
Afsal
  • 902
  • 3
  • 9
  • 21
  • 1
    If you are sure it is a kernel then you either have to wait or use the old kernel. Just guessing maybe you can install a snap of cheese and see is that see the webcam. You can try lsusb to see if the device is there and given a number. You can sudo lshw and see if the hardware profile(name and model) of the webcam come up correctly. You can go to additional hardware drivers and see if there is something there. – walttheboss May 30 '20 at 02:29
  • @walttheboss question updated with ouput of sudo lshw . – Afsal May 30 '20 at 02:37
  • If you're on 20.04, why did you revert to kernel 5.0? It was never supported by Ubuntu/Canonical (testing only) and is now EOL, rather than a prior 5.4 kernel already on your system./ Are you using Ubuntu 20.04? – guiverc May 30 '20 at 02:55
  • @guiverc im on Ubuntu 20.04 . Any kernel released after 5.2 and before 5.6 slows down my system . And the only kernel version which is working good in this range is the default kernel in Ubuntu 20.04 .Other 5.4 , 5.3 versions from kernels.ubuntu lags very much . – Afsal May 30 '20 at 02:59
  • @guiverc i thought 5.0 was supported in 19.04 . And my webcam is not getting detected with latest mainline kernel . – Afsal May 30 '20 at 03:02
  • Sorry yes kernel 5.0 was in 19.04 (my mistake), however 19.04 is EOL, and your description has it working before the update, so why not use that older 5.4 kernel & report a bug (regression) on launchpad? https://help.ubuntu.com/community/ReportingBugs – guiverc May 30 '20 at 03:16
  • How can i install older 5.4 kernel ? – Afsal May 30 '20 at 03:20
  • The system should have had at least two older kernels (so you could select them at grub) should problems have been detected on upgrades, allowing you to try them, prove it was an upgrade issue, report & apt-mark (hold) them until you had more details on your issue & can make a better plan. You shouldn't need to install any (unless you removed them). – guiverc May 30 '20 at 03:31
  • @guiverc okey , i found kernel 5.4.0-31-generic from grub menu . But camera is not working with this version . how can i try another prev kernel such as 5.4.0-29-generic? – Afsal May 30 '20 at 03:58
  • apt-cache search linux-image-5.4 should show what kernels are available with your current sources... – guiverc May 30 '20 at 04:14
  • @guiverc is there any way to know which kernel version i was using on 22 April when webcam was working just fine ? – Afsal May 30 '20 at 04:20
  • I would likely look in systemd logs (journalctl) for clues on when you rebooted, kernel in use etc, or in apt logs (/var/log/apt/history.log for example) for when upgrades/packages were installed for clues.. Command history will tell you when/what you executed (by default this doesn't record date/time but it's commonly added to improve logs) etc – guiverc May 30 '20 at 04:51
  • @guiverc installed linux-image-5.4.0-28-generic and linux-image-5.4.0-29-generic , both failed to boot and reached initramfs . i gave up – Afsal May 30 '20 at 05:16
  • @guiverc issue solved by updating kernel to 5.6.15 . seems that this issue is only present on 5.4.0.3x series . – Afsal May 31 '20 at 15:02
  • try checking the hardware user privileges in User and Groups administration – cabpacedilla May 07 '22 at 06:35

4 Answers4

5

For me there was permission issue.

The group and permissions for your /dev/video* files were icorrect. The group root for your /dev/video* will deny access to the camera for users outside this group.

The output of ls -l /dev/video0 should look like this:

crw-rw----+ 1 root video 81, 1 Apr 19 22:25 /dev/video0
crw-rw----+ 1 root video 81, 1 Apr 19 22:25 /dev/video1

Try fixing the group by running:

sudo chown root:video /dev/video*

Then fix permissions by running:

sudo chmod 666 /dev/video*

It worked!!

akond
  • 103
  • 5
  • For me this fixed the issue. Note that as in the previous question, it seems a very recent kernel update causes problems with permisions and that's what broke the thing. – ubuntuUssser Aug 02 '21 at 01:56
  • This also fixed my webcam issue. – Rocket Sep 23 '21 at 22:35
  • 1
    If it worked for you, please upvote the answer so it has more visibility. It didn't fix it for me, though. My whole OS (Kubuntu 20.04) just turns completely unresponsive, despite seeming to remain operational (music keeps playing, mic/headset keep working during conference, etc.). – gyohza Nov 08 '21 at 19:10
  • have suddenly the same issue, tried all given suggestions... none worked

    sudo chown root: video /dev/video* produces "chown: Zugriff auf '/dev/video*' nicht möglich: Datei oder Verzeichnis nicht gefunden"

    B.

    – Buelent Jan 18 '22 at 07:53
  • Works for 5.13.0-51-generic as well. Thanks – Bhupesh Varshney Jul 18 '22 at 08:04
  • Mine shows "ls -l /dev/video* crw-rw----+ 1 root video 81, 0 Feb 6 15:19 /dev/video0 crw-rw----+ 1 root video 81, 1 Feb 6 15:19 /dev/video1". Not sure why you have two 1's. – CoderGuy123 Feb 06 '24 at 14:23
3

issue got solved with kernel 5.4.0-37-generic . https://bugs.launchpad.net/ubuntu/+source/linux-signed/+bug/1881757

Afsal
  • 902
  • 3
  • 9
  • 21
2

The solution for me is to use my laptop's webcam toggle button to turn it off and back on. On my keyboard, the toggle is Fn+F6.

crypdick
  • 389
  • 1
  • 5
  • 14
0

In my case I don't know what the issue was but:

  1. Go to BIOS and disable the cam.
  2. Restart.
  3. Go to BIOS and enable back the camera.

This helped me.

skrat
  • 145