[gnome-bluetooth] No Bluetooth Found, Plug in a dongle to use Bluetooth
hadess at hadess.net
Sat Dec 31 05:57:11 EST 2016
On Sat, 2016-12-31 at 00:39 +0100, Bjørn Forsman wrote:
> On 19 July 2016 at 13:30, Bjørn Forsman <bjorn.forsman at gmail.com>
> > I'm trying to get gnome-bluetooth working on NixOS, but I'm facing
> > a
> > blocking issue.
> > [...]
> > The problem:
> > The "gnome-control-center bluetooth" GUI says "No Bluetooth Found"
> > and
> > "Plug in a dongle to use Bluetooth", even though I have a working
> > bluetooth dongle.
> > Turning on verbose output, I see this:
> > $ gnome-control-center -v bluetooth
> > ** (gnome-control-center:15062): DEBUG: Enabling debugging
> > ** (gnome-control-center:15062): DEBUG: No extra argument
> > (gnome-control-center:15062): Bluetooth-DEBUG: Default adapter
> > changed
> > to: (none)
> > (gnome-control-center:15062): bluetooth-cc-panel-DEBUG: Updating
> > airplane mode: BluetoothHasAirplaneMode 0,
> > BluetoothHardwareAirplaneMode 0, BluetoothAirplaneMode 0,
> > AirplaneMode
> > 0
> > (gnome-control-center:15062): bluetooth-cc-panel-DEBUG: No
> > Bluetooth available
> I had another look and found the source of the problem.
> /dev/rfkill was lacking write permissions.
This is a bug on your system/distribution. We've been shipping a rules
file to get read/write permissions on the /dev/rfkill device for 3
years now (commit cefd910 in gnome-settings-daemon).
> Basically this happens:
> 1. gnome-settings-daemon complains at startup: "Could not open RFKILL
> control device, please verify your installation". (I didn't notice
> before, the log is full of warnings...)
> 2. "gnome-control-center bluetooth" asks gnome-settings-daemon (over
> D-Bus) for "BluetoothHasAirplaneMode". Because the
> gnome-settings-daemon couldn't open /dev/rfkill in RW mode it says
> "no" (0).
> 3. "gnome-control-center bluetooth" concludes that there are no
> bluetooth dongles, because of that BluetoothHasAirplaneMode == 0
> thing. See source code at
> My first impression is that step 3 is a bug, because I can use
> "bluetoothctl" to connect/pair bluetooth devices just fine without
> write permissions to /dev/rfkill. So why should not the GUI work?
Because bluetoothctl doesn't provide what we need, and it connects to
bluetoothd which runs as root to do its work. We could either have
written a D-Bus service running as root, or required access to
/dev/rfkill. We chose the latter.
More information about the gnome-bluetooth