GNOME Bugzilla – Bug 741675
Bluetooth is blocked and says "visible as Foobar"
Last modified: 2016-05-19 10:09:19 UTC
When I launch Settings, click on the bluetooth icon and enable bluetooth, it says "visible as Foobar" and it doesn't connect to any devices, nor is it able to discover any devices. Running 'rfkill list' in this state tells me the following about the bluetooth device: 8: hci0: Bluetooth Soft blocked: yes Hard blocked: no When I run 'rfkill unblock 8' it will start to work correctly. I think Gnome's Settings app should take care of unblocking when the device is turned on.
What's the output of: ls -l /dev/rfkill and getfacl /dev/rfkill when reproducing the problem?
Here's the output: [Timur@Timur-Zenbook ~]$ ls -l /dev/rfkill crw-rw-r--+ 1 root root 10, 59 dec 17 19.23 /dev/rfkill [Timur@Timur-Zenbook ~]$ getfacl /dev/rfkill getfacl: Removing leading '/' from absolute path names # file: dev/rfkill # owner: root # group: root user::rw- user:Timur:rw- group::rw- mask::rw- other::r-- [Timur@Timur-Zenbook ~]$
Issue is still present on a fresh Fedora 22 install.
Is gnome-settings-daemon running? What's the output of: gdbus introspect --session --dest org.gnome.SettingsDaemon.Rfkill --object-path /org/gnome/SettingsDaemon/Rfkill ?
Hi Bastien, here is the output: http://pastebin.com/48X9NkkN
One more thing: ever since I did this rfkill unblock thing, Gnome always turns on my bluetooth adapter after my laptop returns from sleep mode, even if it was turned off before going to sleep.
(In reply to Timur Kristóf from comment #6) > One more thing: ever since I did this rfkill unblock thing, Gnome always > turns on my bluetooth adapter It's not GNOME turning it on. GNOME doesn't touch the power of Bluetooth adapters. > after my laptop returns from sleep mode, even > if it was turned off before going to sleep. Those values from gnome-settings-daemon are correct: readwrite b BluetoothAirplaneMode = true; readonly b BluetoothHardwareAirplaneMode = false; readonly b BluetoothHasAirplaneMode = true; Can you please post (inline, or as an attachment, not in a pastebin) the output of "gnome-control-center -v bluetooth" and try to reproduce the problem?
Reproduced with 3.18 - this time it says "Bastien's computer" instead of "Foobar". Here is the output of the above command: http://pastebin.com/faG9sMJ9 Works correctly after running 'rfkill unblock 0'. Here: http://pastebin.com/jE7R8Rnw
The later problems are due to changes in newer versions of bluez and the kernel, which instead of unblocking the rfkill when SetPowered is called will fail saying that the rfkill was on, so won't turn the device on.
*** Bug 760062 has been marked as a duplicate of this bug. ***
Mailed the linux-bluetooth list about recent rfkill/Powered changes: http://thread.gmane.org/gmane.linux.bluez.kernel/66233 There's a hint of a work-around in there, which I'll probably attempt to implement if I don't receive any satisfactory updates soon.
Hello Bastien, Thanks for following up with this. I've read your letter to the mailing list and I'm in a similar situation. I have an Asus UX31A laptop and rfkill thinks that it has two bluetooth devices, one called asus-bluetooth and another called hci0. After a bootup, asus-bluetooth is soft blocked and hci0 isn't there. Only after I unblock asus-bluetooth does hci0 appear, also blocked. So I guess that Gnome does not know that it should also unblock the newly appearing hci0 after unblocking asus-bluetooth. For example: http://pastebin.com/eeVQxxVf Side note: if I boot the machine without the asus-nb-wmi kernel module, there is only a hci0 device, no asus-bluetooth. However in that case several other things don't work properly, so it is not a proper solution to this problem to simply blacklist this kernel module. Best regards, Timur
I've fixed the main problem in gnome-settings-daemon, which I've cherry-picked to gnome-3-18 and gnome-3-16. There's still a short window during which the placeholder text is visible, which I will track in https://bugzilla.gnome.org/show_bug.cgi?id=760168 If you still see the placeholder text for more than a couple of seconds, and you have a version of gnome-settings-daemon with those changes, please file a new bug, it will help me with test cases. commit ed7c0e2e62e725546b5816dedc85a93473f1e4b3 (HEAD -> master, origin/master, origin/HEAD) Author: Bastien Nocera <hadess@hadess.net> Date: Tue Jan 5 18:17:14 2016 +0100 rfkill: Use new _send_change_all_event() helper This fixes problems when the system has a platform rfkill device for Bluetooth and the Bluetooth adapter's rfkill support somehow got blocked. https://bugzilla.gnome.org/show_bug.cgi?id=741675 commit 5f29c37ed0fd8c7496a071b8b5fa74cd861e1886 Author: Bastien Nocera <hadess@hadess.net> Date: Tue Jan 5 18:13:06 2016 +0100 rfkill: Add _send_change_all_event() helper Add helper to re-send an enablement event after it's been sent once to make sure that unblocking a Bluetooth platform rfkill will also unblock the Bluetooth adapter that might appear. commit 5c4f1a7323b45db13c71639e57819632873c4dd2 Author: Bastien Nocera <hadess@hadess.net> Date: Tue Jan 5 18:12:36 2016 +0100 rfkill: Fix indentation commit c626c5a3f0b313d0f7b8f78e75d87674625f8571 Author: Bastien Nocera <hadess@hadess.net> Date: Tue Jan 5 18:12:13 2016 +0100 rfkill: Better debug message in unexpected event commit 750d7e0c2224c7b323090b672b49c1ffea56591a Author: Bastien Nocera <hadess@hadess.net> Date: Tue Jan 5 15:55:13 2016 +0100 rfkill: Make rfkill kernel calls cancellable commit 11587b52e1c701abd0668a4a4107c8979a01e451 Author: Bastien Nocera <hadess@hadess.net> Date: Tue Jan 5 15:36:11 2016 +0100 rfkill: Fix typo in rfkill type
Thank you Bastien for fixing it. I'll test it when I can (that is, when the fix makes it into a release package for Fedora).
Looks another string saying “Bastien's computer” and having the wrong Downloads link was missed: https://git.gnome.org/browse/gnome-bluetooth/tree/lib/settings.ui#n387 https://codesearch.debian.net/search?q=package%3Agnome-bluetooth+Bast.*omputer
(In reply to Paul Wise from comment #15) > Looks another string saying “Bastien's computer” and having the wrong > Downloads link was missed: > > https://git.gnome.org/browse/gnome-bluetooth/tree/lib/settings.ui#n387 > https://codesearch.debian.net/search?q=package%3Agnome-bluetooth+Bast. > *omputer So what? You saw it in the UI? You're just slinging mud, and wasting my time (on multiple bugs at that). And if you saw it, file a new bug.
Hey Bastien, I'm running Gnome 3.18.2 now. The issue is mostly fixed, but sometimes when I try to enable Bluetooth after the laptop came out of sleep, it still happens. (And I still see the "Visible as Bastien's computer" string.) Does this belong here or should I open a new bug for that?
(In reply to Timur Kristóf from comment #17) > Hey Bastien, > > I'm running Gnome 3.18.2 now. The issue is mostly fixed, but sometimes when > I try to enable Bluetooth after the laptop came out of sleep, it still > happens. (And I still see the "Visible as Bastien's computer" string.) > > Does this belong here or should I open a new bug for that? Neither. Make sure you've upgraded to the latest stable, that's 3.18.3 for gnome-settings-daemon and gnome-bluetooth. If you can reproduce then, file a new bug.