# Thinkpad T61: acpi events recognized but nothing happens

## AgBr

On my Thinkpad the hotkeys do not work. I have activated all the acpi stuff in the Kernel, the thinkpad_acpi module is loaded. And dmesg shows:

```

[    5.338635] thinkpad_acpi: ThinkPad ACPI Extras v0.24

[    5.338638] thinkpad_acpi: http://ibm-acpi.sf.net/

[    5.338640] thinkpad_acpi: ThinkPad BIOS 7LET51WW (1.21 ), EC 7KHT22WW-1.06

[    5.338642] thinkpad_acpi: Lenovo ThinkPad T61, model 7659AL8

[    5.339530] thinkpad_acpi: detected a 8-level brightness capable ThinkPad

[    5.340414] thinkpad_acpi: ACPI backlight control delay disabled

[    5.340599] thinkpad_acpi: radio switch found; radios are enabled

[    5.342770] Registered led device: tpacpi::thinklight

[    5.342798] Registered led device: tpacpi::power

[    5.342816] Registered led device: tpacpi::standby

[    5.342834] Registered led device: tpacpi::thinkvantage

[    5.345254] thinkpad_acpi: Standard ACPI backlight interface available, not loading native one.

[    5.346034] thinkpad_acpi: Console audio control enabled, mode: monitor (read only)

[    5.347845] input: ThinkPad Extra Buttons as /devices/platform/thinkpad_acpi/input/input6

```

```

notebook ~ # lsmod

Module                  Size  Used by

ipv6                  180831  12 

iwlagn                 95162  0 

iwlcore                52193  1 iwlagn

snd_hda_codec_analog    45758  1 

e1000e                103397  0 

pcmcia                 23938  0 

ohci1394               20940  0 

ieee1394               50964  1 ohci1394

sdhci_pci               4801  0 

sdhci                  11818  1 sdhci_pci

mac80211              122792  2 iwlagn,iwlcore

8250_pci               19264  0 

8250                   14974  1 8250_pci

i2c_i801                6126  0 

thinkpad_acpi          45243  0 

mmc_core               43436  1 sdhci

snd_hda_intel          15814  2 

cfg80211               95485  3 iwlagn,iwlcore,mac80211

yenta_socket           15604  0 

serial_core            12546  1 8250

snd_hda_codec          46146  2 snd_hda_codec_analog,snd_hda_intel

joydev                  6830  0 

```

The events are properly recorded by the syslogger

```

Apr 22 12:26:19 notebook logger: ACPI event unhandled: ibm/hotkey HKEY 00000080 00001004

Apr 22 12:26:21 notebook logger: ACPI event unhandled: ibm/hotkey HKEY 00000080 00001005

Apr 22 12:26:23 notebook logger: ACPI event unhandled: ibm/hotkey HKEY 00000080 00001007

Apr 22 12:26:24 notebook logger: ACPI event unhandled: ibm/hotkey HKEY 00000080 00001008

Apr 22 12:26:26 notebook logger: ACPI event unhandled: ibm/hotkey HKEY 00000080 00001009

Apr 22 12:26:28 notebook logger: ACPI event unhandled: ibm/hotkey HKEY 00000080 0000100c

Apr 22 12:26:33 notebook logger: ACPI event unhandled: ibm/hotkey HKEY 00000080 00001010

Apr 22 12:26:33 notebook logger: ACPI event unhandled: video LCD0 00000086 00000000

Apr 22 12:26:34 notebook logger: ACPI event unhandled: ibm/hotkey HKEY 00000080 00001011

Apr 22 12:26:34 notebook logger: ACPI event unhandled: video LCD0 00000087 00000000

Apr 22 12:26:47 notebook logger: ACPI event unhandled: ibm/hotkey HKEY 00000080 00001003

Apr 22 12:26:51 notebook logger: ACPI event unhandled: ibm/hotkey HKEY 00000080 00001002

```

But nothing happens. The battery isn't recognized by kde either. The kernel does know about it though:

```
notebook ~ # cat /proc/acpi/battery/BAT0/state

present:                 yes

capacity state:          ok

charging state:          charged

present rate:            0 mW

remaining capacity:      32750 mWh

present voltage:         16448 mV

noteook ~ # cat /proc/acpi/battery/BAT0/info

present:                 yes

design capacity:         37430 mWh

last full capacity:      33170 mWh

battery technology:      rechargeable

design voltage:          14400 mV

design capacity warning: 1658 mWh

design capacity low:     200 mWh

cycle count:              0

capacity granularity 1:  1 mWh

capacity granularity 2:  1 mWh

model number:            42T5225

serial number:            4532

battery type:            LION

OEM info:                Panasonic

```

My actually used kernel config is fetched from Knoppix Live-CD 6.2.1 just to be sure. With Knoppix it's all running fine, so it's not the hardware or the kernel. Any hints what I am missing?

Thank you very much for looking into this

----------

## ppurka

This is gentoo, not knoppix. You will have to capture those keystrokes and configure your own actions   :Razz: 

