445

How can I deactivate Bluetooth on system startup?

Flimm
  • 41,766
Floqqi
  • 4,467
  • I don't think that "should be the natural default configuration", people are bound to want to use Bluetooth on their computers without having to turn it on (you don't seem to have a Bluetooth mouse or keyboard, if those were your primary input devices you'd want Bluetooth on from boot). However I do agree that a way to choose how you want Bluetooth to be on boot would be useful to have. – roadmr May 04 '12 at 20:25
  • 83
    The normal and natural thing is to let you choose, in the bluetooth settings, whether you want it on or off when it boots. It is not natural to have people turning it off or on every time they turn on their computer. We are talking about making Linux the best desktop system, not the worst, aren't we? – Robert May 04 '12 at 20:30
  • We agree that letting people choose is the best option. See here for some possible ways of doing this. https://answers.launchpad.net/ubuntu/+source/bluez/+question/51440 – roadmr May 04 '12 at 20:31
  • Tell us what sort of bluetooth device you are talking about. Or is it built in to your laptop or netbook. – Tony May 04 '12 at 20:32
  • 2
    I am reading the link that, roadmr, wrote. It sounds intereseting but by no means that people should turn on and off the bluetooth. The bluetooth configuration should ask whether you want t on or off at boot time, or at least it should boot with the last state. That is a rule of thumb. In my case, now, it is a built-in bluetooth. The problem is that I can choose on or off clicking on the systray icon but if I go to edit configuration it is always off. So this is clearly an error that is misleading. – Robert May 04 '12 at 20:47
  • I can't turn it on on the settings area, I can only click on or off and it turn bright and dim in the systray. OMG I have never seen so many disasters done on a system that was working much better – Robert May 04 '12 at 20:54
  • Sorry. I think BUM is not the way to set this then. My mistake. I don't have bluetooth to test. – desgua May 05 '12 at 01:31
  • @Robert: You can make your question stronger by editing it and adding all the good points you have clarified in all these comments. This will give you a better chance of getting the answer you need. Also it will help others you have the same issue as you – stephenmyall Aug 17 '12 at 10:24
  • The issue is that Ubuntu does not honor the state you last had it in when you reboot. That is what needs to be fixed. It hasn't worked since at least 12.04 (currently through 13.04). – Elijah Lynn Jul 10 '13 at 23:15
  • This is what works for me, on 12.04 http://askubuntu.com/a/2568 –  May 04 '12 at 20:45
  • 2
  • 25
    It's kind of unbelievable that, on the 14th edition, we are still "teaching" Ubuntu developers things like "the option to have bluetooth on or off on boot should be available to normal users, and not just to those fond of searching in interminable lines of public forums". – Rodrigo Aug 28 '15 at 12:08
  • for systemd: systemctl disable bluetooth.service should do the work – MinhajulAnwar Apr 19 '17 at 06:06
  • There is a GUI way to disable services at startup. You can install Boot-Up ManagerInstall bum. Boot-Up Manager You can disable Bluetooth services from here. – ignite Feb 17 '13 at 05:43
  • In my case, this problem was caused by blueman. I ended up uninstalling blueman altogether. Bluetooth does not turn on on startup any more. – Alexey Apr 30 '18 at 11:15
  • 1
    @Robert The normal and natural thing is for an OS to respect the settings made by its users, and not reset them on each login. The Bluetooth settings on Ubuntu 18.04–19.10 consistently fail to do this (at least on a recent Thinkpad), and automatically revert to Bluetooth on no matter what Settings choices the user has made in the past. The best possible OS would not behave this way, and therefore the OP's question has merit. – Lexible Nov 19 '19 at 17:18
  • 3
    @Lexible this setting is a "one-time" setting, it will also not be relevant if you switch to another user. But there is an easy option (both via command line and gui) as shown in the answer from @bmaupin - it is a pitty that it isn't marked as solution. – Simon Sobisch Apr 01 '20 at 18:04

34 Answers34

298

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
  • 845
  • 6
  • 9
