You are not logged in.

#1 2007-10-25 17:13:04

kajn
Member
From: Closer than you can believe
Registered: 2005-11-21
Posts: 10
Website

IBM/Lenovo Thinkpad T60 problem with function (fn+Fx) keys

Hi,
I have a IBM Thinkpad T60 notebook. After last kernel update fn+Fx keys stop working (e.g. fn+F5 which enables bluetooth, fn+F4 which start suspend to RAM and so on).
I think it is something with kernel update. I have runned Arch before kernel 2.6.23 and everything was fine. In time i have used Fedora Core 7 and there was everything ok with kernel 2.6.23.
I think it is problem with kernel and acpi events handler.
I have loaded kernel module thinkpad_acpi and so proc files are created ( /proc/acpi/ibm/.*.).
If i try to using T60 specialities i can do this from command line like echo enable > /proc/acpi/ibm/bluetooth (for bluetooth enable). But when i press fn+F5 to enable bluetooth standard way nothing happens.
I have all aprop. kernel modules loaded.
Second issue is: when i running acpid and have video kernel module loaded when i press fn+Home/End (brightness control) display will poweroff (exactly switch to second monitor). As i know it is because there is same acpi event for "switch to second monitor" and brightness Up/Down.

For information there is list of loaded kernel modules:
Module                  Size  Used by
video                  15888  0
thinkpad_acpi          44076  0
i915                   22656  2
drm                    71572  3 i915
ipv6                  250468  10
l2cap                  20608  2
ext2                   56840  1
usbhid                 39744  0
hid                    28032  1 usbhid
ff_memless              5256  1 usbhid
irtty_sir               5632  0
sir_dev                11524  1 irtty_sir
joydev                  8640  0
hci_usb                13724  0
bluetooth              47844  4 l2cap,hci_usb
pcmcia                 32940  0
yenta_socket           23180  1
rsrc_nonstatic         11136  1 yenta_socket
pcmcia_core            32920  3 pcmcia,yenta_socket,rsrc_nonstatic
output                  3328  1 video
psmouse                36240  0
irda                  115128  1 sir_dev
crc_ccitt               2304  1 irda
serio_raw               5764  0
rtc_cmos                7584  0
rtc_core               14984  1 rtc_cmos
rtc_lib                 3072  1 rtc_core
i2c_i801                8976  0
i2c_core               20096  1 i2c_i801
tsdev                   6848  0
ehci_hcd               32012  0
nvram                   7688  1 thinkpad_acpi
uhci_hcd               22416  0
sg                     26652  0
intel_agp              21780  1
agpgart                27096  3 drm,intel_agp
evdev                   8192  6
thermal                12956  0
processor              27992  1 thermal
fan                     4100  0
button                  6544  0
battery                10248  0
ac                      4356  0
snd_seq_oss            29312  0
snd_seq_midi_event      6528  1 snd_seq_oss
snd_seq                46800  4 snd_seq_oss,snd_seq_midi_event
snd_seq_device          6924  2 snd_seq_oss,snd_seq
snd_hda_intel         286624  0
arc4                    2304  2
snd_hwdep               7300  1 snd_hda_intel
ecb                     3200  2
snd_pcm_oss            36896  0
snd_pcm                68996  2 snd_hda_intel,snd_pcm_oss
snd_timer              19332  2 snd_seq,snd_pcm
snd_page_alloc          8072  2 snd_hda_intel,snd_pcm
snd_mixer_oss          14464  1 snd_pcm_oss
snd                    44644  9 snd_seq_oss,snd_seq,snd_seq_device,snd_hda_intel,snd_hwdep,snd_pcm_oss,snd_pcm,snd_timer,snd_mixer_oss
soundcore               6496  1 snd
iwl3945               163176  0
mac80211              124804  1 iwl3945
cfg80211                6024  1 mac80211
e1000                 117696  0
usbcore               123016  5 usbhid,hci_usb,ehci_hcd,uhci_hcd
ext3                  119560  2
jbd                    54440  1 ext3
mbcache                 7040  2 ext2,ext3
sha256                 11520  0
aes_i586               32896  6
dm_crypt               11400  1
dm_mod                 48704  6 dm_crypt
sr_mod                 14756  0
cdrom                  33952  1 sr_mod
sd_mod                 22912  5
ata_piix               13572  0
ahci                   20100  4
ata_generic             5380  0
libata                105780  3 ata_piix,ahci,ata_generic


Acpi events are send as i can see:
ibm/hotkey HKEY 00000080 00001004
ibm/hotkey HKEY 00000080 00001005
ibm/hotkey HKEY 00000080 00001010
video LCD0 00000086 00000000
ibm/hotkey HKEY 00000080 00001011
video LCD0 00000087 00000000
ibm/hotkey HKEY 00000080 00001011
video LCD0 00000087 00000000
ibm/hotkey HKEY 00000080 00001010
video LCD0 00000086 00000000
ibm/hotkey HKEY 00000080 00001010
video LCD0 00000086 00000000
ibm/hotkey HKEY 00000080 00001011
video LCD0 00000087 00000000

