Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

The usual way to remove services from startup scripts is to remove it from starting up in the first place (man update-rc.d). Meaning removing the symbolic link to /lib/init. In this case executing should do the job:

update-rc.d -f bluetooth remove

But why this does not work in the case of bluetooth deamon? Can someone explain a little deeper what is going on? And if I remove the link by force is the bluetooth chip/hardware still eating my battery?

Here is what happens:

    sudo update-rc.d -f bluetooth remove

 Removing any system startup links for /etc/init.d/bluetooth ...

    sudo ls -la /etc/init.d/ | grep bluetooth

lrwxrwxrwx   1 root root    21 Mar 21  2012 bluetooth -> /lib/init/upstart-job*

So the link remains.

And there seems to be other confused people [1] [2] trying different solutions to the bluetooth behaviour.

[1] How can I deactivate Bluetooth on system startup? [2] How to boot with bluetooth turned off

share|improve this question

1 Answer 1

update-rc.d is indeed the usual way...to change a sysvinit (not upstart, not systemd) init priority.

Those sysvinit scripts are in /etc/init.d

But Upstart doesn't use update-rc.d nor /etc/init.d (except for legacy compatibility). So the short answer to your question is that the bluetooth software uses Upstart jobs instead of sysvinit scripts.

One good way to permanently disable an upstart job is to rename the .conf file.

Example:

sudo service bluetooth stop
sudo mv /etc/init/bluetooth.conf /etc/init/bluetooth.conf.disabled

You can re-enable by changing the name back to bluetooth.conf without a restart.

sudo mv /etc/init/bluetooth.conf.disabled /etc/init/bluetooth.conf
sudo service bluetooth start

You change the dependencies of automatic startup by editing the .config file.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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