Bug 9198 - lower brightness (Fn + End) not logged
Summary: lower brightness (Fn + End) not logged
Status: CLOSED PATCH_ALREADY_AVAILABLE
Alias: None
Product: ACPI
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 low
Assignee: Zhang Rui
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-20 08:00 UTC by Toralf Förster
Modified: 2007-11-08 16:55 UTC (History)
0 users

See Also:
Kernel Version: 2.6.23
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
/etc/acpi/default.sh (2.09 KB, text/plain)
2007-11-05 00:45 UTC, Toralf Förster
Details
a small tool to listen to input events (885 bytes, text/plain)
2007-11-07 23:19 UTC, Zhang Rui
Details

Description Toralf Förster 2007-10-20 08:00:24 UTC
Most recent kernel where this bug did not occur:
Distribution: Gentoo (stable)
Hardware Environment: ThinkPad T41
Software Environment: sys-power/acpid-1.0.6-r1
Problem Description:

If I press <Fn>+<Pos1> the brightness of my ThinkPad is increased, pressing <Fn>+<End> decreases the brigthness step wise.

In both cases under KDE a status window is displayed with the current percentage of Brightness.

But I'm wondering why this acpi event is only logged for <Fn>+<Pos1> :

Oct 20 16:56:02 n22 acpid: received event "ibm/hotkey HKEY 00000080 00001010"
Oct 20 16:56:02 n22 acpid: notifying client 4785[0:0]
Oct 20 16:56:02 n22 acpid: executing action "/etc/acpi/default.sh ibm/hotkey HKEY 00000080 00001010"
Oct 20 16:56:02 n22 acpid: action exited with status 0
Oct 20 16:56:02 n22 acpid: completed event "ibm/hotkey HKEY 00000080 00001010"

In addition the script /etc/acpi/events/default catches only this case, decreasing the brightness works but the acpi event itself isn't logged, that's why it cannot be further processed.

This happens with previous kernel versions too, I tested it under straight vanilla kernel versions as well as under Gentoo kernel versions.

Steps to reproduce:
Comment 1 Toralf Förster 2007-10-20 09:28:44 UTC
BTW the current git sources :

n22 ~ # uname -a
Linux n22 2.6.23-ge8b8c977 #1 Sat Oct 20 18:16:50 CEST 2007 i686 Intel(R) Pentium(R) M processor 1700MHz GenuineIntel GNU/Linux

shows the same behaviour although I hoped that commit f2e1d89 would solve this.
Comment 2 Toralf Förster 2007-10-20 09:29:22 UTC
sry, I meant commit fba956c
Comment 3 Zhang Rui 2007-11-04 19:40:33 UTC
Please kill acpid and cat /proc/acpi/events, can you see
"ibm/hotkey HKEY 00000080 00001011" when pressing Fn+End?

>In addition the script /etc/acpi/events/default catches only this case,
can you attach /etc/acpi/events/default and "/etc/acpi/default.sh please?
Comment 4 Toralf Förster 2007-11-05 00:45:55 UTC
Created attachment 13396 [details]
/etc/acpi/default.sh

No, I can't see this particualr event. However all others are displayed correctly (BTW, it the file name is /proc/acpi/event.
Here's the other file:

n22 ~ # cat /etc/acpi/events/default
# /etc/acpi/events/default
# This is the ACPID default configuration, it takes all
# events and passes them to /etc/acpi/default.sh for further
# processing.

# event keeps a regular expression matching the event. To get
# power events only, just use something like "event=button[ /]power.*"
# to catch it.
# action keeps the command to be executed after an event occurs
# In case of the power event above, your entry may look this way:
#event=button[ /]power.*
#action=/sbin/init 0

# Optionally you can specify the placeholder %e. It will pass
# through the whole kernel event message to the program you've
# specified.

event=.*
action=/etc/acpi/default.sh %e
Comment 5 Zhang Rui 2007-11-07 23:19:09 UTC
Created attachment 13453 [details]
a small tool to listen to input events

