Difference between revisions of "Talk:Thinkpad-acpi"

From ThinkWiki
Jump to: navigation, search
(where is it?)
m (improved a table)
 
(6 intermediate revisions by 5 users not shown)
Line 1: Line 1:
Anyone knows something about this new kernel driver?
+
== Problem with ACPI key event codes in OpenSuse 12.3 ==
We need some information about this!
 
  
--[[User:84.131.175.141|84.131.175.141]] 11:12, 27 Oct 2004 (CEST)
 
  
+ it is all on ibm-acpi.sf.net
+
The below information was relevant on my Thinkpad Z60m running:
for what i can say it only alows the fn keys to be reconized and the lamp to be turned on/off on the x21.
+
Linux 3.7.10-1.1-desktop
 +
OpenSuse 12.3
 +
KDE 4.10.00 "release 1"
 +
 
 +
I am currently running:
 +
Linux 3.7.10-1.4-desktop
 +
OpenSuse 12.3
 +
KDE 4.10.2 "release 1"
 +
and everything said below is still valid.
 +
 
 +
 
 +
--[[User:Jespergoll|Jespergoll]] ([[User talk:Jespergoll|talk]]) 16:20, 9 May 2013 (CEST)
 +
 
  
 
----
 
----
There are two drivers, the one on [http://ibm-acpi.sf.net ibm-acpi.sf.net] and the other one now in the kernel.
 
CONFIG_APCI_IBM and CONFIG_ACPI_THINKPAD.
 
  
--[[User:Akw|akw]] 10:37, 28 Oct 2004 (CEST)
 
  
----
+
I upgraded my Thinkpad Z60m to OpenSuse 12.3 shortly after its release on March 13th 2013 - and soon found that my ACPI key handling script ({{path|/usr/lib/acpid/thinkpad_handler}}) was broken.
Just did some googling and provided the information found without testing it.
+
 
[[User:Wyrfel|Wyrfel]] 19:00, 3 Nov 2004 (CET)
+
Specifically, they key events reported by the ACPI driver were different from what they had been before the upgrade - and so the following information (in {{path|../Documentation/laptops/thinkpad-acpi.txt}}) '''was no longer true on my system''':
----
+
 
 +
The driver will report HKEY events in the following format:
 +
 +
  ibm/hotkey HKEY 00000080 0000xxxx
 +
 
 +
Now, instead, the same HKEY events are generally reported in the following format:
 +
 
 +
button/xxxxx YYY 00000080 00000000 K
 +
 
 +
- where "xxxxx" is a lowercase name for either the key or the key function, and YYY is a shorter, capitalized version of the same. For example, Fn-F12 ("suspend to disk") is now being reported as:
 +
 
 +
button/suspend SUSP 00000080 00000000 K
 +
 
 +
I have found one exception to this general rule: Fn-F7 (the video switch button) is now being reported as:
 +
 
 +
video/switchmode VMOD 00000080 00000000 K
 +
 
 +
 
 +
So I had to rewrite my key handler script ({{path|/usr/lib/acpid/thinkpad_handler}}), and even the event mask (found in {{path|/etc/acpi/events/thinkpad}}). My general key event mask now looks like this:
 +
 
 +
event=button/.*
 +
action=/usr/lib/acpid/thinkpad_handler "%e"
 +
 
 +
To get the video switch script back in shape I created an additional event mask ({{path|/etc/acpi/events/video}}) with the following content:
 +
 
 +
event=video/switchmode
 +
action=/usr/lib/acpid/video_handler "%e"
 +
 
 +
and moved the video switching routines to a new script: {{path|/usr/lib/acpid/video_handler}}.
  
== where is it? ==
 
  
Has this thing finally been deprecated?  as of Linux 2.6.16.18, ibm-acpi is in-tree and working extremely well, and I can not find thinkpad_acpi.c or thinkpad-acpi or ACPI_THINKPAD anywhere...
+
Here is a list of the key events I have explored, and the event reports they now produce:
  
-- [[User:Hmh|hmh]] 2006-05-25 12:42:00 UTC
+
{| {{prettytable}}
 +
|+ selected ACPI key events
 +
! key !! event name !! short name !! constant part !! note
 +
|-
 +
| {{key|Fn}}{{key|F1}} || button/fnf1 || FNF1 || 00000080 00000000 K ||
 +
|-
 +
| {{key|Fn}}{{key|F2}} || button/battery || BAT || 00000080 00000000 K || {{footnote|1}}
 +
|-
 +
| {{key|Fn}}{{key|F3}} || button/screenlock || SCRNLCK || 00000080 00000000 K || {{footnote|1}}
 +
|-
 +
| {{key|Fn}}{{key|F4}} || button/sleep || SBTN || 00000080 00000000 K ||
 +
|-
 +
| {{key|Fn}}{{key|F5}} || button/wlan || WLAN || 00000080 00000000 K ||
 +
|-
 +
| {{key|Fn}}{{key|F6}} || button/fnf6 || FNF6 || 00000080 00000000 K ||
 +
|-
 +
| {{key|Fn}}{{key|F7}} || video/switchmode || VMOD || 00000080 00000000 K ||
 +
|-
 +
| {{key|Fn}}{{key|F8}} || button/zoom || ZOOM || 00000080 00000000 K || {{footnote|2}}
 +
|-
 +
| {{key|Fn}}{{key|F9}} || button/f24 || F24 || 00000080 00000000 K ||
 +
|-
 +
| {{key|Fn}}{{key|F10}} || (not reported to handler) || ||
 +
|-
 +
| {{key|Fn}}{{key|F11}} || button/fnf11 || FF11 || 00000080 00000000 K ||
 +
|-
 +
| {{key|Fn}}{{key|F12}} || button/suspend || SUSP || 00000080 00000000 K ||
 +
|-
 +
| {{key|Fn}}{{key|Space}} || button/zoom || ZOOM || 00000080 00000000 K || {{footnote|2}}
 +
|-
 +
| {{ibmkey|ThinkVantage|#495988}} || button/prog1 || PROG1 || 00000080 00000000 K ||
 +
|}
 +
 +
{{footnotes|
 +
#Fn-F2 and Fn-F3 seem to have become mixed up in the driver. On my machine at least, Fn-F2 is "lock" and Fn-F3 is "battery".
 +
#Please note that Fn-F8 and Fn-Space now produce identical event reports - so there is no way to distinguish one from the other.
 +
}}

Latest revision as of 19:00, 9 May 2013

Problem with ACPI key event codes in OpenSuse 12.3

The below information was relevant on my Thinkpad Z60m running:

Linux 3.7.10-1.1-desktop
OpenSuse 12.3
KDE 4.10.00 "release 1"

I am currently running:

Linux 3.7.10-1.4-desktop
OpenSuse 12.3
KDE 4.10.2 "release 1"

and everything said below is still valid.


--Jespergoll (talk) 16:20, 9 May 2013 (CEST)




I upgraded my Thinkpad Z60m to OpenSuse 12.3 shortly after its release on March 13th 2013 - and soon found that my ACPI key handling script (/usr/lib/acpid/thinkpad_handler) was broken.

Specifically, they key events reported by the ACPI driver were different from what they had been before the upgrade - and so the following information (in ../Documentation/laptops/thinkpad-acpi.txt) was no longer true on my system:

The driver will report HKEY events in the following format:

  ibm/hotkey HKEY 00000080 0000xxxx

Now, instead, the same HKEY events are generally reported in the following format:

button/xxxxx YYY 00000080 00000000 K

- where "xxxxx" is a lowercase name for either the key or the key function, and YYY is a shorter, capitalized version of the same. For example, Fn-F12 ("suspend to disk") is now being reported as:

button/suspend SUSP 00000080 00000000 K

I have found one exception to this general rule: Fn-F7 (the video switch button) is now being reported as:

video/switchmode VMOD 00000080 00000000 K


So I had to rewrite my key handler script (/usr/lib/acpid/thinkpad_handler), and even the event mask (found in /etc/acpi/events/thinkpad). My general key event mask now looks like this:

event=button/.*
action=/usr/lib/acpid/thinkpad_handler "%e"

To get the video switch script back in shape I created an additional event mask (/etc/acpi/events/video) with the following content:

event=video/switchmode
action=/usr/lib/acpid/video_handler "%e"

and moved the video switching routines to a new script: /usr/lib/acpid/video_handler.


Here is a list of the key events I have explored, and the event reports they now produce:

selected ACPI key events
key event name short name constant part note
FnF1 button/fnf1 FNF1 00000080 00000000 K
FnF2 button/battery BAT 00000080 00000000 K 1
FnF3 button/screenlock SCRNLCK 00000080 00000000 K 1
FnF4 button/sleep SBTN 00000080 00000000 K
FnF5 button/wlan WLAN 00000080 00000000 K
FnF6 button/fnf6 FNF6 00000080 00000000 K
FnF7 video/switchmode VMOD 00000080 00000000 K
FnF8 button/zoom ZOOM 00000080 00000000 K 2
FnF9 button/f24 F24 00000080 00000000 K
FnF10 (not reported to handler)
FnF11 button/fnf11 FF11 00000080 00000000 K
FnF12 button/suspend SUSP 00000080 00000000 K
FnSpace button/zoom ZOOM 00000080 00000000 K 2
ThinkVantage button/prog1 PROG1 00000080 00000000 K

FOOTNOTES [Δ]
  1. Fn-F2 and Fn-F3 seem to have become mixed up in the driver. On my machine at least, Fn-F2 is "lock" and Fn-F3 is "battery".
  2. Please note that Fn-F8 and Fn-Space now produce identical event reports - so there is no way to distinguish one from the other.