455

How can I deactivate Bluetooth on system startup?

Flimm
  • 44,031
Floqqi
  • 4,567

35 Answers35

315

For Ubuntu 20.10

For this ubuntu edit /etc/bluetooth/main.conf and find the line

AutoEnable=true

and replace it with:

AutoEnable=false

18.04+

18.04* users who don't naturally have a /etc/rc.local, you'll need to create one and make it executable. To make things slightly easier, you can just paste the following command into a terminal:

sudo install -b -m 755 /dev/stdin /etc/rc.local << EOF
#!/bin/sh
rfkill block bluetooth
exit 0
EOF

Run sudoedit /etc/rc.local and add this before line with exit 0:

rfkill block bluetooth

You should still be able to enable Bluetooth through the top bar applet.

This should work for most systems but it looks like there are a few bugs lurking in the kernel's ACPI for Thinkpads. If you're on a Thinkpad, add the following to /etc/rc.local:

echo disable > /proc/acpi/ibm/bluetooth

Or check out ibm-acpi - IBM ThinkPad ACPI Extras Driver -- some reports suggest that ibm-acpi includes bluetooth control (amongst other nice things). But I don't have the hardware so I'm completely unable to verify these claims. Good luck.

thiagowfx
  • 865
Oli
  • 299,380
178

I found a how-to with a clean "workaround" here (archive link for posterity)

Actually changing /etc/bluetooth/main.conf was enough for me.

Search for the entry:

AutoEnable=true

and change the value to:

AutoEnable=false

It was enough for me, although the article describes some other steps that may or may not be necessary.

On Ubuntu 17.04 and older the option was named InitiallyPowered.

Stepbaer
  • 1,875
54

16.04+


From ubuntu 16.04 onwards systemd manages startup services like bluetooth ... to view current status issue following in a terminal

sudo systemctl status bluetooth.service 

to deactivate bluetooth on startup issue this

sudo systemctl disable bluetooth.service

then on next reboot bluetooth will not be active ... to enable bluetooth issue ( then reboot )

sudo systemctl enable bluetooth.service
30

To disable the bluetooth driver from loading on startup:

sudo $EDITOR /etc/modprobe.d/blacklist.conf

add:

blacklist btusb

Enabling it later should just be:

sudo modprobe btusb
maco
  • 16,132
18

Step 1: Go to the terminal and type in the following command to edit system's /etc/rc.local file:

gksudo gedit /etc/rc.local

Step 2: Add the following line before the exit 0 line:

rfkill block bluetooth
behnam
  • 221
Varun
  • 349
17

Note: These instructions are for users who want to disable Bluetooth at boot by default in a way that it can easily be enabled afterward.

Gnome (Ubuntu 18.04+)

Disable Bluetooth by default

In Gnome, Bluetooth is managed by gnome-bluetooth, which should remember the last setting you used. But you can force it to always be disabled at boot like this:

echo "rfkill block bluetooth" >> ~/.profile

