1

In Ubuntu 18.04, the integrated webcam stops working after a while: blank screen in all the applications (gucview, cheese, etc.). I have no idea what causes it or how to solve it.

When I do guvcview -d /dev/video0 The result is:

V4L2_CORE: Could not grab image (select timeout): Resource temporarily unavailable

when I try another driver, and do mplayer -cache 128 -tv driver=v4l2:width=640:height=480 -vo xv tv://

The results is:

Error while decoding frame!
v4l2: select timeout
[mjpeg @ 0x7f01c899a920]No JPEG data found in image

The weird thing is that right after reboot, the video works. After a while, it doesn't, and it's impossible to understand what disables it. fuser /dev/video0 doesn't show any usage.

sudo lsof -n | grep video Shows everything apparently normal:

Output information may be incomplete.
goa-daemo  1375                 username  mem       REG              259,2    623848    3282429 /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.1405.0
gmain      1375  1382           username  mem       REG              259,2    623848    3282429 /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.1405.0
gdbus      1375  1384           username  mem       REG              259,2    623848    3282429 /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.1405.0
dconf\x20  1375  1385           username  mem       REG              259,2    623848    3282429 /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.1405.0

Switching off and on again doesn't solve anything:

sudo modprobe -r uvcvideo
sudo modprobe uvcvideo

Any idea to at least understand what disables the internal webcam?

Zanna
  • 72,312

2 Answers2

1

I've been having the same problem myself in Ubuntu 20.04, and while I'm writing this as an answer to try and help find a solution, I really have nothing more than a poor workaround.

In my case the "webcam" is a USB UVC capture device (I've tried two different types though and neither exhibits this behaviour on Windows).

I have found that the camera works for exactly one capture session then stops working until the device is reset. To reproduce:

  • Boot PC
  • Open cheese (video works)
  • Close cheese
  • Open cheese (video output is black)
  • Close cheese
  • Disconnect and reconnect webcam
  • Open cheese (video works)

This is somewhat problematic for apps like Skype, which apparently stop and start reading from the webcam before starting a call, so the result it's always black.

Things I've tried/checked so far that have not helped:

  • 5.6 kernel
  • permissions on /dev/video (made user a member of the video group, have not tried root)

No relevant errors are logged that I can see.

What has helped is a script to hard-reset the USB device (I found usbreset.cc to be the best method), which achieves the same as unplugging the webcam physically. This at least makes the camera usable for Zoom, as unlike Skype it doesn't go completely mad when the device is reset. I am still looking for a proper solution though.

0

I have a similar problem with the integrated webcam of a Dell XPS 15 L502X, and it's apparently a hardware issue: it gets fixed if, at the moment of start capturing, you shine a light (for instance, the smartphone flashlight) at the webcam. Seems like it needs a high light threshold to activate. Hope this helps you. Best regards.