[ltp] State of affairs for thinkpad-acpi / hotkey-setup / tpb and acpi/ibm/hotkey

Marc MERLIN linux-thinkpad@linux-thinkpad.org
Fri, 9 Nov 2007 00:20:37 -0800


On Tue, Oct 30, 2007 at 08:21:10PM -0200, Henrique de Moraes Holschuh wrote:
> On Tue, 30 Oct 2007, Marc MERLIN wrote:
> > My new Z61p has a battery icon on F3, and Fn+F3 doesn't seem to generate any
> > ACPI event.
> > FN+F2 has a lock icon too, but doesn't generate an ACPI event either.
> 
> Get a new-enough thinkpad-acpi, and it should indeed generate events.
> http://ibm-acpi.sf.net and thinkwiki are your friends.

The following is on a Z61p with 2.6.22.1, and enlightenment (i.e. not gnome or kde).
That's on ubuntu feisty

thinkpad-acpi is 0.14 in that kernel. The problem was that hotkeys shipped as disabled
and no init script/userland was setup to enable them at boot time. No idea why...

Things I found are:
1) Fn+F2/3/5/7/8/9 just doesn't seem to work out of the box. 
   By that, I meant that no acpi event was visible in /var/log/acpid, and no
   keycode was seen by xev with hotkey-setup running
   Any idea why I had to do the following, and why nothing in my default kernel
   or system actually enables the hotkeys?

gandalf:/proc/acpi/ibm# cat hotkey 
status:         disabled
mask:           0x080c
commands:       enable, disable, reset, <mask>
gandalf:/proc/acpi/ibm# echo enable > hotkey
gandalf:/proc/acpi/ibm# cat hotkey 
status:         enabled
mask:           0x080c
commands:       enable, disable, reset, <mask>
gandalf:/proc/acpi/ibm# echo 0xffffffff > /proc/acpi/ibm/hotkey 
gandalf:/proc/acpi/ibm# cat hotkey 
status:         enabled
mask:           0xffffff
commands:       enable, disable, reset, <mask>

   Anyway, now that I've done this, I finally see acpi events that I can write
   triggers for:
received event "ibm/hotkey HKEY 00000080 00001002"
received event "ibm/hotkey HKEY 00000080 00001003"
received event "ibm/hotkey HKEY 00000080 00001005"
etc...

2) hotkey-setup is set to conflict with tpb in ubuntu, yet, I guess unless
   you are running gnome, or something that knows how to read key events
   generated by hotkey-setup, you get nothing on your screen, unlike tpb.
   For now, I'm running tpb at the same time, and it's doing it's old job
   of displaying OSD info by reading directly from nvram.
   Things seem to work now, but actually, before I fixed the hotkeys, I'm 
   pretty sure that hotkey-setup wasn't even generating any events for my
   Fn+Fx keys...
So, what program should I run to generate OSD events out of hotkey-setup
key events?

Also, I found that apparently nothing was loading thinkpad-acpi on my laptop
and that I had to load it myself. I'm wondering if I'm missing something, or
how it's supposed to work out of the box for other folks.

Any comments/suggestions?

Marc
-- 
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems & security ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/