Bug 399601 - Bluetooth hot key does not work
Summary: Bluetooth hot key does not work
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 11
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: John Feeney
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 334891 384111 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-11-26 15:53 UTC by Walter Cervini
Modified: 2013-01-10 08:37 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-06-28 10:29:51 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Walter Cervini 2007-11-26 15:53:41 UTC
Description of problem:
I have a IBM Thinkpad T42. The bluetooth device is activate with Fn+F5. 
This host key is not assigned to activate bluetooth device.

Version-Release number of selected component (if applicable):
bluez-utils.i386  version: 3.20-4.fc8 

Adittional info:
I can activate the bluetooth device via /proc/acpi/ibm/bluetooth, enable o
disable this.

echo enable > /proc/acpi/ibm/bluetooth 
echo disable > /proc/acpi/ibm/bluetooth 

On Fedora 7 or older this hotkey was work.

I'm think is not assigned the activate function key for this device.

Comment 1 Tim Niemueller 2008-05-16 10:57:51 UTC
The problem also appears on T60 laptops on x86_64 (probably even more, I just
checked this one).

A workaround is to catch the ACPI event and use a script to toggle it. For this
create a script /etc/acpi/actions/toggle-bluetooth.sh with the following content:
#!/bin/sh

BT_STATUS=`cat /proc/acpi/ibm/bluetooth | grep status | awk -F: '{ print $2 }' |
tr -d " \t"`

if [ "$BT_STATUS" = "disabled" ]; then
        echo enable > /proc/acpi/ibm/bluetooth
else
        echo disable > /proc/acpi/ibm/bluetooth
fi


Then create a file /etc/acpi/events/bluetooth.conf with the following content:
event=ibm/hotkey HKEY 00000080 00001005
action=/etc/acpi/actions/toggle-bluetooth.sh

To check if that is the correct code for your laptop use acpi_listen.

Now reload acpid configuration with /sbin/service acpid reload and from then on
Fn-F5 should work again.

Is there a chance that this gets included in some package so that it just works
again?


Comment 2 Paul Bolle 2008-05-30 10:40:47 UTC
I can confirm this on an IBM ThinkPad T41 and an IBM ThinkPad X41.

For what it's worth, another workaround  is to unmask Fn+F5 in the "ibm hotkey
mask". This workaround doesn't require acpid. (I seem to have written this
workaround for F8. It still works in F9.)

$ cat /etc/sysconfig/modules/thinkpad_acpi.modules 
#!/bin/sh
/sbin/modprobe thinkpad_acpi

# 12 December 2007
# unmask Fn+F5 (bluetooth toggle key)
HOTKEY_STATUS=$(sed -ne '/status:/ {s/^status:[ \t]*//; p}' /proc/acpi/ibm/hotkey)
if [ "x$HOTKEY_STATUS" == "xenabled" ]; then
    HOTKEY_MASK=$(sed -ne '/mask:/ {s/^mask:[ \t]*//; p}' /proc/acpi/ibm/hotkey)
    printf "0x%x\n" $(( $HOTKEY_MASK & 0xffffffef )) > /proc/acpi/ibm/hotkey
fi

