If you are using Ubuntu and you want to Enable or Disable Camera in Ubuntu Linux, then this guide will help you do so easily. The article will provide details on the best ways to enable or disable camera in Ubuntu without needing any third-party software applications. Just follow the simple steps below to see how easy it can be. At the end of this post, you should know how to enable or disable camera in Ubuntu. So let’s get started!
When your Ubuntu 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, the camera is enabled on all systems. However, it can be disabled by invoking some commands in the command line interface of Ubuntu to serve various purposes, such as security reasons.
One reason to disable the camera is privacy and security. If you are using your Linux machine for personal use only and do not want anyone else to see what you do on it when there’s no one around then disabling this feature will keep your activities private from prying eyes. Another reason for disabling camera might be saving battery life or disk space too!
When you are ready, follow the steps below to enable or disable camera in Ubuntu Linux system.
How to enable or disable camera in Ubuntu Linux
In Linux, you must gain root access before you can do anything that would modify the system, if you have administrator access, you can disable and enable cameras in your ubuntu Linux system.
As of the date of this writing, there are no settings in Ubuntu Settings App to allow either disabling or enabling attached camera. If we do find a setting eventually, the most effective way will be through the use of an administrator’s terminal console.
The latest drivers for both cameras and webcams available on Ubuntu are UVC (USBVideo Class) compliant, which means they work well with the generic uvcvideo kernel driver module.
To list the uvcvideo kernel driver module, run the command below:
sudo lsmod | grep 'uvcvideo'
If nothing returns, then it seems Ubuntu could not identify the device or does not have the correct driver. However, if the camera is seen and loaded drivers are present, you should see similar messages as listed below:
uvcvideo 106496 0
videobuf2_vmalloc 20480 1 uvcvideo
videobuf2_v4l2 32768 1 uvcvideo
videobuf2_common 77824 4 videobuf2_vmalloc,videobuf2_v4l2,uvcvideo,videobuf2_memops
videodev 258048 3 videobuf2_v4l2,uvcvideo,videobuf2_common
mc 65536 4 videodev,videobuf2_v4l2,uvcvideo,videobuf2_common
If you do not receive a similar outcome, it may also mean that another driver is installed for your camera. Check these sites here and here for further information about drivers.
Remove Camera Drivers From Ubuntu Linux
To remove Run the commands below to remove the camera driver as show below:
sudo modprobe -r uvcvideo
Replace uvcvideo driver name with other names of drivers that is installed on your system.
If the camera is in used during the removal process, you will get a error similar like below:
modprobe: FATAL: Module uvcvideo is in use.
To resolve this error, close the app that are currently using the camera, then again run the same command above to remove or disable the camera.
The job is not done yet, the command above disable the camera drive but a simple reboot will reinstall it again in your system. To prevent this, run the command below to add the driver to the block list configuration file located at ‘/etc/modprobe.d/blacklist.conf‘ as show below:
echo 'blacklist uvcvideo' | sudo tee -a /etc/modprobe.d/blacklist.conf
All drivers that are added to block list configuration file are blocked permanently. After that, applications of your systems will not be able to use your camera.
Enable Camera in Ubuntu Linux
If you want to re-enable the camera driver in Ubuntu, just remove the line from the block list configuration file above. After remove, run the commands below:
sudo modprobe uvcvideo
That’s all
Conclusion
The process of enabling or disabling the camera in Ubuntu Linux is easy and can be accomplished by running a single command. If you have any questions, feel free to leave a comment below and we will get back to you as soon as possible!
If our tutorials helped you, please consider buying us a coffee. We appreciate your support!
Thank you for your support.