6

My webcam worked like a charm until I ran a simple python code to take photo. I ran it with root permission by sudo python myapp.py. The program crashed. Then I ran sudo killall -9 python.

From that time, I lost my webcam. If I run my program, I get this error: VIDEOIO ERROR: V4L: can't find camera device. Cheese cann't find device as well.

I google my issue and I find some pages saying that I should re-enable uvcvideo module. I've done it by sudo modprobe -r uvcvideo && sudo modprobe uvcvideo but the problem isn't solved.

This is the result of some of my commands:

$ lsmod | grep uvc
uvcvideo               86016  0
videobuf2_vmalloc      16384  1 uvcvideo
videobuf2_v4l2         24576  1 uvcvideo
videobuf2_core         40960  2 videobuf2_v4l2,uvcvideo
videodev              184320  3             
videobuf2_core,videobuf2_v4l2,uvcvideo
media                  40960  2 videodev,uvcvideo

$ sudo v4l2-ctl --list-devices
Failed to open /dev/video0: No such file or directory

I should also notice that if I restart the computer I get nothing from lsmod | grep uvc until I run sudo modprobe uvcvideo again.

How should I solve the issue?

vahidreza
  • 161
  • I have the same issue Ubuntu 18.04.1, the udo modprobe uvcvideo does not survive a restart when I issue lsmod | grep uvc. A solution is needed, please. – doctorate Dec 22 '18 at 06:36
  • 1 - same issue with a uvc HDMI capture stick. Worked great for a few days but then after a crash, can't be seen at all. Did anyone find a solution for this?
  • – Rich Smith Sep 14 '20 at 10:37