When your Ubuntu Linux device has a camera, you will be able to make video calls, record videos, and take pictures. Depending on the camera’s capabilities, some or all the following controls may be available to you, including rotation, background effects, auto framing, and more. By default, Ubuntu Linux will identify and install all related drivers that make the camera work. If additional drivers are needed, you will be prompted to install them. If you have administrator or root access, you can disable and enable cameras for everyone who uses the device. Below is how to enable or disable the camera in Ubuntu Linux.
How to enable or disable the camera in Ubuntu Linux
As described above, if you have administrator access, you can disable and enable cameras for everyone who uses the device. Below is how to do that.
Find the Camera driver module
As of the time of this writing, there are no settings in the Ubuntu settings app to enable or disable the built-in or attached camera. Until there’s a setting in the app, the most efficient way to disable or enable the camera is by using the command line console. Most recent camera and webcam drivers available in Ubuntu are UVC (USB Video Class) compliant and supported by the generic uvcvideo kernel driver module. Using the command line, you can list the uvcvideo kernel driver module: If the commands return nothing, then Ubuntu did not identify the camera or hasn’t installed a driver for it. If a camera is identified and drivers loaded, you should see similar lines as the ones below: If you don’t get a similar result, it may also mean that a different driver is installed for your camera. Check these sites here and here for additional drivers info.
Remove camera drivers from Ubuntu
You can a system driver from Ubuntu using the modprobe command. Run the commands below to remove the camera driver. Replace uvcvideo with other names of drivers identified on your system. If the camera is in use, you will see the error below: Exit the app using the camera, then re-run the commands to disable. The commands above will remove the driver. However, a reboot will reinstall the drivers. To permanently remove a driver, run the commands below to add the driver to the block list configuration file at ‘/etc/modprobe.d/blacklist.conf‘. Drivers that are added to this file are blocked permanently. Once disabled, apps will not be able to see your camera.
Enable camera in Ubuntu Linux
To re-enable the camera driver in Ubuntu, make sure to remove the line from the blocklist.conf file above. Then run the commands below. That should do it! Conclusion: This post showed you how to enable or disable cameras in Ubuntu Linux. If you find any error above or have something to add, please use the comment form below.