Oli
  • 293,335
  • 7
    For Thinkpads (and only Thinkpads) this works: echo disable > /proc/acpi/ibm/bluetooth in /etc/rc.local – Marius Gedminas Nov 02 '11 at 19:51
  • "rfkill block bluetooth" option works for my Sony Vaio. Thanks a lot. – Bakhtiyor Nov 08 '11 at 23:13
  • Works with Toshiba Portégé M800 – Elmatou Jan 03 '12 at 10:07
  • @MariusGedminas Your suggested fix for thinkpads works like a charm on T420s – Jan Groth Jan 16 '12 at 15:23
  • 2
    'rfkill block bluetooth' worked for Thinkpad Edge 15 – AlikElzin-kilaka Oct 09 '12 at 09:29
  • rfkill block bluetooth worked for LG z430. Tks. – Jonathan Prates Feb 18 '13 at 15:40
  • 4
    rfkill block bluetooth worked for Thinkpad T430u – bmaupin Nov 15 '13 at 16:47
  • 5
    Neither worked for me (ThinkPad x201) when I placed them one at a time in /etc/rc.local. The rfkill block bluetooth command does work, but not on startup. The -x flag is set on /etc/rc.local. I'm running Xubuntu 13.10. – Kyle Falconer Dec 20 '13 at 07:34
  • 1
    rfkill block bluetooth works for ThinkPad T430s – Populus May 20 '14 at 14:04
  • rfkill block bluetooth works on ThinkPad L512, Ubuntu 10.04 – peipst9lker Jun 23 '14 at 08:52
  • rfkill block bluetooth works on ThinkPad E430, Xubuntu 14.04. – Jeyekomon Aug 28 '14 at 12:48
  • 4
    On Ubuntu 15.10 with systemd you need some more to reenable the use of the etc/rc.local file: http://askubuntu.com/a/696226/34298 – rubo77 Nov 10 '15 at 12:36
  • for me this worked on 15.10 without any extra work with systemd – netimen Dec 24 '15 at 08:37
  • echo disable > /proc/acpi/ibm/bluetooth worked on Thinkpad T420, ubuntu 14.04. – Niclas Börlin Jun 20 '16 at 07:47
  • 1
    rfkill block bluetooth works for elementaryOS Freya – Hoang Tran Jul 09 '16 at 13:39
  • Neither worked on Thinkpad-X250 + UbuntuStudio 16.04 LTS. –  Aug 07 '16 at 09:34
  • Works on Dell XPS 13, running Ubuntu 16.04 LTS. – Bib-lost Oct 12 '16 at 20:11
  • rfkill block bluetooth not working for ubuntu 16.04 on AsusPro notebooks – MinhajulAnwar Apr 19 '17 at 06:07
  • 5
    if our rc.local is just an empty file,where should we add 'rfkill block bluetooth'? – Sss Nov 25 '17 at 10:57
  • 3
    I can't pass by without expressing my amazement.. So you are saying we don't have a simple switch for THAT? – EralpB Feb 28 '18 at 10:27
  • Does not work for me. Dell XPS13. Ubuntu18.04. In fact, I had to create the said file, as it did not exist. Still did not work. – fffred Aug 07 '18 at 08:57
  • @fffred It also has to be executable for systemd to pick it up and run it. sudo chmod +x /etc/rc.local. I've added a chunk at the top of the answer for 18.04 users that creates the file and makes it executable in one fell swoop. – Oli Aug 07 '18 at 09:27
  • Did not work for 18.04.1. Neither did a few other answers involving adding bluetoothkill.sh and foo.service files to /etc/systemd/system/ – Sander Heinsalu Dec 23 '18 at 19:58
  • 1
    This is weird. It actually does and does not work for me...

    I created an /etc/rc.local file, and it does get executed (I know for sure, because I added some lines that write the current date and time to a file, before and after the rfkill block bluetooth line), but the bluetooth is still turned on when I restart...?!?
    When I run /etc/rc.local from the command line it does work (as in, the Bluetooth is turned off)...

    (I am on Ubuntu 18.04 LTS on a MacBook Pro (medio 2015)).

    – Tom Jan 06 '19 at 12:00
  • 1
    Ah, what helped for me is to also switch off Blueman-applet in the Startup Applications. To switch on Bluetooth, simply start Blueman again. – Tom Jan 06 '19 at 20:39
  • @Tom Same here. 2018 vintage P-series Thinkpad (using the extra line in the answer). – Lexible Mar 24 '19 at 16:18
  • I prefer the answer of editing the conf file, because this seam for me to be the normal way to configure a startup, not killing it with a second script. – Martin T. Jan 11 '20 at 11:18
  • 1
    You mean autoEnable=false to deactivate bluetooth? This is the default. – Timo May 03 '21 at 19:23
  • Setting AutoEnable=false in /etc/bluetooth/main.conf didn't work for me on 20.04. After reboot, Bluetooth is enabled again – DiDiev Aug 23 '21 at 08:11
  • @ScyDev that's not what that option is intended for, this works: https://askubuntu.com/a/817220/393264 – lasec0203 Sep 12 '21 at 02:38
  • As a non-root user on Debian 11, I had to call rfkill with its full path: /usr/sbin/rfkill block bluetooth. – countermeasure May 03 '22 at 08:52
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
  • 6
    doesn't work for samsung laptop 530u3b, bluetooth is always on after reboot and wake up – Maxim Kim Aug 27 '12 at 18:51
  • 4
    This would only work if I also used Saeed Zarinfam's answer of putting /etc/init.d/bluetooth stop in rc.local. It seems that when the service starts up, it also brings the power on for bluetooth. I needed both to get this to work. (ThinkPad x201, Xubuntu 13.10) – Kyle Falconer Dec 20 '13 at 07:57
  • 3
    Didn't work for me on thinkpad t420 – UpTheCreek May 10 '15 at 09:40
  • 1
    Shouldn't this be InitiallyPowered = false? – Jellicle May 14 '15 at 00:32
  • Doesn't work for Toshiba Z30-B100. – Daniel Jun 13 '15 at 17:52
  • It not only didn't work on my laptop. Now when I turn the bluetooth off, the icon won't become grayed, as before. – Rodrigo Aug 28 '15 at 12:26
  • doesn't work on ubuntu 14.04 / dell XPS 13. Also, it seems that controlloing state through tray icon stopped working. – b1r3k Sep 29 '15 at 10:25
  • 5
    "Search for the entry" is of precisely no use to those of us whose main.conf does not contain this parameter or any comment indicating its default location. So, under which [Heading] should we put it? – underscore_d Oct 30 '15 at 23:00
  • 1
    ^ Finding someone else's longer main.conf - since no actual documentation appears to exist - suggests they go under [General]. Anyway, they don't make any difference for me either, on Debian 8.2 with KDE. Like Kyle, I guess the service is in control. systemctl stop bluetooth results in BlueDevil saying BT is off; start does not change anything; right-clicking BD and "Turn on" starts the service (bluetoothd) again and puts BD back to 'on' mode. I guess I'll look at masking the service at boot. – underscore_d Oct 30 '15 at 23:28
  • 1
    The reason you don't see "InitiallyPowered" in "main.conf" anymore, is because they removed those settings from bluetoothd a few years ago.

    From the description in the mailing list, it sounds like they expect the initial power state to be controlled by an "external component" such as GNOME now. http://marc.info/?l=linux-bluetooth&m=138695456303364&w=2

    – Aaron Wells Feb 26 '17 at 19:27
  • 11
    On my case it was AutoEnable=false, but anyways +1 for right solution from right place. – Arman Apr 20 '17 at 05:50
  • None of this works in Xubuntu 17.10. – Adrian Keister Jan 30 '18 at 14:09
  • Does not work on Lubuntu 18.04 – Maris B. May 02 '18 at 14:15
  • right, in 18.04 it is AutoEnable. – MycrofD Aug 01 '18 at 14:19
  • 1
    Does not work for me. Dell XPS13, Ubuntu 18.04 – fffred Aug 07 '18 at 08:50
  • Did not work for 18.04.1. Neither did a few other answers involving adding bluetoothkill.sh and foo.service files to /etc/systemd/system/ – Sander Heinsalu Dec 23 '18 at 19:59
  • Setting AutoEnable to false didn work for me (Ubuntu 18.04) either... :-/ – Tom Jan 06 '19 at 10:32
  • Didn't work on LenovoT470s with Ubuntu 18.0.4.4LTS – Luca Camillo Feb 12 '20 at 06:36
  • Worked for me on elementaryOS. – phrogg Jul 01 '20 at 12:10
  • Works on Ubuntu 22.04 for Thinkpad T14 gen 2. – fIwJlxSzApHEZIl Aug 30 '22 at 13:34
  • Worked for me with Ubuntu 23.10 on ThinkPad E14 Gen 5. – Laurent Payot Dec 29 '23 at 10:47