(Replace ~/.profile with ~/.zprofile if you're using zsh)

This avoids having to edit any system files such as /etc/rc.local

Manually enable Bluetooth

Whenever you're ready to turn it on click in the top-right > Settings > Bluetooth > click the switch near the top right

Or using the command line:

rfkill unblock bluetooth

Unity/Xfce (Ubuntu < 18.04, Xubuntu)

Disable Bluetooth by default

If you're using the Bluetooth applet in the top panel (blueman-applet), it has its own setting that will automatically turn Bluetooth on even if you've disabled it in other places (like /etc/bluetooth/main.conf or /etc/default/tlp).

To prevent Bluetooth from turning on at startup using the command line:

gsettings set org.blueman.plugins.powermanager auto-power-on false

Or through the GUI:

  1. Click the Bluetooth applet > Plugins > PowerManager > Configuration
  2. Uncheck Auto power-on

Next time you reboot, the Bluetooth applet will still be visible but Bluetooth will be off.

Manually enable Bluetooth

Click the Bluetooth applet > Turn Bluetooth On

bmaupin
  • 5,371
10

1. block bluetooth in rc.local

Add this line at the end of the file /etc/rc.local right before the line exit 0:

rfkill block bluetooth

This will do the trick, but only in older Ubuntu versions using upstart.

2. reenable rc.local on systemd

On Ubuntu 15.10 with systemd as startup manager the /etc/rc.local file is not used by default any more, so call this on a terminal:

sudo systemctl edit --full rc-local

Which opens an editor. At the end of the file i added:

[Install]
WantedBy=multi-user.target

Those changes are activated by

sudo systemctl reenable rc-local

Now the file /etc/rc.local is used as you know it.

3. disable blueman-applet on start

sudo sed -i 's/NoDisplay=true/NoDisplay=false/g' /etc/xdg/autostart/blueman.desktop
gnome-session-properties

Now blueman-applet is visible and you can disable it from startup programs

4. Reboot to see the effect

rubo77
  • 34,024
  • 52
  • 172
  • 299
9

I found another answer using tlp that works great for me with Ubuntu 18.04. Probably first tlp must be installed with

sudo apt install tlp

Then the file

/etc/default/tlp

contains some settings about devices like wifi and bluetooth. There is the key

RESTORE_DEVICE_STATE_ON_STARTUP

which is by default set to 0. After I switched it to 1 my last setting is remembered on the next boot. That means when I disable bluetooth in the top panel it stays disabled and when I enable bluetooth it stays enabled. Also there is the key

DEVICES_TO_DISABLE_ON_STARTUP

which can be set to

DEVICES_TO_DISABLE_ON_STARTUP="bluetooth"

Now bluetooth will be disabled on each boot. After changing this configuration bluetooth will can be enabled and disabled through menu and panel item. I think it's better than removing it from kernel modules.

9

Type the following into a terminal:

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

At the bottom of the file, add the line:

blacklist bluetooth

Save the file and restart - Bluetooth should now be disabled.

Nathan Osman
  • 32,495
7

You can change the services started at boot with the help of BUM.

Install it: sudo apt-get install bum

Run: sudo bum

enter image description here

Uncheck the box and click Apply.

desgua
  • 33,215
6

I add

"/etc/init.d/bluetooth stop"

into

"/etc/rc.local" 

before "exit 0" command for boot with bluetooth turned off.

Seth
  • 59,332
5

I think that the best way is to disable the service from being started in the first place. There is a general method for disabling services which works perfectly:

sudo sh -c "echo 'manual' > /etc/init/bluetooth.override"

That works for Ubuntu 13.10 and probably for earlier versions as well.

Felipe
  • 51
4

You can edit your update-rc.d settings. I used something similar to:

sudo update-rc.d bluetooth remove

In Debian Wheezy. Check out man update-rc.d for more info on how to use it.

3

On Ubuntu Studio 16.04 you can disable Bluetooth Applet in Startup in:

Session and Startup > Application Autostart > Bluetooth Applet

Here you can click in the field to disable it.

Adrian Keister
  • 227
  • 2
  • 6
  • 18
2

We can disable bluetooth auto start this way:

sudo gedit /etc/bluetooth/main.conf

(gedit is my fav editor, you can replace this with xed or whatever that's installed on your system.)

At the very bottom of this file, there's this line:

#AutoEnable=false

Un-comment it, like this:

AutoEnable=false
Shayan
  • 1,621
2

Since Ubuntu 18.04 (with GNOME) you need to

  1. Edit /etc/bluetooth/main.conf and find

    AutoEnable = true
    

    and change the value to:

    AutoEnable = false
    

    So this device is not powered on startup.

  2. Edit /etc/default/tlp and find:

    #DEVICES_TO_DISABLE_ON_STARTUP="bluetooth wifi wwan"
    

    Edit this line to read:

    DEVICES_TO_DISABLE_ON_STARTUP="bluetooth"
    

    So this device is disabled on startup.

  3. Then open Dash and search for "Startup Applications". Uncheck any items related to Bluetooth in the list. Click [Close] to save.

2

I've tried several above answers, but they didn't work on Linux Mint with kernel 5.8.5. So, now I'm using cron job to turn off bluetooth when system boots. And the applet can be used to turn it back on.

Open root crontab on terminal

sudo crontab -e

And add following line and save (with sleep to make sure the processes have started)

@reboot sleep 10; /usr/bin/bluetooth off
2

No. It is not always in the startup applcations list. I think that the best solution is to add the rfkill command in rc.local script or to set the InitiallyPowered parameter in /etc/bluetooth/main.conf.

Robie Basak
  • 15,910
Robert
  • 351
2

Maybe you can turn it off in the Startup Applications. But these applications are hidden by default. Unhide the hidden Startup Applications in 12.04: Open the terminal and run these two commands:

cd /etc/xdg/autostart/

sudo sed --in-place 's/NoDisplay=true/NoDisplay=false/g' *.desktop

Now you can uncheck bluetooth. (Don't remove!)

2

1) Install the package smbios-utils and add it to Startup Applications with:

sudo smbios-wireless-ctl --bt 0

2) In terminal type:

sudo visudo

and add to the end of opened file /etc/sudoers the line:

<your username> ALL = NOPASSWD: /usr/sbin/smbios-wireless-ctl

3) To switch bluetooth on during session, run in terminal:

