There is a bug in Ubuntu that prevents bluetoothd from starting when the computers wakes up from hibernate. So far there is no solution. I am fed upstarting bluetoothd manually every time, I think a possible workaround may be to automatically do the following on waking up:
- Check if bluetoothd is running.
- If it is not running, start it.
I would appreciate if someone could give me an advice on how to implement that. Which startup script executes when Ubuntu wakes up from hibernate? How to check if the daemon is running?
You should drop the file in /etc/pm/sleep.d . All the scripts in this dir are executed when a power manage event happens. You can check the first parameter to know what event has invoked the script.
There is a nice example in this answer
If you get a login screen when your computer wakes-up, a simple solution will be to add
service bluetooth start
to your~/.profile
because GNOME will execute commands in this file when you login. If you dont use GNOME or if you dont get a login screen then you can add a file to /etc/pm/sleep.d with followiing lines in itthis will script will start bluetooth service i.e bluetoothd whenever your system comes back from sleep/hibernation