How can I deactivate Bluetooth on system startup?
35 Answers
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.
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.
- 626
- 1,875
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
- 17,385
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
- 16,132
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:
- Click the Bluetooth applet > Plugins > PowerManager > Configuration
- 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
- 5,371
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
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.
- 265
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.
- 32,495
You can change the services started at boot with the help of BUM.
Install it: sudo apt-get install bum
Run: sudo bum
Uncheck the box and click Apply.
- 17,385
- 33,215
I add
"/etc/init.d/bluetooth stop"
into
"/etc/rc.local"
before "exit 0" command for boot with bluetooth turned off.
- 59,332
- 17,872
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.
- 51
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.
- 140
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.
- 227
- 2
- 6
- 18
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
- 1,621
Since Ubuntu 18.04 (with GNOME) you need to
Edit /etc/bluetooth/main.conf and find
AutoEnable = trueand change the value to:
AutoEnable = falseSo this device is not powered on startup.
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.
Then open Dash and search for "Startup Applications". Uncheck any items related to Bluetooth in the list. Click [Close] to save.
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
- 174
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.
- 15,910
- 351
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!)
- 356
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
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
- 612
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.
- Using sudo, create
/etc/systemd/system/bluetooth-suspend.servicewith 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
Enable the service:
sudo systemctl enable bluetooth-suspend.serviceReload systemd:
sudo systemctl daemon-reload
To re-enable bluetooth, run rfkill unblock bluetooth in the terminal.
- 1,102
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.
- 91
- 3
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.
Edit
/etc/bluetooth/main.confto setAutoEnabletofalse:AutoEnable=false(or just comment it out).
As suggested in this issue comment, execute
gsettings set org.blueman.plugins.powermanager auto-power-on falseto prevent Blueman's power-manager plugin from auto powering the adapter.
- 793
I think you should edit
/etc/default/bluetooth
and set
BLUETOOTH_ENABLED=0
to disable the bluetooth service at boot
- 11
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.
- 188
- 1
- 6
I add
"/etc/init.d/bluetooth stop"
into
"/etc/rc.local"
before "exit 0" command for boot with bluetooth turned off.
- 17,872
Solution for my notebook
"BIOS - USB Configuration - EHCI2 : Disabled"
EHCI1 is for usb ports (actually My notebook has 2 usb 2.0 ports)
- 1
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
- 44,904
- 8
- 102
- 162
This should disable bluetooth from starting on Debian based systems:
sudo chkconfig bluetooth off
or on RedHat based systems
systemctl disable bluetooth.service
- 223
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.
- 44,031
- 5
- 1
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.
- 6,329