Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Possible Duplicate:
Deactivate Bluetooth on startup

I don't want to turn off the bluetooth device every time I boot, to save energy and for safety. I want it on on certain occasions during a short time only. So I rather turn it on (it takes 4 seconds) before using it. That should be the natural default configuration. What is going on?

share|improve this question
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 4 '12 at 20:25
1  
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 4 '12 at 20:30
We agree that letting people choose is the best option. See here for some possible ways of doing this. answers.launchpad.net/ubuntu/+source/bluez/+question/51440 – roadmr May 4 '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 4 '12 at 20:32
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 4 '12 at 20:47
show 3 more comments

marked as duplicate by Eliah Kagan, Jorge Castro, Mitch, Uri Herrera, SirCharlo Aug 24 '12 at 15:34

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

6 Answers

Step 1: Go to terminal and type following commands to edit /etc/rc.local file.

gksudo gedit /etc/rc.local

Step 2: Add following line before exit 0 line:

sudo rfkill block bluetooth
share|improve this answer
1  
rfkill block bluetooth.......What does that?. I don't want to suppress the use of bluetooth. I just want to have the service on but turned off. Like so many people and like you do in many devices and systems. Why not in the new Ubuntu? Can't it be like in previous releases? – Robert May 4 '12 at 22:55
This is set soft block to bluetooth, I think it same as turn off its service and works well. – Smile Aug 17 '12 at 13:45

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".

share|improve this answer
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 5 '12 at 0:15
It always worked fine so I never look for another tool... – desgua May 5 '12 at 0:21
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 5 '12 at 1:26
Sorry. I think BUM is not the way to set this then. My mistake. I don't have bluetooth to test. – desgua May 5 '12 at 1:30

I found a how-to with a clean "workaround":

http://catlingmindswipe.blogspot.com/2012/05/how-to-disable-bluetooth-on-startup.html

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

InitiallyPowered = true

was enough for me.

share|improve this answer
doesn't work for samsung laptop 530u3b, bluetooth is always on after reboot and wake up – Maxim Kim Aug 27 '12 at 18:51

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!)

share|improve this answer

I add

"/etc/init.d/bluetooth stop"

into

"/etc/rc.local" 

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

share|improve this answer
this worked for me, thanks! – woohoo Oct 12 '12 at 23:03

This is what works for me, on 12.04 http://askubuntu.com/a/2568

share|improve this answer
I restarted the bluetooth daemon. Now the applet not only turns on/off but it shows more options wen it is on. Moreover, now the configuration window shows the on/off state. But now the problem is that if you turn it on and off on the config window it changes the state of the visibility! and then the power and if you turn on/ff and change visibility state on the applet you discover that nothing bears any relationship with anything and that the program seems done by my nephew which is eight years old, haha, this is crazy!! Is that the LiveCD, the driver I am using, or is it for everyone? – Robert May 4 '12 at 21:10
The use of the rfkill tool helped me pin down at least one of the errors. Do you also experience it? When I turn on the bluetooth device on the applet, the change is not reflected in the settings window until I close it and open it again. That does not happen with the visibility, but I have the feeling that there are more errors. Someone should review and fix that. – Robert May 4 '12 at 23:30
hciconfig can't turn the bluetooth device on if rfkill blocked it but it can turn it down and rfkill list does not show it blocked. So? What's going on? What is the difference between the un/blocking through rfkill and des/actvation through hciconfig? – Robert May 4 '12 at 23:57
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.config ...... Thank you for your help. But still there is some kind of error in the configuration window of the applet. – Robert May 5 '12 at 0:07
@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 – Stephen Myall Aug 17 '12 at 10:22

Not the answer you're looking for? Browse other questions tagged or ask your own question.