I have an integrated webcam in my laptop. I know that it works and that ubuntu recognized it because at installation it asked if I wanted a photo taken for some kind of image associated with my account. When I look in system settings, I do not see any webcam in the hardware section. I would like to disable the webcam like you can do in Windows, but as I can't find it in my hardware section, how can I disable it? I cannot even unplug it as it is integrated into the monitor. Am I looking in the wrong place?? I am using 12.04
# pre ubuntu 18.04 gksu gedit /etc/modprobe.d/blacklist.conf # --- OR --- # ubuntu 18.04 and later gedit admin:///etc/modprobe.d/blacklist.conf
at the bottom. Save the file and quit the text editor.
Regarding the comment:
Find the vendor and device id for the webcam with
Bus 001 Device 002: ID 05a9:2640 OmniVision Technologies, Inc. OV2640 Webcam
cd /sys/bus/usb/devices/ ls
Do a "grep" on the vendor id and product id:
$ grep 05a9 */idVendor 1-1/idVendor:05a9 $ grep 2640 */idProduct 1-1/idProduct:2640
1-1 is what you need.
bConfigurationValue in this directory needs to contain a
0 to disable the device or a
1 to enable it. But this file is owned by root so to alter it (change the 0 to a 1 to enable) ...
sudo -i echo 0 > bConfigurationValue
to disable. You can check the camera and it will be disabled.
This is not permanent yet. A reboot will set it back to what is was before. To make it permanent:
sudo -i echo 0 > /sys/bus/usb/devices/1-1/bConfigurationValue
1-1 is the directory we used and use a
1 to enable)
Cameras are controlled by the
uvcvideo kernel module.
You can disable the camera until reboot by opening a terminal and typing
sudo modprobe -r uvcvideo. You will be asked for your password, and after typing it, if there are no errors shown in the terminal, your webcam should be disabled.
If you got the error message:
modprobe: FATAL: Module uvcvideo is in use. after trying to remove the uvcvideo module, you can try to force its removal with the following:
sudo rmmod -f uvcvideo (thanks thiagowfx)
To enable your webcam again, type
sudo modprobe uvcvideo into terminal.
If you want the camera to be disabled when you reboot, then press
ALT+F2 and paste this command:
gksu gedit /etc/modprobe.d/blacklist.conf
You will be asked for your password. After giving it, a text file should open. Paste at the end of the text file on a new line:
Then save the file and exit. Next time you start Ubuntu, the webcam should be disabled.