[ltp] Enabling special buttons in R61 and T510
Janek S.
linux-thinkpad@linux-thinkpad.org
Mon, 18 Apr 2011 16:15:48 +0200
I have two Thinkpads: R61 (openSUSE 11.3) and T510 (openSUSE 11.4) and I'm struggling to get the
special keys (Fn+F[1-9] etc.) working. thinkpad_acpi (version 0.24) loads with no problems with
0xFFFFFF hotkey mask and experimental=1 option. ACPI events seem to be generated properly.
acpi_listen gives e.g.:
ibm/hotkey HKEY 00000080 00001002
ibm/hotkey HKEY 00000080 00001014
Brightness regulation works, ThinkLight and Fn+F5* also. Moreover, if I enable KMilo, then
Fn+Space also works**. Nevertheless I do not know how to make use of other keys. I found that
in /etc/acpi/events are configuration files responsible for handling ACPI events. By default
there's a file called "thinkpad":
[root@GLaDOS : /etc/acpi/events] cat thinkpad
# forward acpi events to the thinkpad handler (bluetooth etc.)
event=ibm/.*
action=/etc/acpid/events/thinkpad_handler "%e"
thinkpad_handler contains:
[root@GLaDOS : /etc/acpi/events] cat ../actions/thinkpad_handler
#!/bin/bash
HOTKEY=$1
set $HOTKEY
EVENT=$1 # "ibm/hotkey"
ACPI=$2 # "HOTK"
WHAT=$3 # "00000080"
SERIAL=$4 # "0000100c" Fn+F12
# bluetooth
if [ "$WHAT" = "00000080" -a "$SERIAL" = "00001005" ]; then
ACTION="disable"
grep -q "disabled" "/proc/acpi/ibm/bluetooth" && ACTION="enable"
echo $ACTION > "/proc/acpi/ibm/bluetooth"
fi
if [ "$WHAT" = "00000080" -a "$SERIAL" = "00001002" ]; then
/opt/kde3/bin/kdesktop_lock -forcelock
fi
Bluetooth section is created by default, kdesktop_lock section was created by me and it doesn't
seem to work. I followed these articles:
http://www.thinkwiki.org/wiki/How_to_get_special_keys_to_work
http://www.thinkwiki.org/wiki/How_to_configure_acpid
http://www.thinkwiki.org/wiki/Acpid
What am I doing wrong? The only sign that something may not be right is the statement from the
last article: "[acpid] listens on a file (/proc/acpi/event)". When I try to display the contents
of that file I get "resource busy" error.
*) On R61, Fn+F5 disables WiFi, but not Bluetooth. On T510 it seems to disable both WiFi and
bluetooth. This is strange, since the thinkpad_acpi documentation states: "Enables/disables the
internal Bluetooth hardware and W-WAN card if left in control of the firmware. Does not affect
the WLAN card.".
**) I disabled KMilo due to extremely anoying OSD. Is there a way to disable that OSD?
Regards,
Janek