After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 741675 - Bluetooth is blocked and says "visible as Foobar"
Bluetooth is blocked and says "visible as Foobar"
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: plugins
3.18.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
: 760062 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-12-17 19:47 UTC by Timur Kristóf
Modified: 2016-05-19 10:09 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Timur Kristóf 2014-12-17 19:47:47 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.
Comment 1 Bastien Nocera 2014-12-18 07:13:16 UTC
What's the output of:
ls -l /dev/rfkill
and
getfacl /dev/rfkill
when reproducing the problem?
Comment 2 Timur Kristóf 2014-12-18 08:29:29 UTC
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 ~]$
Comment 3 Timur Kristóf 2015-05-10 16:37:34 UTC
Issue is still present on a fresh Fedora 22 install.
Comment 4 Bastien Nocera 2015-05-13 11:46:57 UTC
Is gnome-settings-daemon running?

What's the output of:
gdbus introspect --session --dest org.gnome.SettingsDaemon.Rfkill --object-path /org/gnome/SettingsDaemon/Rfkill
?
Comment 5 Timur Kristóf 2015-05-14 08:49:01 UTC
Hi Bastien, here is the output: http://pastebin.com/48X9NkkN
Comment 6 Timur Kristóf 2015-05-14 08:49:54 UTC
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.
Comment 7 Bastien Nocera 2015-05-15 09:52:57 UTC
(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?
Comment 8 Timur Kristóf 2015-11-11 01:14:41 UTC
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
Comment 9 Bastien Nocera 2016-01-04 13:51:33 UTC
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.
Comment 10 Bastien Nocera 2016-01-04 13:52:40 UTC
*** Bug 760062 has been marked as a duplicate of this bug. ***
Comment 11 Bastien Nocera 2016-01-04 15:58:09 UTC
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.
Comment 12 Timur Kristóf 2016-01-04 21:50:46 UTC
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
Comment 13 Bastien Nocera 2016-01-05 17:32:05 UTC
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
Comment 14 Timur Kristóf 2016-01-06 16:02:15 UTC
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).
Comment 15 Paul Wise 2016-04-27 09:04:55 UTC
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
Comment 16 Bastien Nocera 2016-04-27 09:09:47 UTC
(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.
Comment 17 Timur Kristóf 2016-05-19 06:22:36 UTC
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?
Comment 18 Bastien Nocera 2016-05-19 10:09:19 UTC
(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.