(The executable file /etc/sysconfig/modules/thinkpad_acpi.modules is executed by
/etc/rc.sysinit at system initialization, as far as I can see _before_
thinkpad_acpi is automagically loaded. I'm not sure how that works, though.)

Comment 3 petrosyan 2008-06-04 14:56:14 UTC
*** Bug 334891 has been marked as a duplicate of this bug. ***

Comment 4 petrosyan 2008-07-17 23:16:07 UTC
This bug is also present in ThinkPad X61.

Comment 5 Bug Zapper 2008-11-26 02:03:41 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 6 Edmond 2008-12-01 08:34:21 UTC
*** Bug 384111 has been marked as a duplicate of this bug. ***

Comment 7 Matthew Garrett 2008-12-04 02:45:13 UTC
Try loading rfkill-input

Comment 8 Tim Niemueller 2008-12-04 12:48:48 UTC
Nope, does not work. I did the following:

# Bluetooth is disabled
- Move away ACPI workaround script mentioned above
- /sbin/service acpid reload
- modprobe rfkill
# This turned on bluetooth

Fn-F5 still has no effect, neither turning on nor off.

Interesting is this:
# lsmod | grep rfkill
rfkill_input           13824  0 
rfkill                 17316  5 rfkill_input,iwl3945,thinkpad_acpi

So should the thinkpad_acpi already be able to cope with this or should it be patched there?

Comment 9 Dan Alderman 2009-01-16 10:43:54 UTC
Same bug on Thinkpad X61s (76693JG) using a live USB system (2.6.27.5-117 i686).

Bluetooth is on from boot for me. Please contact me if you would like me to test anything.

Comment 10 Paul Bolle 2009-02-11 20:54:33 UTC
(In reply to comment #9)
> Bluetooth is on from boot for me.

Separate issue. A fix (that worked for me under 2.6.27.12-78.2.8.fc9.i686) for that issue:
    $ cat /etc/modprobe.d/rfkill 
    options rfkill default_state=0

Comment 11 Edmond 2009-04-26 06:27:26 UTC
I just tested out the rfkill solution above.

It works, but it also turn off the Wifi connection by default on my T60. The problem with this is the soft Fn-F5 on-off is only turning on/off bluetooth but not wifi, which left wifi struck in disabled state....

Comment 12 Paul Bolle 2009-04-26 08:31:33 UTC
(In reply to comment #11)
> I just tested out the rfkill solution above.

Just to be clear: did you mean the "load rfkill-input" suggestion of comment #7 or the "rfkill default_state=0" fix of comment #10?

Comment 13 Edmond 2009-04-27 07:15:51 UTC
comment #10...

Comment 14 Chris Nutt 2009-06-13 22:42:01 UTC
I am receiving the same error with Fedora 11, KDE4 IBM - T41

Comment 15 Edmond 2009-07-01 18:40:14 UTC
This problem still exist in F11....

Comment 16 Bug Zapper 2009-11-18 10:08:56 UTC
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '10'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 10's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 10 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 17 Tim Niemueller 2009-11-18 10:45:27 UTC
It at least exists on F11 according to comment #15 (I'm running with the workaround mentioned in comment #1), haven't tried on F12, yet. Anyone else?

Comment 18 Paul Bolle 2009-11-18 11:32:59 UTC
(In reply to comment #17)
> Anyone else?

0) Still reproducible with the IBM ThinkPad T41 mentioned in comment #2 (not using the workaround I described there). It is now running Rawhide (ie, kernel-2.6.32-0.48.rc7.git1.fc13.i686; any other packages relevant?). That kernel doesn't have a module rfkill-input (see comment #7).

2) Using that workaround the Fn+F5 combo does work as I expect. (Using that combo will currently launch some bluetooth stuff automagically, though that apparently ends with this error: "bluetoothd[...]: Can't init device hci0: Unknown error 132 (132)". I seem to remember that this error rfkill related. Anyhow, I suppose that might be another issue).

Comment 19 Bug Zapper 2010-04-27 11:50:19 UTC
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 20 Paul Bolle 2010-05-02 10:57:23 UTC
0) Still reproducible with the IBM ThinkPad T41 mentioned in comment #2 (ie, when not using the workaround I described there). It is still running Rawhide (ie, kernel-2.6.34-0.38.rc5.git0.fc14.i686; any other packages relevant?). That kernel still doesn't have a module rfkill-input (see comment #7).

2) Using that workaround the Fn+F5 combo will currently launch some bluetooth stuff automagically, and bluetooth seems to work correctly. However, for some reason, while bluetooth is working WiFi is always rfkill'ed (regardless whether bluetooth is on or off): 
$ /sbin/ifup wlan0
RTNETLINK answers: Operation not possible due to RF-kill

Determining IP information for wlan0...Can't create /var/run/dhclient-wlan0.pid: Permission denied
RTNETLINK answers: Operation not possible due to RF-kill

(At which point ifup seems to hang.)

3) In summary: still reproducible, but my old workaround now runs into trouble, possibly through some weird interaction with the rfkill module.

Comment 21 Bug Zapper 2010-06-28 10:29:51 UTC
Fedora 11 changed to end-of-life (EOL) status on 2010-06-25. Fedora 11 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.