This still seems to be a problem on Ubuntu 19.04. Ie, if I do:
$ sudo systemctl status systemd-rfkill
● systemd-rfkill.service - Load/Save RF Kill Switch Status
Loaded: loaded (/lib/systemd/system/systemd-rfkill.service; static; vendor preset:
...
$ rfkill block bluetooth
$ rfkill
ID TYPE DEVICE SOFT HARD
0 wlan phy0 unblocked unblocked
1 bluetooth hci0 blocked unblocked
$ sudo reboot
Then I get:
$ rfkill
ID TYPE DEVICE SOFT HARD
0 wlan phy0 unblocked unblocked
1 bluetooth hci0 unblocked unblocked
and I can see that the state files in /var/lib/systemd/rfkill were not updated as part of the reboot:
$ cat /var/lib/systemd/rfkill/*bluetooth
0
However, I can workaround this manually by running 'sudo /lib/systemd/systemd-rfkill' prior to reboot myself:
$ rfkill block bluetooth
$ rfkill
ID TYPE DEVICE SOFT HARD
0 bluetooth hci0 blocked unblocked
1 wlan phy0 unblocked unblocked
$ sudo /lib/systemd/systemd-rfkill
$ cat /var/lib/systemd/rfkill/*bluetooth
1
$ reboot
$ rfkill
ID TYPE DEVICE SOFT HARD
0 bluetooth hci0 blocked unblocked
1 wlan phy0 unblocked unblocked
$ cat /var/lib/systemd/rfkill/*bluetooth
1
In this manner, I can at least have bluetooth in a predictable state. However, the desirable behavior is likely to have the current state preserved across reboots. Looking at /lib/systemd/system/systemd-rfkill.service, it appears all that is missing is an ExecStop=/lib/systemd/systemd-rfkill....
This still seems to be a problem on Ubuntu 19.04. Ie, if I do:
$ sudo systemctl status systemd-rfkill rfkill. service - Load/Save RF Kill Switch Status system/ systemd- rfkill. service; static; vendor preset:
● systemd-
Loaded: loaded (/lib/systemd/
...
$ rfkill block bluetooth
$ rfkill
ID TYPE DEVICE SOFT HARD
0 wlan phy0 unblocked unblocked
1 bluetooth hci0 blocked unblocked
$ sudo reboot
Then I get:
$ rfkill
ID TYPE DEVICE SOFT HARD
0 wlan phy0 unblocked unblocked
1 bluetooth hci0 unblocked unblocked
and I can see that the state files in /var/lib/ systemd/ rfkill were not updated as part of the reboot:
$ cat /var/lib/ systemd/ rfkill/ *bluetooth
0
However, I can workaround this manually by running 'sudo /lib/systemd/ systemd- rfkill' prior to reboot myself:
$ rfkill block bluetooth systemd- rfkill systemd/ rfkill/ *bluetooth systemd/ rfkill/ *bluetooth
$ rfkill
ID TYPE DEVICE SOFT HARD
0 bluetooth hci0 blocked unblocked
1 wlan phy0 unblocked unblocked
$ sudo /lib/systemd/
$ cat /var/lib/
1
$ reboot
$ rfkill
ID TYPE DEVICE SOFT HARD
0 bluetooth hci0 blocked unblocked
1 wlan phy0 unblocked unblocked
$ cat /var/lib/
1
In this manner, I can at least have bluetooth in a predictable state. However, the desirable behavior is likely to have the current state preserved across reboots. Looking at /lib/systemd/ system/ systemd- rfkill. service, it appears all that is missing is an ExecStop= /lib/systemd/ systemd- rfkill. ...