Monthly Archives: April 2020

USB camera management on Linux

So you have a USB Camera plugged in to your Ubuntu box.  You then notice that your camera’s led is on (could also be true for an integrated web camera on a lap top).  This could  be because you left a camera app running and forgot to turn it off (exit). The app Cheese for example or worse yet you closed all camera apps but you have been hacked.  I won’t go into how to clean your PC here but if you want to disable your USB/integrated camera here are two very useful lines”

  1. exit cheese or your camera app
  2. sudo modprobe -r uvcvideo <– to disable the camera
  3. restart cheese no LED or camera image
  4. exit cheese
  5. sudo modprobe uvcvideo <—- to enable the camera
  6. restart cheese LED and image

Now this will not be preserved across reboot so the following might prove equally useful:

sudo vi /etc/modprobe.d/blacklist.conf
add the following two lines at the end of the file
#Disable webcam
blacklist uvcvideo
toggle “cheese” to see if you can view webcam contents or reboot

remove those two lines to restore webcam usage.