rfkill state is not restored on reboot

Bug #1548057 reported by Adam Groszer
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

1. Disable bluetooth via applet.
2. Reboot.
3. Login.
4. Observe bluetooth is re-enabled!

For fun having

rfkill block bluetooth

in rc.local does not work either

ProblemType: Bug
DistroRelease: Ubuntu 15.10
Package: rfkill 0.5-1ubuntu2
ProcVersionSignature: Ubuntu 4.2.0-27.32-generic 4.2.8-ckt1
Uname: Linux 4.2.0-27-generic x86_64
NonfreeKernelModules: fglrx
ApportVersion: 2.19.1-0ubuntu5
Architecture: amd64
CurrentDesktop: XFCE
Date: Sun Feb 21 13:37:39 2016
InstallationDate: Installed on 2013-05-17 (1010 days ago)
InstallationMedia: Xubuntu 13.04 "Raring Ringtail" - Release amd64 (20130423.1)
SourcePackage: rfkill
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Adam Groszer (agroszer) wrote :
Revision history for this message
Steve Langasek (vorlon) wrote :

This is now handled by the systemd package (/lib/systemd/systemd-rfkill; /lib/systemd/system/rfkill.service). And yes, it is buggy from what I can see.

affects: rfkill (Ubuntu) → systemd (Ubuntu)
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

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....

Revision history for this message
Dan Streetman (ddstreet) wrote :

please reopen if this is still an issue

Changed in systemd (Ubuntu):
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.