Ubuntu Automatically Turns on Bluetooth ? (fix)

The network manager in Ubuntu has the ability to restore the last user saved settings of network hardware devices, upon the next desktop login. For example, if you had disabled Bluetooth, then it should be disabled then next time you login to your desktop. If you had it turned ON, then it will be turned ON, automatically etc.

However, sometimes, out of no reason, even after manually disabling it (because I hardly use it), upon the next reboot, Ubuntu 12.04 automatically enables the Bluetooth device in my laptop computer. And when running, it consumes a reasonable amount of power too, so the first thing that I do after logging into the desktop is disabling it, manually.

Doing this over and over again is a hectic task, and if you are having the same issue and looking for a way to make Ubuntu disable it at the system boot-up, permanently, then you can follow the below steps.

Note: After disabling it using this method, you can re-enable it using the usual Bluetooth icon on the top-panel in Unity desktop. In fact, this is actually the original command that is executed, when you click on that icon to turn it ON or OFF.

Bluetooth-icon-on-the-top-panel-in-Unity-desktop

Step 1:

Open your Terminal and enter the below command.

gksudo gedit /etc/rc.local

Step 2:

Then copy and paste the below command into the opened configuration file, but make sure to paste it before the text line that says ‘exit 0’, otherwise it will not work (as shown below).

rfkill block bluetooth

Disabling-Bluetooth-device-in-Ubuntu-12.04

Then save the changes and close the file. That’s it.

Now try rebooting, and your Bluetooth device should be turned OFF by Ubuntu, no matter what state it was in, before.

Not just Bluetooth, but you can use ‘rfkill’ to disable any wireless network or device as well. For instance, if I wanted to disable Wi-Fi, then replace ‘bluetooth’ part of the above command with ‘wifi’. For disabling WiMax, replace it with ‘wimax’. If you wanted to disable all the wireless connections, then use ‘all’ instead.

If you want to know more about this command, then read its shortly written manual by using the below command.

man rfkill

Good luck.

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.

6 thoughts on “Ubuntu Automatically Turns on Bluetooth ? (fix)”

  1. Thank you for this. I had the same problem but then with the wifi, always jumping on again afther reboot.
    There is however one little mistake, for disabeling wifi you say to use the argument ‘wi-fi’ this should be ‘wifi’ for ther rest working perfect.
    Thanks a lot

    Reply
  2. Something weird happened here. I did what you say in the post, then I turned the computer off and on again to test this setting. The bluetooth was indeed off, but it’s icon was no longer in Unity’s top-panel. I opened bluetooth settings from Unity menu (with the button super) and tried to enable it, but bluetooth would not turn on. I mean it turned itself off an instant after I’ve clicked to enable it. The solution to enable bluetooth again was to edit /etc/rc.local again and remove the line rfkill block bluetooth. (I’m using Ubuntu 14.04.)

    Reply
  3. I run ubuntu 14.04, and when I entered the command it opened a new tab and tells me “This site can’t be reached”, followed with
    “gksudo%20gedit%20’s server DNS address could not be found”.
    I tried it twice to be sure I typed the command correctly.

    No similar kind of command I type into the thing beginning with sudo ever works on my machine either, but this is the first time it opened up a tab to tell me…

    Some time ago, out of sheer annoyance, I uninstalled bluetooth just to get rid of the thing (I never have use for it at all) and I ended up losing the System Settings altogether. I had to reinstall ubuntu to get it back.. So I just got used to turning the thing off every time it turned itself back on. It’s like having an annoying itch you can’t get completely rid of.

    Reply
  4. There was something about “killing” bluetooth that kept me from using this solution so I continued searching for an alternative method. Eventually, I found a post on stackoverflow suggesting using the `tlp` package.

    More here: https://askubuntu.com/a/1090707

    Seems like a cleaner solution to me, despite having to install an “additional” package.

    Reply

Leave a Comment

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