Please compile and run this program on your laptop to see if there is any input events exported by thinkpad_acpi driver when pressing hotkeys.
Comment 6 Zhang Rui 2007-11-07 23:24:29 UTC
Please:
#cat /proc/bus/input/devices (to see which event channel thinkpad_acpi driver is taking)
#gcc input.c and #./a.out x (listen to the input events sent by thinkpad_acpi, where x is the channel number.)
press fn_pos and fn+end hotkey and attach the output.
Comment 7 Toralf Förster 2007-11-08 09:15:17 UTC
tfoerste@n22 ~ $ cat /proc/bus/input/devices
I: Bus=0011 Vendor=0001 Product=0001 Version=ab54
N: Name="AT Translated Set 2 keyboard"
P: Phys=isa0060/serio0/input0
S: Sysfs=/class/input/input0
U: Uniq=
H: Handlers=kbd
B: EV=120013
B: KEY=4 2000000 3802078 f840d001 feffffdf ffefffff ffffffff fffffffe
B: MSC=10
B: LED=7

I: Bus=0010 Vendor=001f Product=0001 Version=0100
N: Name="PC Speaker"
P: Phys=isa0061/input0
S: Sysfs=/class/input/input1
U: Uniq=
H: Handlers=kbd
B: EV=40001
B: SND=6

I: Bus=0011 Vendor=0002 Product=000a Version=0000
N: Name="TPPS/2 IBM TrackPoint"
P: Phys=isa0060/serio1/input0
S: Sysfs=/class/input/input2
U: Uniq=
H: Handlers=mouse0
B: EV=7
B: KEY=70000 0 0 0 0 0 0 0 0
B: REL=3

I: Bus=0003 Vendor=046d Product=c03d Version=0110
N: Name="Logitech USB-PS/2 Optical Mouse"
P: Phys=usb-0000:00:1d.1-1/input0
S: Sysfs=/class/input/input3
U: Uniq=
H: Handlers=mouse1
B: EV=7
B: KEY=70000 0 0 0 0 0 0 0 0
B: REL=103

I: Bus=0019 Vendor=0000 Product=0002 Version=0000
N: Name="Power Button (FF)"
P: Phys=button_power/button/input0
S: Sysfs=/class/input/input4
U: Uniq=
H: Handlers=kbd
B: EV=3
B: KEY=100000 0 0 0

I: Bus=0019 Vendor=0000 Product=0005 Version=0000
N: Name="Lid Switch"
P: Phys=PNP0C0D/button/input0
S: Sysfs=/class/input/input5
U: Uniq=
H: Handlers=
B: EV=21
B: SW=1

I: Bus=0019 Vendor=0000 Product=0003 Version=0000
N: Name="Sleep Button (CM)"
P: Phys=PNP0C0E/button/input0
S: Sysfs=/class/input/input6
U: Uniq=
H: Handlers=kbd
B: EV=3
B: KEY=4000 0 0 0 0


BTW I haven't a /dev/input/eventX
Comment 8 Toralf Förster 2007-11-08 09:17:03 UTC
BTW under KDE 3.5.7 the Kmilo plugin recognize correctly both actions, pops up a windows called "Brightness" having a bar which is increased respectively decreased accordingly to the pressed keys.
Comment 9 Toralf Förster 2007-11-08 09:39:56 UTC
and finally :
I compiled the evdev module  (CONFIG_INPUT_EVDEV=m) and run your program w/o success. No Fn key event was logged, other key instead created events.
Comment 10 Toralf Förster 2007-11-08 10:19:54 UTC
ok, I tested the behaviour with current git kernel 2.6.24-rc2 and the reported issue went away, therefor I would close the bug.
Only one thing I'd like to mention : Even under 2.6.24-rc2 there was no event at event0 after I pressed <Fn>+<F?>.
Comment 11 Zhang Rui 2007-11-08 16:55:25 UTC
>Even under 2.6.24-rc2 there was no event at event0 after I pressed <Fn>+<F?>.
It's thinkpad_acpi rather than keyboard driver that handles the hotkey events.
So input events should be sent by thinkpad_acpi driver.
Make sure the thinkpad_acpi(CONFIG_THINKPAD_ACPI) is loaded and listen to that event channel it takes. :)

Note You need to log in before you can comment on or make changes to this bug.