One way is to write your own scripts and put them in /etc/acpi/actions,- you will need to know how to make them react to specific events as shown in your log.  The other easier way out is to configure them in KDE itself. Assign the needed command to each keybinding.

----------

## AgBr

 *ppurka wrote:*   

> This is gentoo, not knoppix. You will have to capture those keystrokes and configure your own actions  
> 
> 

 On my other notebook, a T43, it is all working out of the box without even having activated the thinkpad-stuff in the kernel. *Quote:*   

> 
> 
> One way is to write your own scripts and put them in /etc/acpi/actions,- you will need to know how to make them react to specific events as shown in your log.  The other easier way out is to configure them in KDE itself. Assign the needed command to each keybinding.

 

I do not know how to do this unfortunately (look at my status of expertize in my profile for reference   :Wink:   )

Part of my problem (and some more) is solved. There has hald been missing. The system is aware of the battery and powerdevil allows to suspend the system now. The hotkeys configured in powerdevil are still not working, the system is suspending to ram when I close the lid though. So, what is left to do is  to make kde recognize the hotkeys, which my T43 is doing without any configuration.

----------

## ppurka

A lot of thinkpad keys have moved to being just acpi or X keystrokes. In later thinkpads (including your T61) the only keys which are probably still controlled by the drivers/bios directly are the brightness keys and thinklight key. The rest of the function keys can all be captured by X. Even the mute/vol keys are controllable from X now. To check this, run xev (emerge xev if you don't have it) and look at the output in the terminal once you press your Fn+<key> combo. 

This is both a good and a bad thing. Good thing is that now you can decide what to do with those keystrokes, i.e. you can go to kde's key configuration dialog and assign those keystrokes to whatever you want. Bad thing is that now it is all dependent on your OS how this is handled. This is especially true of the mute/vol keys since earlier these could be independently controlled irrespective of your OS.

As for your laptop going to sleep on lid close, this is probably being handled in kde itself, if not in acpi.

----------

## AgBr

 *ppurka wrote:*   

> A lot of thinkpad keys have moved to being just acpi or X keystrokes. In later thinkpads (including your T61) the only keys which are probably still controlled by the drivers/bios directly are the brightness keys and thinklight key. The rest of the function keys can all be captured by X. Even the mute/vol keys are controllable from X now. To check this, run xev (emerge xev if you don't have it) and look at the output in the terminal once you press your Fn+<key> combo. 
> 
> This is both a good and a bad thing. Good thing is that now you can decide what to do with those keystrokes, i.e. you can go to kde's key configuration dialog and assign those keystrokes to whatever you want. Bad thing is that now it is all dependent on your OS how this is handled. This is especially true of the mute/vol keys since earlier these could be independently controlled irrespective of your OS.
> 
> As for your laptop going to sleep on lid close, this is probably being handled in kde itself, if not in acpi.

 

Thanks so far for your hints. This is the output of xev:

```

eyPress event, serial 34, synthetic NO, window 0x4600001,

    root 0x16d, subw 0x0, time 4361156, (382,-252), root:(386,338),

    state 0x0, keycode 232 (keysym 0x1008ff03, XF86MonBrightnessDown), same_screen YES,

    XLookupString gives 0 bytes: 

    XmbLookupString gives 0 bytes: 

    XFilterEvent returns: False

KeyRelease event, serial 34, synthetic NO, window 0x4600001,

    root 0x16d, subw 0x0, time 4361156, (382,-252), root:(386,338),

    state 0x0, keycode 232 (keysym 0x1008ff03, XF86MonBrightnessDown), same_screen YES,

    XLookupString gives 0 bytes: 

    XFilterEvent returns: False

MappingNotify event, serial 36, synthetic NO, window 0x0,

    request MappingKeyboard, first_keycode 8, count 248

KeyPress event, serial 36, synthetic NO, window 0x4600001,

    root 0x16d, subw 0x0, time 4368633, (382,-252), root:(386,338),

    state 0x0, keycode 150 (keysym 0x1008ff2f, XF86Sleep), same_screen YES,

    XLookupString gives 0 bytes: 

    XmbLookupString gives 0 bytes: 

    XFilterEvent returns: False

KeyRelease event, serial 36, synthetic NO, window 0x4600001,

    root 0x16d, subw 0x0, time 4368633, (382,-252), root:(386,338),

    state 0x0, keycode 150 (keysym 0x1008ff2f, XF86Sleep), same_screen YES,

    XLookupString gives 0 bytes: 

    XFilterEvent returns: False

ClientMessage event, serial 37, synthetic YES, window 0x4600001,

    message_type 0x122 (WM_PROTOCOLS), format 32, message 0x123 (WM_DELETE_WINDOW)

```

As you can see, X does recognise the keystrokes correctly as how they should be interpreted. But it does nothing.

----------

## ppurka

 *AgBr wrote:*   

> 
> 
> As you can see, X does recognise the keystrokes correctly as how they should be interpreted. But it does nothing.

 X won't do anything, it is not X's job to execute actions on keystrokes. You need to configure kde to act upon those keystrokes. I stopped using the kde WM quite a while back, so I can't tell you what exactly you need to do to configure it.

----------