What is strange is there was events send by special sound buttons (mute, up, down), but now there are no events.

Laptop configuration:
Thinkpad T60
Core2duo
Intel Graphic adapter i810
WiFi iwl3945


As i know there is problem with buggy bios from lenovo, and there are some kernel patches to fix it.
I will continue searching for a solution. But first before i will try to check Fedora kernel patches vs Arch kernel patches: is there somebody who have this problem fixed. If yes - how?
PS: it is not problem witch misconfiguration. Friend of mine with Thinkpad R60 have same problem after kernel upgrade.

Offline

#2 2007-10-25 21:45:02

slackhack
Member
Registered: 2004-06-30
Posts: 738

Re: IBM/Lenovo Thinkpad T60 problem with function (fn+Fx) keys

I was just going to post with the same problem on my R40. no solution yet.  I think it's definitely something to do with the kernel. I might try downgrading to the previous kernel if I have time tonight to see if that fixes it.

Offline

#3 2007-10-26 13:55:52

baze
Member
Registered: 2005-10-30
Posts: 393

Re: IBM/Lenovo Thinkpad T60 problem with function (fn+Fx) keys

i can confirm this problem with my t60 too.
at least i'm not the only one... unfortunately because of this i can't use bluetooth aswell, as i can't enable it hmm

Offline

#4 2007-10-26 17:11:11

kajn
Member
From: Closer than you can believe
Registered: 2005-11-21
Posts: 10
Website

Re: IBM/Lenovo Thinkpad T60 problem with function (fn+Fx) keys

hi, you can use your bluetooth by running command
echo enable > /proc/acpi/ibm/bluetooth
if you go to the /proc/acpi/ibm/ and manualy enable or disable everything works fine.
I'm now trying to find solutions by kernel compilation with some patches. If i will find it i will post reply. But i think that regression testing is not bad as this is very specific problem.
And of course i will add a bugreport to bugzilla.

Offline

#5 2007-10-26 17:29:09

steve-e
Member
Registered: 2007-10-03
Posts: 37

Re: IBM/Lenovo Thinkpad T60 problem with function (fn+Fx) keys

Hey,

this has properly to do with "Unfuck my Keyboard" campaign. Don't blame people like Richard Hughes but thanks them. For further information about that you might want to read [1]

In a ThinkPad, the ACPI HKEY handler is responsible for comunicating some important events and also keyboard hot key presses to the operating system.  Enabling the hotkey functionality of thinkpad-acpi signals the firmware that such a driver is present, and modifies how the ThinkPad firmware will behave in many situations. When the hotkey feature is enabled and the hot key mask is set, the various hot keys either generate ACPI events in the
following format:

        ibm/hotkey HKEY 00000080 0000xxxx
 
When the input device is open, the driver will suppress any ACPI hot key events that get translated into a meaningful input layer event, in order
to avoid sending duplicate events to userspace. 
Hot keys that are mapped to KEY_RESERVED in the keymap are not translated, and will always generate an ACPI ibm/hotkey HKEY event, and no input layer events.

The hot key bit mask allows some control over which hot keys generate events.  If a key is "masked" (bit set to 0 in the mask), the firmware will handle it.  If it is "unmasked", it signals the firmware that thinkpad-acpi would prefer to handle it, if the firmware would be so kind to allow it (and it often doesn't!).

Not all bits in the mask can be modified.  Not all bits that can be modified do anything.  Not all hot keys can be individually controlled by the mask.  Some models do not support the mask at all, and in those models, hot keys cannot be controlled individually.  The behaviour of the mask is, therefore, higly dependent on the ThinkPad model.

Note that unmasking some keys prevents their default behavior.  For example, if Fn+F5 is unmasked, that key will no longer enable/disable Bluetooth by itself.

Long answer, short content:

Just do the following and "enable" bluetooth.

echo enable,0x0000 >/proc/acpi/ibm/hotkey

[1] http://people.freedesktop.org/~hughsien … index.html

Offline

#6 2007-10-26 18:21:12

kajn
Member
From: Closer than you can believe
Registered: 2005-11-21
Posts: 10
Website

Re: IBM/Lenovo Thinkpad T60 problem with function (fn+Fx) keys

Hi, i read your post and read the things about hal and so on. So if i understand it is recent update in HAL/DBUS subsystem? And of course i tried your solution with echo enable,....... . It of course works (i tried it before, but i forgot to write it to post - my fault), but there is second problem with. This handles just bluetooth. It don't have to do with other features like fn+F4 which suspends computer to ram. And the "reaction" to events (like enable/disable bluetooth) is very slow. But many thanks for your post - will focus to HAL/DBUS subsystem.
Next fight begins. wink

Offline

#7 2007-10-26 20:23:47

steve-e
Member
Registered: 2007-10-03
Posts: 37

Re: IBM/Lenovo Thinkpad T60 problem with function (fn+Fx) keys

Hal in Archlinux is outdated. I haven't tried hal 0.5.10 like proposed in the link above ,yet. I hope that this can unfuck the rest of our TP keys, but I have to admit that I haven't checked that.

//Edit
nice to hear, that I was able to help you so far :-)

