# Lenovo T61p special keys (another)

## skeimer

hi there!

I own a Lenovo T61p running Gentoo. Everything is working fine so far, except the special keys (mute, vol+/-, brightness etc.)

I tried nearly everything google an this forum advised, without success.

My configuration is so far:

Linux 2.6.28

sys-apps/hal-0.5.11-r1

app-misc/hal-info-20081219 (at the moment, because I tried the new policies I had to copy the portage ebuild)

x11-base/xorg-server-1.3.0.0-r6

The system is installed as AMD64, thinkpad-acpi is loaded as you can see:

```
thinkpad_acpi: ThinkPad ACPI Extras v0.21

thinkpad_acpi: http://ibm-acpi.sf.net/

thinkpad_acpi: ThinkPad BIOS 7LETB2WW (2.12 ), EC 7KHT24WW-1.08

thinkpad_acpi: Lenovo ThinkPad T61p, model 6457BQG

thinkpad_acpi: ACPI backlight control delay disabled

thinkpad_acpi: radio switch found; radios are disabled

thinkpad_acpi: This ThinkPad has standard ACPI backlight brightness control, supported by the ACPI video driver

thinkpad_acpi: Disabling thinkpad-acpi brightness events by default...

Registered led device: tpacpi::thinklight

Registered led device: tpacpi::power

Registered led device: tpacpi:orange:batt

Registered led device: tpacpi:green:batt

Registered led device: tpacpi::dock_active

Registered led device: tpacpi::bay_active

Registered led device: tpacpi::dock_batt

Registered led device: tpacpi::unknown_led

Registered led device: tpacpi::standby

thinkpad_acpi: Standard ACPI backlight interface not available, thinkpad_acpi native brightness control enabled

thinkpad_acpi: detected a 16-level brightness capable ThinkPad

input: ThinkPad Extra Buttons as /devices/virtual/input/input7

...

thinkpad_acpi: setting the hotkey mask to 0x0000ffff is likely not the best way to go about it

thinkpad_acpi: please consider using the driver defaults, and refer to up-to-date thinkpad-acpi documentation

```

The thinklight button is the only of them working (including KDE milo OSD hint)[/i].

Did anyone figure out how to get the keys working properly?

----------

## jettjunker

So you're using KDE?  I imagine KDE has a shortcut organizer like gnome, ya?  Have you tried to change them there?  If that doesn't work, you might need to use the keycodes (you can figure them out with xev) and set labels for them in ~/.xmodmap

For example, my .xmodmap is:

```
keycode 178 = XF86WWW

keycode 229 = XF86Search

keycode 236 = XF86Mail

keycode 160 = XF86AudioMute

keycode 174 = XF86AudioLowerVolume

keycode 176 = XF86AudioRaiseVolume
```

[you may have to set "xmodmap /home/USER/.xmodmap" to run at startup, but KDE might do that by default... gnome checks for the file and asks if it finds it]

After setting the same stuff for your particular keycodes it might just work, else you might again try to set it in KDE's shortcut manager.

You might find this helpful concerning what I described, as well as other options:

http://www.gentoo-wiki.info/HOWTO_Use_Multimedia_Keys

----------

## toralf

Do you have CONFIG_THINKPAD_ACPI and CONFIG_NVRAM set within kernel ?

----------

## skeimer

hello,

thank you very much for your replies and sorry for the delayed answer.

First of all: the CONFIG_THINKPAD_ACPI and CONFIG_NVRAM are compiled and loaded as module.

I checked the .Xmodmap, renamed it to lowercase and got some more key working (had to expect a silly mistake like that -> murphy), but there are still keys even xev cannot detect.

Let me summarise the actual state:

originally working keys:

Thinklight

search

Thinkvantage

keys that are working now after renaming .xmodmap with 

back

forward

vol +

vol -

mute

keys that are recognised but not linked to an action are:

play

stop

next title

previous title

lock (Fn+F2)

battery (Fn+F3)

monitor (Fn+F7)

touchpad (Fn+F8)

eject (Fn+F9)

to disk (fn+F12)

brightness up (fn+Pos1)

key recognised after executing "echo enable,0x00ffffff >/proc/acpi/ibm/hotkey" (firmware did not accept 0xffffffff):

brightness down

standby (Fn+F4)

also, there is no action linked to them

no problem so far, these are the remaining deniers even not detected by xev:

wireless (Fn+F5)

In several howtos etc I read that meanwhile the preferred way should be hal with correct fdi policies. By that reason I installed the latest build of them (see earlier post).

So is there a solution to get the remaining keys to work, maybe using hal?

ps: where can I find a complete list of the keysyms?

----------

## ppurka

 *Quote:*   

> key recognised after executing "echo enable,0x00ffffff >/proc/acpi/ibm/hotkey" (firmware did not accept 0xffffffff):

 You can get the recommended mask from

```
cat /sys/devices/platform/thinkpad_acpi/hotkey_recommended_mask
```

----------

## skeimer

hi ppurka,

thank you for that hint. Unfortunately this did not fix the Fn-F5 key.

However, the VIDEO_ACPI kernel config option is not selectable as fix, it has been deselected during the change from 2.6.27. Now the brightness is working again, on the other hand the display toggling stopped working  :Sad: 

I'll post the ongoing results here an will write it down cleaned up once it is finished.

----------

## ppurka

I am still on 2.6.27 (T61). One way to check that the keys are being read by acpi is to run acpi_listen and press the Fn-key combination. Change the hotkey mask and check again (not sure if we need to restart acpid too after changing the mask). As for display switching, it works but the external display's resolution is not quite proper. I had written a small note in gentoo-wiki quite a few months back:

http://en.gentoo-wiki.com/wiki/Lenovo_Thinkpad_T61#Fn-F7_with_Nvidia_drivers

The driver keeps the resolution as the native resolution of the laptop and instead makes the external display pan (with a virtual screen the same size as the laptop's resolution). This is highly inconvenient if you are about to give a presentation on a projector,- you would want the resolution to be that of the projector and not of the lcd.

EDIT: It seems you haven't mentioned whether you have a nvidia card or intel card. The above advice might or might not work if you have an intel card.

----------

