Close Menu
    X (Twitter)
    Hectic GeekHectic Geek
    • Apps
      • Apps for Mac
      • Apps for PCs
      • Best Apps
    • Concepts
      • Comparison
      • For Geeks
      • IT Careers
    • Gadgets
      • Accessories
      • Best Work Laptops
      • Budget Laptops
    • GNU/Linux
      • Ubuntu
    • How To
      • Virtualization
      • Windows
      • Windows How-To
    Hectic GeekHectic Geek
    Home » How to Disable Your Webcam in Ubuntu?
    Ubuntu

    How to Disable Your Webcam in Ubuntu?

    GayanBy GayanNovember 26, 2020Updated:November 26, 20202 Comments3 Mins Read
    Twitter Reddit Telegram WhatsApp Email
    Share
    Twitter Reddit Telegram WhatsApp Email

    If you have a web camera on your Laptop that you don’t use at all, then you can disable its driver from loading in Ubuntu as it has two main advantages. Firstly, you might be able to save some power, and secondly, it should save you a few Megabytes from your RAM, which might help speed up the booting times as well.

    Contents

      • Step 1:
      • Step 2:
    • How to re-enable it later?

    Now, even after disabling it, I did not see any noticeable reduction in power. That is because, most webcams that come with laptops these days are actually connected through a USB port (not visible to the outside), including mine, and Ubuntu puts these non-active USB devices into ‘sleep states’ in order to save power.

    So even before I disabled it, it was put into a sleep state thus, I could not see any change in power consumption at all, after disabling it. However, its Kernel module (driver) was about 8.8MB in size, and it is automatically loaded into the RAM, so I decided to disable it to save those Megabytes :).

    If you too want to disable it, then please follow the below procedure.

    I’m using Ubuntu 12.04 LTS, but the below method should work in other recent Ubuntu versions including Ubuntu 20.04 or 19/18. What we are doing is simple. We are going to ‘blacklist’ the webcam driver, so the Kernel would ignore loading it while booting.

    __________

    Optional: If you wanted to know how much Megabytes your webcam driver consumes, then put the below command in your Terminal window.

    lsmod | grep uvcvideo

    Then, as shown above, note the numbers next to the ‘uvcvideo’ text line and divide it by 4. Now you should have its size in Megabytes.

    __________

    Step 1:

    Open your Terminal window and enter the below command.

    gksudo gedit /etc/modprobe.d/blacklist.conf

    Step 2:

    This will open up a configuration file. Now go to the end of this file, and simply copy and paste the following code in a new text line. This method will disable the webcam in Ubuntu.

    #Disabling the webcam device.
    blacklist uvcvideo

    The ‘#Disabling the …’ code is actually optional, but I put it there so you can identify the code afterwards.

    Once done, save your changes, close the configuration file and reboot your PC to apply the setting. That’s it!.

    How to re-enable it later?

    Enabling permanently …

    Quite simple actually. Open the configuration file again, and remove the added code from it. Save your changes and reboot the computer. That’s it.

    Enabling temporarily …

    Or, if you only wanted to enable it temporarily, then enter the below command in your Terminal window.

    sudo modprobe uvcvideo

    And open the program that is trying to access your webcam and now it should be working. But please remember that the next time you reboot your computer, Ubuntu will automatically disable it.

    Linux Tips Ubuntu
    Share. Twitter Reddit Telegram WhatsApp Email
    Gayan

    An RHCE, 'Linux' user with 14+ years of experience. Extreme lover of Linux and FOSS. He is passionate to test every Linux distribution & compare with the previous release to write in-depth articles to help the FOSS community.

    Related Posts

    Pop!_OS VS Linux Mint, Which One to Select in 2023

    July 27, 2023

    Debian vs Ubuntu Server: A Brief Comparison for Beginners

    July 2, 2023

    CPU Based Simple System Stability and Benchmark Tester for Ubuntu Linux – systester

    June 16, 2023

    Top Linux Distros for Web Development in 2023

    May 20, 2023

    Typespeed: Typing Speed Testing Game for Ubuntu Linux

    March 12, 2023

    Debian vs Ubuntu in 2023- Which Linux OS is Right for You?

    January 6, 2023

    2 Comments

    1. Luc Van Rompaey on November 27, 2020 9:15 pm

      This method of blacklisting a module is probably the most flexible way to prevent the module from loading whenever the system is started, while it can still be loaded through a simple ‘modprobe’ command should the need ever arise. I actually use this very same method to ensure that bluetooth will not be automatically loaded.

      If, however, you want to prevent the module from loading, ever, even with a ‘modprobe’, you may want to ‘fake-install’ it. To do so, replace the ‘blacklist’ line with something like the following:

      ————
      install uvcvideo /bin/true
      ————

      This will cause ‘modprobe’ to run the ‘/bin/true’ program whenever it is instructed to load the module, i.e., do nothing but return a successful result. Just be forewarned, though, that you will now no longer be able to load the module unless you modify the blacklist configuration file again.

      Reply
    2. LinuxStans on December 26, 2020 12:58 am

      I’ve already disabled my cams on all my laptops (running Ubuntu, Mint, Manjaro, and a few other distros) but I’ve also added a webcam cover on all of them. You can never be too safe 😀

      Reply

    Leave A Reply Cancel Reply

    This site uses Akismet to reduce spam. Learn how your comment data is processed.

    Latest Posts

    [Fixed] HDMI No Signal to TV or Monitor on Windows 10/11

    November 7, 2023

    AlmaLinux vs Ubuntu – How to Select the Best One?

    October 22, 2023

    Why Does My Gaming Laptop’s Battery Drain So Fast? The Science Behind It

    October 9, 2023

    Top 10 Best email Encrypting Software for Business and Personal Use

    October 7, 2023

    7 Essential Features A Learning Management System Should Include

    October 2, 2023

    The Importance of DNS for Mac Users: Why You Need to Know How It Works

    September 25, 2023

    Subscribe to Updates

    Get the latest news and updates from Hectic Geek. We won't overload you or sell your data!

    Contact
    • About Us
    • Contact Us
    • Privacy Policy
    • Write for Us
    X (Twitter)
    © 2023 Hectic Geek.

    Type above and press Enter to search. Press Esc to cancel.