53

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
  • 4
    This works for me, but as a side effect, blueman-applet stoppped to work too. It starts, but doesn't appear in the indicator area, so there is no fast way to enable bluetooth, only in terminal. – Yuri Gor Sep 02 '17 at 21:02
  • In Xubuntu, at least, if you click on Blueman, it has the option of "Turn Bluetooth Off". I think this is what the OP would like automated. Your solution removes Blueman altogether, making it harder to re-enable Bluetooth if desired. – Adrian Keister Jan 30 '18 at 14:08
  • 2
    Put sudo systemctl disable bluetooth.service && sudo systemctl stop bluetooth.service into a Disable script, and chmod 755 on it. Do the same for sudo systemctl enable bluetooth.service && sudo systemctl start bluetooth.service in an Enable script. – Adrian Keister Jan 30 '18 at 14:33
  • 2
    FINALLY! Ubuntu 18.10, the only thing that worked for me. Nothing else worked. – Tyler Feb 18 '19 at 13:02
  • 1
    ya, this is the correct solution.. – Jazuly Feb 15 '20 at 06:08
  • 1
    This should be the top answer. Worked perfectly for my ThinkPad T495! Thanks for sharing your solution! –  Feb 22 '20 at 13:21
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
  • 15,892
  • 1
    Thanks for that, that does seem to work but I was trying to avoid command line stuff as per my original question. You would think this would be as simple as ticking a box so that it remembered that I don't want BT to start automatically but it looks like its way more complicated than that. With Ubuntu's drive for quicker boot times and the general focus on power consumption in laptops and netbooks I am suprised that this has never been addressed. I appreciate the help though. –  Aug 19 '10 at 09:52
  • 10
    "Run gedit as root and edit /etc/modprobe.d/blacklist.conf" <-- ok, is that less command line for ya? – maco Aug 19 '10 at 13:35
  • 1
    Works fine on Samsung Q35 with Ubuntu 13.10, while the 'rfkill block bluetooth' approach does not. Thanks! – cubic lettuce Jan 06 '14 at 08:29
  • DELL E6410 works for me. Good that can run again on the go without reset. – Ruslan Gerasimov Jun 13 '14 at 10:24
  • Don't bother trying to "avoid command line stuff" when you are configuring the operating system. Is Ctrl+Alt+T and a couple of ctrl-shift-V (to paste) too much to ask? – doug65536 Aug 08 '16 at 00:15
  • This method was a bit too brutal on Xubuntu 16.04.2. I cannot reactivate the bluetooth using the normal bluetooth manager :-\ I am thinking on a method that turns it off, not that blocks it completely ;) – loved.by.Jesus May 10 '17 at 19:41
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
  • 3
  • 6
  • 1
    This is set soft block to bluetooth, I think it same as turn off its service and works well. – Smile.Hunter Aug 17 '12 at 13:45
  • @Robert: $ man rfkill: "Disable the device corresponding to the given index." Despite the name, it is only disabling BT; just try the command rfkill block bluetooth on the terminal, you should see the icon go gray. – Daniel Jun 13 '15 at 17:54
