[systemd-devel] powering on bluetooth after suspend - required services aren't ready

lukash lukkash at email.cz
Sat Sep 26 08:25:42 PDT 2015


Hi all.

When a system wakes from suspend, the Bluetooth adapter needs to be
explicitly powered on. This can be conveniently done by a systemd
service file, as described for example on Archlinux wiki [1] (the
systemd service file at the bottom of the section).

The hciconfig binary used to work up to kernel 4.1.5, with 4.1.6 and up
it stops working with Bluetooth LE (4.0) devices. The tool is
deprecated, instead a dbus call (ie. the commented line in the systemd
service file in [1]) or another tool, btmgmt, can be used to power on
the Bluetooth adapter.

The problem is neither of these tools work at the time systemd invokes
them, they require the bluetooth daemon to reinitialize itself after
resume (at least for the dbus call it needs to listen on dbus, not sure
about the btmgmt tool). Normally systemd handles this gracefully, but
after resume, the required services appear ready to systemd while they
aren't.

What is the proper solution to this problem?

Best Regards
Lukas

[1] https://wiki.archlinux.org/index.php/Bluetooth#Bluetoothctl


More information about the systemd-devel mailing list