Last edited by steve-e (2007-10-26 20:24:26)

Offline

#8 2007-10-26 20:51:42

kajn
Member
From: Closer than you can believe
Registered: 2005-11-21
Posts: 10
Website

Re: IBM/Lenovo Thinkpad T60 problem with function (fn+Fx) keys

I'm going to try to get a new version of hal and rebuild a package. If everything will be OK, i will post result.

And thanks for your help.

Last edited by kajn (2007-10-26 20:52:21)

Offline

#9 2007-10-26 21:59:45

PeteMo
Member
From: H'Burg, VA
Registered: 2006-01-26
Posts: 191
Website

Re: IBM/Lenovo Thinkpad T60 problem with function (fn+Fx) keys

steve-e wrote:

Long answer, short content:

Just do the following and "enable" bluetooth.

echo enable,0x0000 >/proc/acpi/ibm/hotkey

This fixes fn+F5 for toggling bluetooth on my T40p, but I still can't use fn+F4 to suspend to ram.  I can suspend if I do:

# echo -n mem > /sys/power/state

Any ideas?

Offline

#10 2007-10-27 15:05:34

kajn
Member
From: Closer than you can believe
Registered: 2005-11-21
Posts: 10
Website

Re: IBM/Lenovo Thinkpad T60 problem with function (fn+Fx) keys

Hi,
I rebuilded packages hal and hal-info to versions:
hal 0.5.10-1
hal-info 0.20071011-1

But things are still fucked-up. I rebooted and everything is as before upgrade.
Any ideas what to do next?

Offline

#11 2007-10-27 21:14:55

Jack B
Member
Registered: 2006-06-27
Posts: 107
Website

Re: IBM/Lenovo Thinkpad T60 problem with function (fn+Fx) keys

Everything works fine on my T41 big_smile

I think this may be because I'm approaching this differently. I have the hotkey mask set to 0xffffff so any Fn+Fx key generates an ACPI event, then wrote my own handlers for it.  If this continues to be a problem you could try this approach instead. I like it because you get much more control over what each key does, though you do have to invest a little time (about 1/2 hour in my case) in writing a handling script.

If you want to see if a key combo produces an ACPI event run acpi_listen. The resulting strings are passed as arguments to the acpi handler script at /etc/acpi/handler.sh.

Jack

Offline

#12 2007-10-28 12:16:11

kajn
Member
From: Closer than you can believe
Registered: 2005-11-21
Posts: 10
Website

Re: IBM/Lenovo Thinkpad T60 problem with function (fn+Fx) keys

After all i found working combination of relevant packages.
Packages:
kernel26 2.6.22.9-1
hal 0.5.9.1-1
hal-info 0.20070831
initscripts 2007.08-3
dbus 1.0.2-4
dbus-glib 0.74-1
Everything works fine now, so only question is: what has changed between this older packages and new version of packages.
In this moment i don't have installed acpid package.
Now i must find changes.

Offline

#13 2008-03-16 20:00:32

jarda-wien
Member
Registered: 2008-03-13
Posts: 104

Re: IBM/Lenovo Thinkpad T60 problem with function (fn+Fx) keys

Jack B wrote:

Everything works fine on my T41 big_smile

I think this may be because I'm approaching this differently. I have the hotkey mask set to 0xffffff so any Fn+Fx key generates an ACPI event, then wrote my own handlers for it.  If this continues to be a problem you could try this approach instead. I like it because you get much more control over what each key does, though you do have to invest a little time (about 1/2 hour in my case) in writing a handling script.

If you want to see if a key combo produces an ACPI event run acpi_listen. The resulting strings are passed as arguments to the acpi handler script at /etc/acpi/handler.sh.

Jack

I have a T41 as well and things are kind of strange with Fn keys, Fn+F3 switches ThinkLight off for example (not switching it on again...). Could you please post your config here? As much as I understand this topic, the only thing you have to do is: echo enable,0xffffffff > /proc/acpi/ibm/hotkey and have the right /etc/acpi/handler.sh script...

BTW: Lapsus from AUR has some nice IBM features as well :-)

Offline

Board footer

Powered by FluxBB