16

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
  • 4,930
  • 3
    In Ubuntu 18.04 this is the only solution I have found. Even if you change in /etc/bluetooth/main.conf, at the bottom, the option from AutoEnable=true to AutoEnable=false you cannot turn off the Bluetooth. In fact this option is for discovering new devices not for powering Bluetooth on or off. – Alessandro D'lncal Aug 19 '18 at 12:26
  • Disabling blueman/bluetooth applet Auto power-on will prevent it to enable bluetooth radio if it was previously disabled when the applet is starting (usually when logging in). Mine was already enabled just after booting, so I used tlp to manage bluetooth state (enabled or not) when computer is booting and voilà! See /etc/tlp.conf and/or the other answers. – Totor Nov 30 '20 at 17:44
  • I start a zsh shell, I have to put the rfkill block in the .zshrc, see here – Timo May 03 '21 at 19:30
  • 1
    @Timo I used ~/.profile in my answer because it's shell-agnostic. However, "Zsh runs ~/.zprofile, not ~/.profile, when it is invoked as a login shell. The reason is that zsh has enough incompatibilities with standard shells to break scripts." (https://superuser.com/a/187673/93066). I've updated my answer to reflect this. Thanks! – bmaupin May 04 '21 at 13:16
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
  • 32,486
  • 4
    For me on Ubuntu 17.04 with blueman: gsettings set org.blueman.plugins.powermanager auto-power-on false worked, from https://wiki.archlinux.org/index.php/Blueman. Although I ended up doing sudo apt remove blueman then manage bluetooth through system settings and check "Show Bluetooth status in the menu bar". Blueman starting and turning on bluetooth was the issue. – Michael Jackson Sep 28 '17 at 14:29
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.

