I have a USB Webcam connected to an Ubuntu 20.04 VM. I want to use the camera so to test it, I use Cheese. It shows a black box. So, I install guvcview but that also does the same thing. Only after running guvcview with root can I see a webcam feed. Why is this happening and can I fix it. I know that I was able to do it before.
Asked
Active
Viewed 1,702 times
2
DragonflyRobotics
- 195
- 8
-
I have the same problem but on my machine, which is an MSI, I try fn+f6 , and see how appears and disappears with lsubs. `sudo guvcview` works but `guvcview` doesn't. `sudo cheese`doesn't work either – titusfx Oct 09 '21 at 17:29
2 Answers
1
In VMWare, change your USB setting from 2.1 to 3.1. Your camera may only support USB 3.0
You can also reload the camera driver:
sudo rmmod uvcvideo
sudo modprobe uvcvideo
DragonflyRobotics
- 195
- 8
-
Reloading drivers works also for built-in camera, for installed distro Ubuntu 21.10 with kernel 5.13. Thx! – user1660210 Feb 10 '22 at 22:01
0
Many device access problems can be resolved through group membership changes.
Specifically, if ls -l shows that the group permissions (the second "rwx" triplet) is "rw" (e.g."-rw-rw----"), then, adding oneself to the group that owns the device will grant rw access.
Here's how:
device="/dev/whatever"
sudo adduser $USER $(stat -c "%G" $device)
This allows you membership in the group that can rw the device, but there is one more step.
To make all your processes members of the new group, logout and login. Group memberships are set up at login time.
To create a single process in the new group (for testing, prior to logout/login):
newgrp $(stat -c "%G" $device)
or, just type the group name. See man newgrp.
waltinator
- 35,099
- 19
- 57
- 93