Currently systemd-rfkill does not support devices that lose power over suspend and do a disconnect()/probe() cycle (when the driver does not implement a reset_resume() callback): systemd-rfkill will restore the RFKill state that was saved on the last shutdown instead of the one right before suspending when udev detects the device was plugged. This happens for some Realtek Bluetooth adapters which lose their firmware during suspend.
A fix for this problem is to add a udev rule to save the RFKill state on every change, so systemd-rfkill always have the most up-to-date state. This also removes the need for saving the RFKill state on shutdown, so systemd-rfkill@.service does not have to be active until shutdown, which in turn removes the need for the RFKill device units. This is also aligned with an item from systemd's TODO list (line 453). PS: Please let me know if this is not the preffered way of sending patches to systemd, as I've seen some activity on github. I can prepare a PR if needed. João Paulo Rechi Vita (1): rfkill: Rework systemd-rfkill Makefile-man.am | 12 ------ Makefile.am | 6 --- TODO | 2 +- man/kernel-command-line.xml | 7 ++-- man/systemd-rfk...@.service.xml | 88 ---------------------------------------- rules/99-systemd.rules.in | 5 ++- units/.gitignore | 1 - units/systemd-rfk...@.service.in | 23 ----------- 8 files changed, 7 insertions(+), 137 deletions(-) delete mode 100644 man/systemd-rfk...@.service.xml delete mode 100644 units/systemd-rfk...@.service.in -- 2.1.4 _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel