Disabling Bluetooth as Default in Debian Based Distros

In the wonderful world of modern linux desktops many distros will detect and configure the majority of your hardware out of the box. This is a great feature and in this area linux is often ahead of its counterparts.

Sometimes, however, there is a piece of hardware that you either don’t need, or don’t want handled automatically for you. One such thing for me is bluetooth.

Although my laptop is equipped with bluetooth, I just don’t use it very often. This is fine except that I’d rather not waste the battery power on something I’m unlikely to to use anytime soon. Unfortunately in Ubuntu based distros if you turn bluetooth off from within the desktop it is re-enabled upon a reboot.

Problem: Bluetooth remains on by default at boot even when turned off in bluetooth manager during last use.

Solution: A simple way to ensure bluetooth is turned off by default but still available to switch on via whichever bluetooth manager applet is provided by your particular desktop environment is to kill it upon boot with rfkill. This is done by adding a line to /etc/rc.local which is a file run by Debian based systems near the end of the boot cycle.

Procedure:
In a terminal enter the following command to edit rc.local

gksudo gedit /etc/rc.local

Add the following line between the comments and the line ‘exit 0’

rfkill block bluetooth

Save & Exit

Reboot

Edit: After recently installing Linux Mint Debian Edition I’ve noted that it does not come with the package rfkill installed by default as does Ubuntu or regular Linux Mint. This package can be installed as below.

sudo apt-get install rfkill

Advertisements

17 thoughts on “Disabling Bluetooth as Default in Debian Based Distros

  1. I had some issues with the mate-bluetooth package that came with Mint 13, so I replaced it with blueman. That solved my device pairing issues but Bluetooth was now being enabled and turned on every time I booted up and logged in.

    I tried your recommendation and that prevented the Bluetooth light from coming on during boot (good news). After MATE login, however, the blueman-applet started up and enabled itself automatically.

    To solve that, I went to /etc/xdg/autostart and removed the blueman.desktop entry (after making a backup of course), and now Bluetooth no longer starts up automatically. Hooray! Thanks for your tip.

  2. Thanks this worked v. well. Have been looking for a soluton to his on and off since I installed Debian 7 on me Toshiba T-130 laptop a few days ago. I seldom use bluetooth and it is a bit of a power drain. All oher solutions failed of looked rather too complex for me but this worked 1st time. Thanks again.

  3. Pingback: Desabilitar Bluetooth na inicialização do Debian | Danilo Arantes

  4. Unfortunately, with the update to Wheezy 7.5, this way of switching off bluetooth at startup does not work anymore. Any new work arounds?

    • I wasn’t aware of the issue as I’ve not yet come across (I’m currently running Xubuntu). I’d be interested in hearing of a replacement if you locate one.

    • With adding the line:

      /etc/init.d/bluetooth stop

      to /etc/rc.local

      i successfully switched off bluetooth at startup.
      To start it, you have to type

      /etc/init.d/bluetooth start

      At least in xfce it doesnt work to just start blueman. So it is a workaround.
      Please let me know if you can imfprove it.

      • IMPROVE:

        Hi, for me with Debian Wheezy 7.6 on ThinkPad Edge325
        Method 1 worked. BUT
        I had to find out the IDENTIFIER of my Bluetoothdevice.
        Type: sudo rfkill list
        I have two Bluetoothdevices so i had to play with block/unblock to find out the right Identifier and use this one in /etc/rc.local

        “rfkill block IDENTIFIER”

        ét voila…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s