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:
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.
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.
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.
For Ubuntu 20.10
For this ubuntu edit
/etc/bluetooth/main.conf
and find the lineand replace it with:
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:
Run
sudoedit /etc/rc.local
and add this before line withexit 0
: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
: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:
and change the value to:
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
.16.04+
From ubuntu 16.04 onwards systemd manages startup services like bluetooth ... to view current status issue following in a terminal
to deactivate bluetooth on startup issue this
then on next reboot bluetooth will not be active ... to enable bluetooth issue ( then reboot )
To disable the bluetooth driver from loading on startup:
add:
Enabling it later should just be:
Step 1: Go to the terminal and type in the following command to edit system's
/etc/rc.local
file:Step 2: Add the following line before the
exit 0
line: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:
(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:
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:
Or through the GUI:
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
1. block bluetooth in rc.local
Add this line at the end of the file
/etc/rc.local
right before the lineexit 0
: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:Which opens an editor. At the end of the file i added:
Those changes are activated by
Now the file
/etc/rc.local
is used as you know it.3. disable blueman-applet on start
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
Then the file
contains some settings about devices like wifi and bluetooth. There is the key
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
which can be set to
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.
Type the following into a terminal:
At the bottom of the file, add the line:
Save the file and restart - Bluetooth should now be disabled.
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.