bluedevil rfkill

David Rosca nowrep at
Fri Apr 10 14:20:55 UTC 2015

On Fri, Apr 10, 2015 at 12:58 PM, Jonathan Riddell <jr at> wrote:
> Hi David, I see you say:

Hi Jonathan,

> could you explain to us distro packagers what rfkill is and how
> distros can provide access to /dev/rfkill? (and why doesn't this have
> a better interface through bluez?)

Basically, rfkill provides a way to block radio devices (Bluetooth,
Wi-Fi, ..) so that
they stop consuming power. On some laptops, the led for Bluetooth will
only light off
when Bluetooth is blocked through rfkill (setting adapter powered to
false via Bluez
is not enough).
rfkill is accessed through /dev/rfkill device. For more info, see [1].

By default, /dev/rfkill is rw for root and r-only for others. However,
Bluedevil needs
a write acces to be able to block/unblock Bluetooth.

Exactly the same situation was in gnome-bluetooth, where it was solved by
distributions shipping an udev rules file [2].

Current gnome-bluetooth versions moved the rfkill handling to
and the udev rules file was moved to upstream [3]. It can be done the same way
in Bluedevil (installed by Bluedevil itself), but I am not sure if it
is a good idea.

As to why there is no better interface in Bluez. Well, I have no idea.
For example, NetworkManager does expose a rfkill state for network
devices (except
Bluetooth), but Bluez does not.

I would suggest to use [2] udev rule.



More information about the release-team mailing list