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 749140 - Power panel displays Bluetooth toggle when there is no bluetooth adapter
Power panel displays Bluetooth toggle when there is no bluetooth adapter
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Power
3.16.x
Other Linux
: Normal minor
: ---
Assigned To: Richard Hughes
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-05-08 21:43 UTC by Adam Williamson
Modified: 2015-05-15 15:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
power: Hide Bluetooth power section when w/o BT (4.72 KB, patch)
2015-05-13 09:49 UTC, Bastien Nocera
none Details | Review
power: Hide Bluetooth power section when w/o BT (4.75 KB, patch)
2015-05-15 15:31 UTC, Bastien Nocera
committed Details | Review

Description Adam Williamson 2015-05-08 21:43:26 UTC
In a VM, with no bluetooth adapter connected, the Power panel in gnome-control-center shows a toggle for Bluetooth (set to ON by default). The Bluetooth panel correctly says 'No Bluetooth adapters found' and has its toggle greyed out.

I note https://bugzilla.gnome.org/show_bug.cgi?id=738509 claiming to fix this, but apparently either it didn't, or it's regressed. This is with control-center-3.16.1-1.fc22.x86_64 on F22 Final TC3.
Comment 1 Bastien Nocera 2015-05-10 13:10:50 UTC
What's the output of:
gdbus introspect --session --dest org.gnome.SettingsDaemon.Rfkill --object-path /org/gnome/SettingsDaemon/Rfkill
and:
rfkill list
On that system?

(In reply to Adam Williamson from comment #0)
> In a VM, with no bluetooth adapter connected, the Power panel in
> gnome-control-center shows a toggle for Bluetooth (set to ON by default).
> The Bluetooth panel correctly says 'No Bluetooth adapters found' and has its
> toggle greyed out.
> 
> I note https://bugzilla.gnome.org/show_bug.cgi?id=738509 claiming to fix
> this, but apparently either it didn't, or it's regressed.

Claiming to fix this? It never did. The bug fix in that bug only affects non-Linux systems where gnome-control-center is built without Bluetooth support.
Comment 2 Adam Williamson 2015-05-10 16:58:02 UTC
[liveuser@localhost ~]$ gdbus introspect --session --dest org.gnome.SettingsDaemon.Rfkill --object-path /org/gnome/SettingsDaemon/Rfkill
node /org/gnome/SettingsDaemon/Rfkill {
  interface org.freedesktop.DBus.Properties {
    methods:
      Get(in  s interface_name,
          in  s property_name,
          out v value);
      GetAll(in  s interface_name,
             out a{sv} properties);
      Set(in  s interface_name,
          in  s property_name,
          in  v value);
    signals:
      PropertiesChanged(s interface_name,
                        a{sv} changed_properties,
                        as invalidated_properties);
    properties:
  };
  interface org.freedesktop.DBus.Introspectable {
    methods:
      Introspect(out s xml_data);
    signals:
    properties:
  };
  interface org.freedesktop.DBus.Peer {
    methods:
      Ping();
      GetMachineId(out s machine_uuid);
    signals:
    properties:
  };
  @org.freedesktop.DBus.GLib.CSymbol("gsd_rfkill_manager")
  interface org.gnome.SettingsDaemon.Rfkill {
    methods:
    signals:
    properties:
      readwrite b AirplaneMode = false;
      readonly b HardwareAirplaneMode = false;
      readonly b HasAirplaneMode = false;
      readonly b ShouldShowAirplaneMode = false;
      readwrite b BluetoothAirplaneMode = false;
      readonly b BluetoothHardwareAirplaneMode = false;
      readonly b BluetoothHasAirplaneMode = false;
  };
};
Comment 3 Adam Williamson 2015-05-10 17:03:26 UTC
[root@localhost liveuser]# rfkill list
[root@localhost liveuser]#
Comment 4 Bastien Nocera 2015-05-13 09:49:15 UTC
Created attachment 303297 [details] [review]
power: Hide Bluetooth power section when w/o BT

When a Bluetooth airplane mode isn't available (whether hardware or
software) it means there are no Bluetooth adapters, even turned off.
Hide the Bluetooth section in that case.\
Comment 5 Rui Matos 2015-05-13 15:09:14 UTC
Review of attachment 303297 [details] [review]:

looks fine
Comment 6 Bastien Nocera 2015-05-15 15:31:16 UTC
Created attachment 303431 [details] [review]
power: Hide Bluetooth power section when w/o BT

When a Bluetooth airplane mode isn't available (whether hardware or
software) it means there are no Bluetooth adapters, even turned off.
Hide the Bluetooth section in that case.\
Comment 7 Bastien Nocera 2015-05-15 15:32:52 UTC
Attachment 303431 [details] pushed as 86374b2 - power: Hide Bluetooth power section when w/o BT