Ubuntu – How to enable bluetooth at startup 16.04 LTS

16.04bluetooth

I know there is a post for the same question for Ubuntu 14.04 (Enable Bluetooth at startup on 14.04). I tried to modify the rc.local file (with sudo gedit /etc/rc.local) by adding the rfkill unblock all line before exit 0. However, it still does not work after reboot. The Bluetooth works very well after I sign in with the password, but I really want to use the Bluetooth keyboard to enter the password.

Best Answer

Please edit /etc/bluetooth/main.conf.

By default in Xenial, bluetooth is not power on.[1] rfkill unblock all only unblocks the device if the device is on service and blocked. So what you need is to power on the device and make sure that the daemon, bluetoothd, is working. Thus, you may consider to edit /etc/bluetooth/main.conf to control the behavior.

You may try to change the line to be DiscoverableTimeout = 0 or add lines like

[Policy]
AutoEnable=true

Please refer to man bluetoothd, man /etc/bluetooth/main.conf and https://wiki.archlinux.org/index.php/bluetooth as well to fit your requirement.

[1] The bluetooth stack differs from Trusty to Xenial, including how they are started at the system booting time. This is maybe the reason why your trusty post does not help. This is too much detailed and I won't go through the details of this story.

Related Question