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 760168 - "Visible as Bastien's computer" shows up for a short period
"Visible as Bastien's computer" shows up for a short period
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Bluetooth
git master
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-01-05 17:29 UTC by Bastien Nocera
Modified: 2016-01-10 15:03 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Bastien Nocera 2016-01-05 17:29:24 UTC
Follow-up to bug 741675.

To reproduce:
$ rfkill list
0: tpacpi_bluetooth_sw: Bluetooth
	Soft blocked: no
	Hard blocked: no
2: phy0: Wireless LAN
	Soft blocked: no
	Hard blocked: no
25: hci0: Bluetooth
	Soft blocked: yes
	Hard blocked: no
$ rfkill block 0

And re-enable Bluetooth in the panel.

Postponing the call in emit_changed_signal_and_free() will make the problem obvious.
Comment 1 Bastien Nocera 2016-01-10 15:03:09 UTC
The gnome-bluetooth part of this bug:
commit 00c9870fee2f5d3dfdb21ad564e7ed309befb63c
Author: Bastien Nocera <hadess@hadess.net>
Date:   Sun Jan 10 15:55:04 2016 +0100

    build: Bump version number for new API
    
    This API is internal to GNOME, and isn't useful to applications, so we
    take the responsibility of adding it in a stable branch.

commit c24cd2427e9927a7f695aedd17576ed3ca412a17
Author: Bastien Nocera <hadess@hadess.net>
Date:   Sun Jan 10 15:52:49 2016 +0100

    settings: Emit adapter-changed-signal
    
    When the default adapter changes, or when it gets powered on.
    
    This will allow the Bluetooth settings panel to monitor the status of
    transitioning adapters, when Bluetooth rfkill is disabled, but the hciX
    adapter is unpowered/rfkilled.
    
    See https://bugzilla.gnome.org/show_bug.cgi?id=760168

commit bd3b6f03ab3f96bde3665b74187a0c932592c17e
Author: Bastien Nocera <hadess@hadess.net>
Date:   Sun Jan 10 14:46:31 2016 +0100

    settings: Export the state of the Bluetooth adapter
    
    So that we can avoid showing filler text when the Bluetooth adapter is
    powered off/rfkilled but the overall Bluetooth rfkill is off.
    
    See https://bugzilla.gnome.org/show_bug.cgi?id=760168

And the gnome-control-center part of it:
commit 4a009da483e96ea1763855f419da64c9e2468a34
Author: Bastien Nocera <hadess@hadess.net>
Date:   Sun Jan 10 15:51:25 2016 +0100

    bluetooth: Don't change the switch status when transitioning
    
    When transitioning from an enabled platform rfkill to disabled, the
    Bluetooth adapter's power will lag behind. Make sure to not change the
    switch's status when we get into this temporary state.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=760168

commit 40117a0ed577757ceba4b6cb5479642c29f8568d
Author: Bastien Nocera <hadess@hadess.net>
Date:   Sun Jan 10 14:49:15 2016 +0100

    bluetooth: Avoid broken state when enabling Bluetooth
    
    When enabling Bluetooth, and with older versions of the rfkill
    gnome-settings-daemon D-Bus service, we could get into a state where the
    Bluetooth rfkill was off, but the hciX rfkill associated with the
    adapter is blocked.
    
    Avoid showing filler text in that case.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=760168

commit 06c8bd45861ecc001460c5991b5bb3124e8f449c
Author: Bastien Nocera <hadess@hadess.net>
Date:   Sun Jan 10 15:58:57 2016 +0100

    bluetooth: Bump required gnome-bluetooth version
    
    So that the new API is available.

The necessary changes have also been cherry-picked into the relevant gnome-3-18 branches for gnome-settings-daemon (bug 741675 follow-up), gnome-bluetooth and gnome-control-center.