Webcam not working on Ubuntu 20.04 after recent kernel update

20,745

Solution 1

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

Solution 2

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!!

Share:
20,745
Afsal
Author by

Afsal

An Opensuse Tumbleweedian who entered in to the linux world through Ubuntu :) xD :}

Updated on September 18, 2022

Comments

  • Afsal
    Afsal almost 2 years

    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
    
    • Admin
      Admin about 4 years
      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.
    • Admin
      Admin about 4 years
      @walttheboss question updated with ouput of sudo lshw .
    • Admin
      Admin about 4 years
      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?
    • Admin
      Admin about 4 years
      @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 .
    • Admin
      Admin about 4 years
      @guiverc i thought 5.0 was supported in 19.04 . And my webcam is not getting detected with latest mainline kernel .
    • Admin
      Admin about 4 years
      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? help.ubuntu.com/community/ReportingBugs
    • Admin
      Admin about 4 years
      How can i install older 5.4 kernel ?
    • Admin
      Admin about 4 years
      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).
    • Admin
      Admin about 4 years
      @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?
    • Admin
      Admin about 4 years
      apt-cache search linux-image-5.4 should show what kernels are available with your current sources...
    • Admin
      Admin about 4 years
      @guiverc is there any way to know which kernel version i was using on 22 April when webcam was working just fine ?
    • Admin
      Admin about 4 years
      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
    • Admin
      Admin about 4 years
      @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
    • Admin
      Admin about 4 years
      @guiverc issue solved by updating kernel to 5.6.15 . seems that this issue is only present on 5.4.0.3x series .
    • Admin
      Admin about 2 years
      try checking the hardware user privileges in User and Groups administration
  • XavierStuvw
    XavierStuvw over 3 years
    For the records, the issue returns with newer kernel versions. The Launchpad link shared by Afsal mentions this is the case again with 5.4.0-52. I have been experiencing this problem with 5.4.0-54
  • michid
    michid over 3 years
    Still broken on 5.4.0-65
  • Windstorm1981
    Windstorm1981 about 3 years
    Broken 5.8.0-50
  • ubuntuUssser
    ubuntuUssser almost 3 years
    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
    ubuntuUssser almost 3 years
    For me the fix was: askubuntu.com/a/1322287/877575 an issue with permission after a very recent kernel update (August 2021)
  • RocketSEA
    RocketSEA almost 3 years
    This also fixed my webcam issue.
  • RocketSEA
    RocketSEA almost 3 years
    ^ Same. Not sure this should be an accepted answer over the one by Neeraj, as it fixed it for me.
  • gyohza
    gyohza over 2 years
    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.).
  • Buelent
    Buelent over 2 years
    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.