GNOME Bugzilla – Bug 578957
Doesn't handle hardware killswitches
Last modified: 2009-07-22 04:24:49 UTC
Please describe the problem: I have a Thinkpad T60. The kill switch in HAL is: udi = '/org/freedesktop/Hal/devices/platform_thinkpad_acpi_rfkill_tpacpi_bluetooth_sw_bl uetooth' info.addons.singleton = {'hald-addon-rfkill-killswitch'} (string list) info.capabilities = {'killswitch'} (string list) info.category = 'killswitch' (string) info.interfaces = {'org.freedesktop.Hal.Device.KillSwitch'} (string list) info.parent = '/org/freedesktop/Hal/devices/platform_thinkpad_acpi' (string) info.product = 'tpacpi_bluetooth_sw bluetooth Killswitch' (string) info.subsystem = 'rfkill' (string) info.udi = '/org/freedesktop/Hal/devices/platform_thinkpad_acpi_rfkill_tpacpi_bluetoot h_sw_bluetooth' (string) killswitch.access_method = 'rfkill' (string) killswitch.name = 'tpacpi_bluetooth_sw' (string) killswitch.state = 1 (0x1) (int) killswitch.type = 'bluetooth' (string) linux.hotplug_type = 2 (0x2) (int) linux.subsystem = 'rfkill' (string) linux.sysfs_path = '/sys/devices/platform/thinkpad_acpi/rfkill/rfkill0' (string) If I turn the killswitch on, the bluetooth USB device disappears, and the state of the icon is updated to disabled. Good. However, I now have: - a 'Turn Off Bluetooth/Turn On Bluetooth' toggle in the context menu; twiddling it back and forth does nothing - a 'Preferences' in the context menu that only says 'Bluetooth is disabled', with no other information Steps to reproduce: 1. Have bluetooth enabled 2. Flip the kill switch Actual results: Bluetooth is disabled, but it's not clear why, and options are given that don't work. Expected results: Bluetooth is disabled, and there's a big 'You turned off the killswitch, dummy - turn it back on!' dialog. Does this happen every time? Yes. Other information: bluez-4.35-1.fc11.x86_64 gnome-bluetooth-2.27.3-1.fc11.x86_64
Well, the thinkpad kernel module is telling us that the software killswitch isn't on: killswitch.state = 1 (0x1) (int) but the hardware killswitch _is_ on... I have no idea how we could fix that without fixing the kernel module. The wrong display of status in the applet is bug 578709
Oops. When the killswitch is actually off, it switches to: killswitch.state = 2 (0x2) (int)
Let me rephrase: - bluetooth enabled: state = 1 - bluetooth disabled: state = 2
Yep, that's: RFKILL_STATE_UNBLOCKED = 1 RFKILL_STATE_SOFT_BLOCKED = 0 RFKILL_STATE_HARD_BLOCKED = 2 We'd need to support that in gnome-bluetooth.
Created attachment 132718 [details] [review] gbt-hard-block-support-draft.patch First pass. But it's still completely broken because HAL (and the kernel) conspire to give us outdated state for the killswitch. mjg tells me that we should wait for Johannes' killswitch rewrite to land in the kernel. Sorry, won't be fixed in F11.
Johannes' patch: http://thread.gmane.org/gmane.linux.kernel.wireless.general/31633
*** Bug 579889 has been marked as a duplicate of this bug. ***
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find. *** This bug has been marked as a duplicate of 585765 ***