Thomas Sablik
  • 265
  • 1
  • 3
  • 13
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,155
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
  • 32,917
  • Thank you, desgua, I was thinking about this kind of tools. I have used some in the past but they become obsolete and the new ubuntu, with their minimalistic obsession, comes with nothing of the kind. Is this the only yo know or the best yo know? – Robert May 05 '12 at 00:15
  • 1
    Maybe works but at first it has disappointed me because it started showing the bluetooth as not activated at boot time, why? and as not running when rfkill, the applet and hciconfig show it running. I turn off and on but bum continues showing the service as off. I activated the service at boot-up but the status of the service continues to be wrong. – Robert May 05 '12 at 01:26
  • sorry doesn't work on elementaryOS Freya – Hoang Tran Jul 09 '16 at 13:31
  • I get lots of "use of uninitialized value" warnings when it runs. Sorry, can't trust that. – doug65536 Aug 08 '16 at 00:21
  • Now, the package is not available. It say, Bum is virtual. – Satya Prakash Jul 26 '17 at 19:27
  • Ubuntu has moved to systemd so to enable or disable service we have to use "systemctl disable something". – desgua Jul 27 '17 at 12:13
  • The name of BUM in the Software app is BootUp-Manager. – karel Feb 20 '18 at 17:45
6

I add

"/etc/init.d/bluetooth stop"

into

"/etc/rc.local" 

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

Seth
  • 58,122
  • This removed the bluetooth tray icon but left my bluetooth indicator light on (indicating power was still being sent to the radio). Edit: this in conjunction with Stepbaer's answer (InitiallyPowered = false) worked for me. (ThinkPad x201, Xubuntu 13.10) – Kyle Falconer Dec 20 '13 at 07:59
  • this did not work on my 64-bit Ubuntu 14.04 dell inspiron. Only rfkill worked for me. – faizal Jun 17 '14 at 07:19
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
  • 1
  • 1
  • how to turn on bluetooth, while using provided settings later on? say I want to use it just for 5 min. every 10 boots.. – b1r3k Oct 10 '15 at 14: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
  • 5
  • 17
  • 1
    This is a perfectly good solution on my Xubuntu 17.10 machine, except for one thing: if the user wants to start using bluetooth again on the fly, he needs to execute sudo systemctl enable bluetooth.service && sudo systemctl start bluetooth.service. But your solution definitely solves the bootup problem. – Adrian Keister Jan 30 '18 at 14:52
  • This is the "just works" solution. – lasec0203 Sep 12 '21 at 02:40
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,503
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,670
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,547
victor
  • 73
  • 5
  • Do you think that sudo smbios-wireless-ctl --boot --bt 0 would work? Also, I'm not sure, but this may be Dell-specific. – Hitechcomputergeek May 02 '15 at 18:48
  • Actually, the package smbios-utils performs bios commands, so it switches on and off physical devices related to bios, so you may also use it to switch on and off wifi etc. I'm not sure if it works with any bios or not. At least, it works well with Dell. By the way, the last installations of Ubuntu 14.04 do same things with bluetooth and wifi applets, so I don't need any more in that package. – victor May 03 '15 at 19:22
  • I knew that. But if you do smbios-wireless-ctl --help, part of it has --boot Set BIOS boot-time setting. I didn't know they fixed the Bluetooth, though; thanks for telling me. – Hitechcomputergeek May 04 '15 at 21:29
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
  • 592
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
  • 9
  • 19
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.

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
  • 763
  • 2
  • 10
  • 29
1

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

Eliah Kagan
  • 117,780
1

I think you should edit

/etc/default/bluetooth

and set

BLUETOOTH_ENABLED=0

to disable the bluetooth service at boot

Fabio
  • 11
  • 1
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
  • 168
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
  • 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
  • 43,546
  • 8
  • 97
  • 150
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
  • 9
-1

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

deFreitas
  • 258
  • 3
  • 13
-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
  • 41,766
-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,289
  • 2
    I can't find bluetooth in the Start Up Applications.. – Floqqi Oct 16 '11 at 21:40
  • 5
    That doesn't actually stop the Bluetooth subsystems and hardware from running (and importantly: consuming battery). It just stops the applet running. – Oli Oct 16 '11 at 23:59
  • @Oli - thanks for the heads up, I never actually knew that ! I assumed if you disabled it in the start up applications it did not start the process at all. – Mark Rooney Oct 17 '11 at 09:44
  • 1
    Sadly, it's not in the startup applications in 11.10. – Amanda Jan 28 '12 at 01:24