Bugzilla – Bug 297812
ThinkPad: Fn-F5 button does not toggle Bluetooth
Last modified: 2007-08-21 12:12:19 UTC
Calling 'lsmod | grep acpi' on my ThinkPad T60p shows, that on openSUSE 10.3 there is now a module called 'thinkpad_acpi'. I don't know if this is just the renamed 'ibm_acpi' module or a new module. Anyway many of my ThinkPad FN buttons do not work. The only buttons that do work are FN+F4 for Suspend-to-RAM and FN+F12 for Suspend-to-disk. On openSUSE 10.2 I could do a 'tail -f /var/log/acpid' to watch what happens when I press certain FN buttons. Doing this on openSUSE 10.3 shows nothing. I don't know if this is due to, that acpid is less verbose on openSUSE 10.3, or if it doesn't receive acpi events when I press those key-combos. Well, if I add the INFO debug level via 'echo -n 0x17 > /proc/acpi/debug_level' I can watch with 'tail -f /var/log/messages' that acpid does something when I press a certain key-combo (e.g. FN+F5) but it does not seem to me, that an event is forwarded to /usr/lib/dockutils/dockhandler. Therefore nothing happens when I press the other FN keys. Regards, Jörg
*** Bug 297803 has been marked as a duplicate of this bug. ***
*** Bug 297639 has been marked as a duplicate of this bug. ***
I'm a bit confused, because according to http://www.thinkwiki.org/wiki/Thinkpad-acpi the thinkpad_acpi module was superseded by the ibm_acpi module. On openSUSE 10.2 the ibm_acpi module is loaded, but on openSUSE 10.3 the thinkpad_acpi module is loaded. Is this a regression and the reason for the problems?
Well, it's not. I found the following in /usr/src/linux/Documentation/thinkpad-acpi.txt: This driver used to be named ibm-acpi until kernel 2.6.21 and release 0.13-20070314. It used to be in the drivers/acpi tree, but it was moved to the drivers/misc tree and renamed to thinkpad-acpi for kernel 2.6.22, and release 0.14.
I found the reason. /proc/acpi/ibm/hotkey is set to disabled by default when the thinkpad_acpi module is loaded. That's why all hotkeys but FN+F4 and FN+F12 don't work. See the documentation of the thinkpad_acpi module: /usr/src/linux/Documentation/thinkpad-acpi.txt After running 'echo enable > /proc/acpi/ibm/hotkey' as root, my ThinkPad buttons seem to work now. I can switch bluetooth on/off using FN+F5. But I'll have to do further testing. How/where can be configured, that the thinkpad_acpi module should be loaded with the hotkeys setting enabled?
/proc/acpi/ibm/hotkey is set to "enable" by default here. If I set this to disable "Fn-F5" is working.
That's already fixed in STABLE.
Jörg: Until beta 1 is out, you may want to adjust /etc/modprobe.d/ibm_acpi.modprobe. It should contain: options thinkpad_acpi hotkey=enabled,0xffff experimental=1
Hm, meanwhile I don't have the original Alpha 7 anymore, I already did some factory updates. Now '/proc/acpi/ibm/hotkey' is indeed enabled by default. In '/etc/modprobe.d/ibm_acpi' I have the line: options ibm_acpi hotkey=enabled,0xffff experimental=1 But, pressing FN+F5 to enable/disable bluetooth doesn't work. I changed the line to: options thinkpad_acpi hotkey=enabled,0xffff experimental=1 but that didn't help either. FN+F5 is not working. I also renamed /etc/modprobe.d/ibm_acpi to /etc/modprobe.d/thinkpad_acpi, but it made no difference. Well, I think ibm_acpi is somewhere defined to be an alias for thinkpad_acpi, because I can call 'modprobe ibm_acpi', but thinkpad_acpi is loaded. Anyway, for consistency, I would propose renaming /etc/modprobe.d/ibm_acpi to /etc/modprobe.d/thinkpad_acpi. You should also update the explaining comment in this file, because it still references to the documentation at /usr/src/linux/Documentation/ibm-acpi.txt, but this file no longer exists. It's now /usr/src/linux/Documentation/thinkpad-acpi.txt. But the big problem still remains here, FN+F5 does not work any longer at all, although /proc/acpi/ibm/hotkey ist set to "enabled". I can still enable/disable bluetooth via /proc/acpi/ibm/bluetooth, but not via FN+F5. Could the reason be the new kernel 2.6.22.1-14? Well, I could downgrade to 2.6.22.1-10 to see if it works again, but actually I don't want to downgrade if there are other ways to find out what's the problem this time.
(In reply to comment #9 from Jörg Hermsdorf) > But, pressing FN+F5 to enable/disable bluetooth doesn't work. I changed the > line to: > > options thinkpad_acpi hotkey=enabled,0xffff experimental=1 > > but that didn't help either. You will need to run 'modprobe -r thinkpad_acpi; modprobe thinkpad_acpi' for that. > But the big problem still remains here, FN+F5 does not work any longer at all, > although /proc/acpi/ibm/hotkey ist set to "enabled". I can still enable/disable > bluetooth via /proc/acpi/ibm/bluetooth, but not via FN+F5. Could the reason be > the new kernel 2.6.22.1-14? Well, I could downgrade to 2.6.22.1-10 to see if it > works again, but actually I don't want to downgrade if there are other ways to > find out what's the problem this time. Please let us know if the above makes it work. If not, we have to dig for the Bluetooth issue.
I thought it was a typo in comment #6, but Christian is right, if you set /proc/acpi/ibm/hotkey to 'disabled' then FN+F5 works. That's really weird, and definitely not what's written in the documentation at /usr/src/linux/Documentation/thinkpad-acpi.txt.
OK, the problem seems to be the bitmask. We should not set 0xffff. see in /usr/src/linux/Documentation/thinkpad-acpi.txt: > Note that enabling ACPI events for some keys prevents their default > behavior. For example, if events for Fn-F5 are enabled, that key will > no longer enable/disable Bluetooth by itself. This can still be done > from an acpid handler for the ibm/hotkey event. So we need to subtract 0x0010 from 0xffff resulting in 0xffef to keep FN+F5 working without being handled by acpid and enabling all other hotkeys. /etc/modprobe.d/thinkpad_acpi options thinkpad_acpi hotkey=enabled,0xffef experimental=1 This works for me now! ;)
That does not help as Fn-F5 is supposed to toggle both, wireless and Bluetooth (cf. bug 128088). Holger, it seems that the powersave package does no longer include the bits mentioned in https://bugzilla.novell.com/show_bug.cgi?id=128088#c27 . Why is that?
See comment #13. Adjusting summary.
snip from rpm -q --changelog powersave |vi - * Thu Apr 19 2007 - hmacht@suse.de - remove '-r/--calc-frequency' option from powersave command line client because it is outdated (novell bug 259305) - remove hotkey handling for IBM thinkpads and in general. This should be handled by the desktop (novell bug 264692) - r2941
Hm, wireless can still be toggled via the hardware switch. That's the way it was on openSUSE 10.2, I toggled wireless via the hardware switch and bluetooth via FN+F5. I really liked it, that you could toggle bluetooth and wireless independently from each other, but that's just my opinion. Don't know how other users think about this. In Windows XP FN+F5 brings up a popup menu where you can, adjust bluetooth and wireless independently, but in KDE or GNOME we don't have such popup menu. Therefore my opinion is, that FN+F5 should only toggle bluetooth.
Yes, please ignore the rubbish I was writing about wireless above. The thing is, that if we lower the bit mask, we will no longer get any event to user space (GNOME, KDE) about that happened. Thus, an OSD application or such would not be possible. The right thing is a) set hotkey bit mask to 0xffff b) have some instance in userspace which writes to /proc/acpi/ibm/bluetooth to enable/disable bluetooth Given that, we still get the ACPI event 'ibm/hotkey HKEY 00000080 00001005' which indicates that the Bluetooth status has changed.
Yes, I agree! That would be the best solution. Maybe dockhandler could be that userspace app which could do that!? Have a look at: http://www.thinkwiki.org/wiki/Installing_openSUSE_10.2_on_a_ThinkPad_X60#Activating_FN-F2_and_FN-F7 The author already modified dockhandler to call kdesktop_lock when FN+F2 is pressed.
Fixed/enhanced hotkey-setup package can be found here: ftp://ftp.suse.com/pub/people/hmacht/10.3/hotkey-setup
Works as advertised, thanks!
*** Bug 290615 has been marked as a duplicate of this bug. ***
I know this bug is specific about FN+F5, but after installing the hotkey-setup package from the link in Comment #19, FN+F4 (Suspend to RAM) and FN+F12 (Suspend to disk) don't work any more. I can verify, that FN+F2 (lock screen in KDE), FN+F3 (disable LCD) and FN+F5 (toggle bluetooth) work as expected now.
I updated a lot of packages from the FACTORY repository and if I press the FN key now (just the FN key!!) , the context menu comes up on the KDE desktop. I don't think this is KDE specific, as this also happens in SAX2. I can still toggle bluetooth using FN+F5, but it seems like the FN key has additionally the same key mapping as the menu key (the one between AltGr and Right-Ctrl on my ThinkPad keyboard). I have no idea, what package could be responsible for this.
Please open a separate bug for this issue. Thanks.
*** Bug 301343 has been marked as a duplicate of this bug. ***