Gentoo Archives: gentoo-user

From: YoYo Siska <yoyo@××××××.sk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] How are Fn-F# ACPI events mapped?
Date: Tue, 13 Mar 2012 12:28:32
Message-Id: 20120313122731.GC6173@ksp.sk
In Reply to: [gentoo-user] How are Fn-F# ACPI events mapped? by Mark Knecht
1 On Sun, Mar 11, 2012 at 03:23:28PM -0700, Mark Knecht wrote:
2 > Hi,
3 > I'm trying to figure out how my Asus laptop maps function key
4 > events. This is being driven by an emerge message telling me that the
5 > acpi4asus package is being obsoleted and removed in 30 days and
6 > replaced by an in-kernel driver. I've removed the package and rebuilt
7 > my kernels to use this driver, and for vanilla-sources-3.2.7 the
8 > results are similar as with the acpi4asus package.
9
10 don't know anything about the assus packages/drivers, but the general
11 direction in all such drivers is to move these things where they belong:
12 to the input subsystem, so my guess is the new driver doesn't produce
13 acpi events, but insted create a "input device" and produce key
14 press/release events on that device...
15
16 (note that sleep / hibernate actions are usually still reported also
17 throgh acpi, because some programs expect them to come from there, that
18 would explaing your Fn-F1/sleep working)
19
20 to test this, just run as root on the linux console (not in a termnal in
21 X):
22
23 showkey -s
24
25 and then pres the keys (ie Fn-F4,) to stop showkeys, just don't press
26 anything for 10 seconds...
27 if you see numbers appearing after each keypress / release, then the key
28 directly generates keyboard ivents and its possible you will see them
29 directly in X, for that jus run (now under X)
30
31 xev
32
33 and (the window that appears must have focus / be active) press the keys
34 again, xev will print the X keycodes/keysyms to its output...
35 if you see reasonable names there, then you should be able to map those
36 keys in the programs you are using (ie global hotkeys in kde, etc...)
37 note however that qt/kde doesn't recognise some of the more exotic
38 keysyms... (in my case XF86TouchpadToggle produced by Fn-F8 on
39 thinkpads ;)
40
41 if you can see the key in showkey -s but not in xev, the problem might
42 be in kernel keyboard map (though i'm not sure if the x's evdev driver
43 uses that) or in the evdev driver not mapping that key
44
45 basically the kernel driver reports scan codes (what showkey -s shows),
46 kernel translates that to keycodes (showkey -k to see them) and then X's
47 input driver (ie evdev) translates those to the X keycodes X server
48 again trasnlates them to keysym-s....
49
50 yoyo
51
52
53
54 >
55 > However, for vanilla-sources-3.2.9 the only key that is doing
56 > anything seems to be Fn-F1 which says 'button/sleep' (using
57 > acpi_listen) but actually just turns on the screen saver as best I can
58 > tell.
59 >
60 > Note that even with 3.2.7 most keys don't actually work, but at
61 > least they all produce acpi_listen events. The only ones that do work
62 > in 3.2.7 and earlier are:
63 >
64 > Fn-F1 - screen saver
65 > Fn-F5 - turns off screen but doesn't seem to generate an ACPI event in
66 > acpi_listen (may be hardware mapped)
67 > Fn-F11 - turn volume down
68 > Fn-F12 - turn volume up
69 >
70 > I haven't tested the external monitor one.
71 >
72 > The ones I really want to figure out are Fn-F3 & F4 as they turn
73 > the keyboard lighting up and down. With 3.2.7 I had lighting, but with
74 > 3.2.9 I have no keyboard lighting at all so it will have hard to use
75 > in the dark.
76 >
77 > Before I call this a 3.2.9 regression I figured I should determine
78 > if I'm supposed to configure this stuff by hand, or maybe load some
79 > new machine specific package that sets up the mappings.
80 >
81 > Thanks in advance,
82 > Mark
83 >
84 >
85 > vanilla-sources-3.2.9
86 >
87 > slinky events # acpi_listen
88 > button/sleep SLPB 00000080 00000003
89 > button/sleep SLPB 00000080 00000004
90 >
91 >
92 >
93 > vanilla-sources-3.2.7
94 >
95 > slinky ~ # acpi_listen
96 > button/sleep SLPB 00000080 00000001
97 > hotkey ATKD 0000005d 00000000
98 > hotkey ATKD 0000007e 00000000
99 > hotkey ATKD 000000c5 00000000
100 > hotkey ATKD 000000c4 00000000
101 > hotkey ATKD 0000002e 00000000
102 > hotkey ATKD 0000001a 00000000
103 > hotkey ATKD 00000034 00000000
104 > hotkey ATKD 00000033 00000000
105 > hotkey ATKD 00000034 00000001
106 > hotkey ATKD 00000033 00000001
107 > hotkey ATKD 00000061 00000000
108 > hotkey ATKD 0000006b 00000000
109 > hotkey ATKD 00000032 00000000
110 > hotkey ATKD 00000032 00000001
111 > hotkey ATKD 00000032 00000002
112 > hotkey ATKD 00000031 00000000
113 > hotkey ATKD 00000031 00000001
114 > hotkey ATKD 00000031 00000002
115 > hotkey ATKD 00000030 00000000
116 > hotkey ATKD 00000030 00000001
117 > hotkey ATKD 00000030 00000002
118 > hotkey ATKD 00000030 00000003
119 >

Replies

Subject Author
Re: [gentoo-user] How are Fn-F# ACPI events mapped? Mark Knecht <markknecht@×××××.com>