uvcvideo is loaded but /dev/video0 doesn't exist

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?

2

1 Answer

For my case, I found there is a file called uvcvideo-blacklist.conf in /etc/modprobe.d. It will prevent uvcvideo module to be loaded automatically when booting. Commented out the only line "blacklist uvcvideo" in this file will get uvcvideo been automatically loaded at start up.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like