sudo smbios-wireless-ctl --bt 1

This works for me on my Dell D630 with Ubuntu 13.10

v2r
  • 9,707
victor
  • 73
  • 5
2

On Ubuntu 16.04, I simply disabled the service from starting up using systemctl.

To do this, open up a terminal window and type the following:

sudo systemctl disable bluetooth

You can either reboot since now bluetooth will be disabled from starting up, or if you do not want to reboot and want to stop bluetooth right away, you can type:

sudo service bluetooth stop

Ken
  • 612
1

Pure systemd solution (16.04+)

Rather than use the legacy rc-local solution, here is a clean and portable systemd service that suspends bluetooth upon boot and also after waking up from sleep.

  1. Using sudo, create /etc/systemd/system/bluetooth-suspend.service with the following contents:
[Unit]
Description=Disable bluetooth after waking up.
After=suspend.target network.target

[Service]
User=root
Environment=DISPLAY=:0
ExecStart=/usr/sbin/rfkill block bluetooth

[Install]
WantedBy=suspend.target network.target
  1. Enable the service: sudo systemctl enable bluetooth-suspend.service

  2. Reload systemd: sudo systemctl daemon-reload

To re-enable bluetooth, run rfkill unblock bluetooth in the terminal.

jII
  • 1,102
1

Unfortunately, nothing above work for me. Instead, I add this to the bottom line of ~/.profile

( sleep 10; rfkill block bluetooth ) & 

In my case, I must wait for the blueman applet to start and enable bluetooth(unavoidably) before I could switch it off.

eli chan
  • 91
  • 3
1

Here is what worked for me on MX Linux 19.2. Both parts of this solutions have been mentioned in other answers, but not both together.

  1. Edit /etc/bluetooth/main.conf to set AutoEnable to false:

    AutoEnable=false
    

    (or just comment it out).

  2. As suggested in this issue comment, execute

    gsettings set org.blueman.plugins.powermanager auto-power-on false
    

    to prevent Blueman's power-manager plugin from auto powering the adapter.

Alexey
  • 793
1

I using Sputnik Kernel, which fixed this on my Dell Inspiron 14R N4110.

Eliah Kagan
  • 119,640
1

I think you should edit

/etc/default/bluetooth

and set

BLUETOOTH_ENABLED=0

to disable the bluetooth service at boot

Fabio
  • 11
1

For those of you where inserting the line rfkill block bluetooth (or any other) in /etc/rc.local doesn't work, try to include the same line in the end of ~/.bashrc

In my set up (Ubuntu 14.04, Thinkpad W540), no option worked inserting it in /etc/rc.local but the former did work in bashrc. Note this will work just for the current user, not globally for all users.

Sam
  • 188
  • 1
  • 6
0

In xubuntu it's just to remove from Auto Start applications (Session & start up)

0

I add

"/etc/init.d/bluetooth stop"

into

"/etc/rc.local" 

before "exit 0" command for boot with bluetooth turned off.

0

Solution for my notebook

"BIOS - USB Configuration - EHCI2 : Disabled"

EHCI1 is for usb ports (actually My notebook has 2 usb 2.0 ports)

MSP
  • 1
0

Edit /etc/default/grub:

sudo nano /etc/default/grub

and change the following line:

GRUB_CMDLINE_LINUX=""

to say this instead:

GRUB_CMDLINE_LINUX="bluetooth.blacklist=yes"

Then, update grub and reboot:

sudo update-grub
mchid
  • 44,904
  • 8
  • 102
  • 162
0

This should disable bluetooth from starting on Debian based systems:

sudo chkconfig bluetooth off

or on RedHat based systems

systemctl disable bluetooth.service
Stanislav
  • 223
-1

You can also use this Graphic application that also does this bluetooth manager

deFreitas
  • 258
-2

I had to use a brute-force method to stop bluetoothd from being automatically started at boot. I renamed the executable so it couldn't be found.

Flimm
  • 44,031
-3

You need to disable it from the Start Up Applications list in System Settings.

Click on the cog in the top right hand side of the menu bar and then select System Settings.

Click on Start Up Applications then scroll down until you find the bluetooth setting, take the tick from the box and you all done.

Mark Rooney
  • 6,329