Ask Ubuntu Asked by vahidreza on January 5, 2022
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?
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.
Answered by L3w1s on January 5, 2022
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP