Brightness up not generating ACPI event on Thinkpad T43p, T42, X31, X40, R52

Bug #222796 reported by Joel Ebel
46
This bug affects 1 person
Affects Status Importance Assigned to Milestone
hotkey-setup (Ubuntu)
Fix Released
Medium
Matt Zimmerman
Nominated for Jaunty by imachine
Intrepid
Fix Released
Medium
Matt Zimmerman
linux (Ubuntu)
Invalid
Medium
Unassigned
Nominated for Jaunty by imachine
Intrepid
Invalid
Medium
Unassigned

Bug Description

Binary package hint: linux-image-2.6.24-16-generic

On my Thinkpad T43p, using ubuntu hardy, the brightness down button generates an ACPI event, but the brightness up button does not. Brightness is still adjusted in hardware, however, there is an interesting effect when using gnome power-manager. When turning the brightness up, it's handled all in hardware, but when you press the brightness down button, the brightness returns to the last stored brightness that gpm knew about, which is most likely at the bottom unless you use the brightness applet. So the net effect is that you can turn the brightness up incrementally, but as soon as you press the down key, it goes all the way to the bottom. Killing gnome-power-manager prevents this behaviour, but causes other problems.

Apparently this affects a number of thinkpad models. I've updated the Summary to include those found so far.

Revision history for this message
MrAnt (mrant0) wrote :

I have the exact same problem with my T42. Ran xev and it captures an event for brightness down but nothing for up.

--MrAnt--

Revision history for this message
Martin Reiche (grimsrud) wrote :

I think I have the same problem on an IBM X31

Joel Ebel (jbebel)
description: updated
Revision history for this message
ich (summusducis) wrote : Re: Brightness up not generating ACPI event on Thinkpad T43p, T42, X31

Have the same problem on a T42 (2373-C89)

Revision history for this message
dullivan (dullivan) wrote :

Same problem on Thinkpad X40

Revision history for this message
Martin Reiche (grimsrud) wrote : Re: Brightness up not generating ACPI event on Thinkpad T43p, T42, X31, X40

Hi,
I think I have at least found a workaround (after someone else pushed me in the right direction): if you do

sudo su
echo enable,0xffffff > /proc/acpi/ibm/hotkey

both buttons generate acpi events and show the OSD.
But now: how to make it permanent?

Revision history for this message
Craig Meli (craig-meli) wrote :

the above command does help, is there anyway to make this permanent?

also another problem related to this im having is when i unplug the powercord the brightness will drop down like normal, when i replug the power the brightness will not go all the way up. Ill unplug the power again the brightness will drop, replug it and the brightness will still not go all the way back up but rather probably another 15% lower than the previous time i plugged the powercord back in...repeat this process and it will drop ~15% everytime until it cant get any lower ... any ideas???

this is on a T42p

Revision history for this message
Joel Ebel (jbebel) wrote :

I'm reassigning this to the hotkey-setup package, as the hotkey-setup init script is likely the best place to fix this. /proc/acpi/ibm/hotkey initializes to 0x008c7fff, and the hotkey-setup init script only modifies it to 0x00ff7fff, leaving the missing bit as the one controlling the brightness up button. In gutsy, the thinkpad_acpi module appears to initialize the value differently, so the brightness keys work by default. Strangely it appears that the hotkey-setup would enable all the hotkeys if you had intel, ati, or radeon drivers set up in your xorg.conf, but otherwise only the top 8 bits of the mask. I don't find a good explanation for this behavior. On my T43p, the default xorg.conf doesn't identify any driver, so this doesn't happen. Nor does it happen if I enable fglrx, which matches none of intel, ati, or radeon, and again it doesn't enable all hotkeys. I'd like to understand why this line is restricted to specific xorg video drivers.

Matt Zimmerman (mdz)
Changed in hotkey-setup:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Matt Zimmerman (mdz) wrote :

Can anyone comment on whether this is fixed in Intrepid? Please test the beta and report.

Revision history for this message
Sebastian Keller (skeller) wrote :

No, this is not fixed in intrepid as of today on a R52. The workaround still works, too.

Revision history for this message
Matt Zimmerman (mdz) wrote :

The brightness keys work fine on my T42 running 8.04/Hardy. I haven't tested Intrepid there yet.

Changed in linux:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Jonathan Blackhall (johnny-one-eye) wrote :

I believe when I loaded the beta livecd on my T61 the brightness buttons worked. I checked because I remembered they were not functional in the Hardy beta for a while. I can check again if anyone thinks it will be of use.

Revision history for this message
Matt Zimmerman (mdz) wrote :

The brightness buttons on my T61 do correctly generate ACPI events, but are subject to bug 280646 (should be fixed now)

Revision history for this message
Matt Zimmerman (mdz) wrote :

I've now tested current Intrepid on the system I mentioned in comment 10, and confirmed that there is a problem there.

lock screen: works
sleep: works
RF kill: works
detect screens: works
hibernate: didn't test (live CD)
brightness: works (in hardware), but no software event and thus no OSD
volume: works (in hardware), but no software event and thus no OSD

I noticed that:
1. thinkpad-keys was not running (it should be)
2. after starting thinkpad-keys, adjusting volume or brightness and then running thinkpad-keys --update triggered the OSD (so that part works)
3. Running acpid -d, I could see no events generated for brightness or volume

I don't know why thinkpad-keys wasn't running. Running sudo /etc/init.d/hotkey-setup started it, as it should. Could folks here comment on whether thinkpad-keys is running, whether the hotkey-setup init script starts it, and whether it makes a difference when it is running?

Revision history for this message
Matt Zimmerman (mdz) wrote :

Confirmed that the combination of starting thinkpad-keys and using an ibm-acpi hotkey mask of 0xffffff fixed the problem.

I'm attaching the acpid output showing the events generated by:
- volume down
- volume up
- mute
- brightness down
- brightness up

Revision history for this message
Matt Zimmerman (mdz) wrote :

Bug 256887 explains why the mask was changed in Intrepid. Timo, it appears that the default mask is not working properly at least for some models.

Revision history for this message
Matt Zimmerman (mdz) wrote :

I'm preparing an upload to revert the default mask to 0xffffff, as it was in Hardy. This should fix things for anyone for whom the workaround in https://bugs.edge.launchpad.net/ubuntu/+source/hotkey-setup/+bug/222796/comments/5 works.

However, the original bug description seems to describe a problem which affects hardy, which suggests that perhaps there is another problem here. If you still have problems with hotkey-setup 0.1-23ubuntu6, or the workaround doesn't fix your problem, please comment here and tell us what is in /proc/acpi/ibm/hotkey on your system.

Revision history for this message
Matt Zimmerman (mdz) wrote :

I've uploaded a new hotkey-setup package to my PPA for testing:

deb http://ppa.launchpad.net/mdz/ubuntu intrepid main
deb-src http://ppa.launchpad.net/mdz/ubuntu intrepid main

Revision history for this message
Chris Jones (cmsj) wrote :

Tested on a Thinkpad X300 which had working hotkeys already and Matt's change does not seem to have caused any regressions.

Revision history for this message
Matt Zimmerman (mdz) wrote :

The various ThinkPad models are known to behave differently in various
tricky ways, and so I would appreciate broader testing of this package
(hotkey-setup 0.1-23ubuntu6).

If you have a ThinkPad (any model), please:

1. Before testing, make a note of which hotkeys work and which (if any) don't:
Lock Screen
Battery status
Sleep
Wifi/RF kill
Switch displays
Hibernate
Brightness up
Brightness down
Volume up
Volume down
Mute
2. Install the package from my PPA
3. Reboot
4. Check that your hotkeys still work, whichever ones you have:
5. Report your results to
https://bugs.edge.launchpad.net/ubuntu/+source/hotkey-setup/+bug/222796
noting your ThinkPad model number

Revision history for this message
Matt Zimmerman (mdz) wrote :

<tjaalton> mdz: works on my X61 like before, so no regressions there

Revision history for this message
Lucio Crusca (lucrus) wrote :

Unpatched Ubuntu 8.04 on ThinkPad SL500:
Lock Screen (Fn+F2) does nothing
Battery status (Fn+F3) does nothing (but I can't get what it's supposed to do, I see bat status correctly with the gnome applet)
Sleep (Fn+F4) works
Wifi/RF kill works
Switch displays works but with some problems (gnome bars sizes messed up, it seems the autodetection of the externa monitor/projector changes the notebook screen settings)
Hibernate (Fn+F12 I assume) does nothing
Brightness up is inverted and it makes the screen darker
Brightness down is inverted and it makes the screen brighter
Volume up does nothing
Volume down does nothing
Mute does nothing

but:

Configuring hotkey-setup (0.1-23ubuntu6) ...
 Removing any system startup links for /etc/init.d/hotkey-setup ...
   /etc/rc1.d/K20hotkey-setup
   /etc/rc2.d/S20hotkey-setup
   /etc/rc3.d/S20hotkey-setup
   /etc/rc4.d/S20hotkey-setup
   /etc/rc5.d/S20hotkey-setup
FATAL: Error inserting thinkpad_acpi (/lib/modules/2.6.27-rc9/kernel/drivers/misc/thinkpad_acpi.ko): No such device

I know, that's a custom kernel, but 2.6.27 is the only chance on ThinkPad SL500 to make the wireless work. What module have I missed during kernel config?

Revision history for this message
Lucio Crusca (lucrus) wrote :

BTW, I've just downgraded to hotkey-setup 0.1-17 (hardy) and it gives just the same errors, but dpkg does not exit with error and the package results correctly installed.

Revision history for this message
Matt Zimmerman (mdz) wrote :

I got another test report for an X60s. The new hotkey-setup got the volume up/down keys working where they were not before, and did not regress any other hot keys.

However, the mute key still doesn't work there (it does lock screen instead). This isn't significantly worse than before, though, where it did nothing.

Changed in hotkey-setup:
assignee: nobody → mdz
Revision history for this message
Matt Zimmerman (mdz) wrote :

Invalidating the linux task on this bug, since I don't think we want to fix this in the kernel (only in hotkey-setup)

Changed in linux:
status: Triaged → Invalid
Revision history for this message
Lucio Crusca (lucrus) wrote :

update:

lucio@thinkpad:~$ cat /boot/config-2.6.27-rc9 | grep -i thinkpad
CONFIG_THINKPAD_ACPI=m
# CONFIG_THINKPAD_ACPI_DEBUG is not set
CONFIG_THINKPAD_ACPI_BAY=y
CONFIG_THINKPAD_ACPI_VIDEO=y
CONFIG_THINKPAD_ACPI_HOTKEY_POLL=y

# modprobe thinkpad_acpi
FATAL: Error inserting thinkpad_acpi (/lib/modules/2.6.27-rc9/kernel/drivers/misc/thinkpad_acpi.ko): No such device

So I did not forget any module, it's only that the kernel does not recognize the SL500 acpi as a thinkpad acpi. Should I report a bug against the kernel (upstream) or is that normal?

Revision history for this message
Matt Zimmerman (mdz) wrote : Re: [Bug 222796] Re: Brightness up not generating ACPI event on Thinkpad T43p, T42, X31, X40, R52

On Mon, Oct 13, 2008 at 01:48:44PM -0000, Lucio Crusca wrote:
> update:
>
> lucio@thinkpad:~$ cat /boot/config-2.6.27-rc9 | grep -i thinkpad
> CONFIG_THINKPAD_ACPI=m
> # CONFIG_THINKPAD_ACPI_DEBUG is not set
> CONFIG_THINKPAD_ACPI_BAY=y
> CONFIG_THINKPAD_ACPI_VIDEO=y
> CONFIG_THINKPAD_ACPI_HOTKEY_POLL=y
>
> # modprobe thinkpad_acpi
> FATAL: Error inserting thinkpad_acpi (/lib/modules/2.6.27-rc9/kernel/drivers/misc/thinkpad_acpi.ko): No such device
>
> So I did not forget any module, it's only that the kernel does not
> recognize the SL500 acpi as a thinkpad acpi. Should I report a bug
> against the kernel (upstream) or is that normal?

I don't know. Your problem seems to be entirely unrelated to the one we're
discussing in this bug, and you're using a custom kernel, so please discuss
it with the upstream developers.

--
 - mdz

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Tested on my Thinkpad T60:

TASK old package new package
Lock Screen y y
Battery status y y
Sleep n n
Wifi/RF kill y n
Switch displays n n
Hibernate y y
Brightness up y y
Brightness down y y
Volume up y y
Volume down y y
Mute y y

Note: brightness and sound controls wouldn't show an OSD before installing hotkey-setup 0.1-23ubuntu6, but still seem to work, but now they do show the OSD.

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Tested on my Thinkpad T61p

                             Before After
Volume up yes yes
Volume down yes yes
Mute yes yes
Battery status yes yes
Brightness up yes yes
Brightness down yes yes
Lock Screen yes yes
Wifi/RF kill yes yes
Switch displays ? ?
Sleep yes* yes*
Hibernate ? ?

No regressions to report here.

* resume from sleep yields my wifi inoperable, must reboot to get working again. This is a separate issue, most likely.

:-Dustin

Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

The newer hotkey-setup is definitively better for my ThinkPad T30.

Results for IBM ThinkPad T30 (2366-92U)

Results on Hardy:

Lock Screen: Works and generates ACPI event
Sleep: Works and generates ACPI event
Switch displays: generates ACPI event (no external monitor for testing)
Hibernate: Works and generates ACPI event (laptop doesn't hibernate properly)
Brightness up: Works but no OSD and no ACPI event
Brightness down: Works but no OSD and no ACPI event
Volume up: Works but no OSD, no ACPI event, and software mixer doesn't adjust
Volume down: Works but no OSD, no ACPI event, and software mixer doesn't adjust
Mute: Works but no OSD, no ACPI event, and software mixer doesn't adjust
Keyboard light: Works but no ACPI event

Results on Intrepid Beta (before PPA hotkey-setup):

Lock Screen: Works and generates ACPI event
Sleep: Works and generates ACPI event
Switch displays: generates ACPI event (no external monitor for testing)
Hibernate: Works and generates ACPI event (laptop does hibernate properly)
Brightness up: Works but no OSD and no ACPI event
Brightness down: Works but no OSD and no ACPI event
Volume up: Works but no OSD, no ACPI event, and software mixer doesn't adjust
Volume down: Works but no OSD, no ACPI event, and software mixer doesn't adjust
Mute: Works but no OSD, no ACPI event, and software mixer doesn't adjust
Keyboard light: Works but no ACPI event

Results on Intrepid Beta (after PPA hotkey-setup):

Lock Screen: Works and generates ACPI event
Sleep: Works and generates ACPI event
Switch displays: generates ACPI event (no external monitor for testing)
Hibernate: Works and generates ACPI event (laptop does hibernate properly)
Brightness up: Works with OSD and ACPI event
Brightness down: Works with OSD and ACPI event
Volume up: Works with OSD, ACPI event, and software mixer adjusts
Volume down: Works with OSD, ACPI event, and software mixer adjusts
Mute: Works with OSD, ACPI event, and software mixer adjusts
Keyboard light: Works but no ACPI event

Revision history for this message
Matt Zimmerman (mdz) wrote :

Thanks to everyone who helped in testing. I have enough confidence in the changes now that I've uploaded them to Intrepid. They should be available within an hour or so, at which time it will no longer be necessary to use the PPA in order to get this fix.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package hotkey-setup - 0.1-23ubuntu6

---------------
hotkey-setup (0.1-23ubuntu6) intrepid; urgency=low

  * Revert 0.1-23ubuntu4 and use a different method to set the hotkey mask:

    + Add hotkey mask definitions to ibm.hk
    + Use the sysfs interface rather than the old procfs interface
    + Unconditionally try to enable the bits for volume and brightness
    + Restore the test for the thinkpad key, and start the daemon if
      setting the corresponding bit doesn't work
    + For everything else, just accept the driver defaults

  * Thanks to Matthew Garrett for background on the old code and the
    thinkpad_acpi driver

  * This should address LP: #222796 without reopening LP: #256887

 -- Matt Zimmerman <email address hidden> Mon, 13 Oct 2008 11:21:30 +0100

Changed in hotkey-setup:
status: Triaged → Fix Released
Revision history for this message
DSHR (s-heuer) wrote :

hotkey-setup (0.1-23ubuntu6) in intrepid fixes the problem of no OSD for the volume keys on Lenovo X60s. The former working (without OSD) mute key actually locks the screen now. This effect is new - never observed that before. The volume keys do work correctly now:

Volume Up; correct function, OSD OK
Volume Down: Stops MediaPlayer, OSD OK
Volume Mute; Stops MediaPlayer and Locks Screen

Thinkpad Key has no function
MediaPlayer Keys (backward, stop, forward) work with banshee!

Revision history for this message
DSHR (s-heuer) wrote :

hotkey-setup (0.1-23ubuntu6) in intrepid fixes the problem of no OSD for the volume keys on Lenovo X60s. The former working (without OSD) mute key actually locks the screen now. This effect is new - never observed that before.

Results on Intrepid Beta on Lenovo X60s:
Lock Screen: Works and generates ACPI event
Sleep: Works and generates ACPI event
Switch displays: generates ACPI event (no external monitor for testing)
Hibernate: Works and generates ACPI event (laptop does hibernate properly)
Brightness up: Works with OSD and 3 ACPI events:
 ibm/hotkey HKEY 00000080 00001010
 video LCD0 00000086 00000000
 ibm/hotkey HKEY 00000080 00005010
Brightness down: Works with OSD and ACPI event
Volume up: Works with OSD, ACPI event, and software mixer adjusts
Volume down: Works with OSD, ACPI event, and software mixer adjusts, player stops!
Mute: Works with OSD, ACPI event, software mixer does not adjust, screen locks!
Keyboard light: Works but no ACPI event

Thinkpad Key generates ACPI event - no function, not mappable in Gnome Keyboard
MediaPlayer Keys (backward, stop, forward) work with banshee! (no ACPI events)

Revision history for this message
Matt Zimmerman (mdz) wrote :

On Mon, Oct 13, 2008 at 10:07:45PM -0000, DSHR wrote:
> hotkey-setup (0.1-23ubuntu6) in intrepid fixes the problem of no OSD for
> the volume keys on Lenovo X60s. The former working (without OSD) mute
> key actually locks the screen now. This effect is new - never observed
> that before.
>
> Results on Intrepid Beta on Lenovo X60s:
> Lock Screen: Works and generates ACPI event
> Sleep: Works and generates ACPI event
> Switch displays: generates ACPI event (no external monitor for testing)
> Hibernate: Works and generates ACPI event (laptop does hibernate properly)
> Brightness up: Works with OSD and 3 ACPI events:
> ibm/hotkey HKEY 00000080 00001010
> video LCD0 00000086 00000000
> ibm/hotkey HKEY 00000080 00005010
> Brightness down: Works with OSD and ACPI event
> Volume up: Works with OSD, ACPI event, and software mixer adjusts
> Volume down: Works with OSD, ACPI event, and software mixer adjusts, player stops!
> Mute: Works with OSD, ACPI event, software mixer does not adjust, screen locks!
> Keyboard light: Works but no ACPI event
>
> Thinkpad Key generates ACPI event - no function, not mappable in Gnome Keyboard
> MediaPlayer Keys (backward, stop, forward) work with banshee! (no ACPI events)

Thank you for the detail. Could you open a separate hotkey-setup bug about
the problems with the Volume down and Mute keys behaving unexpectedly? I
think those are probably connected somehow.

Please include the ACPI events, lshal -m, etc. in the bug report and post
the bug number here for continuity.

--
 - mdz

Revision history for this message
Jane Silber (silbs) wrote :

I have an X60s. The recent hotkey update made by volume up/down keys worked (they had worked in Hardy, but regressed in Intrepid Beta). However, the mute hotkey invokes Lock Screen.

I believe a previous reporter with an X60s noted that a brightness key made music/audio stop playing. This doesn't happen for me (when listening with Rhythmbox).

Revision history for this message
Matt Zimmerman (mdz) wrote :

On Tue, Oct 14, 2008 at 01:14:44PM -0000, Jane Silber wrote:
> I have an X60s. The recent hotkey update made by volume up/down keys
> worked (they had worked in Hardy, but regressed in Intrepid Beta).
> However, the mute hotkey invokes Lock Screen.
>
> I believe a previous reporter with an X60s noted that a brightness key
> made music/audio stop playing. This doesn't happen for me (when
> listening with Rhythmbox).

I've confirmed on Jane's X60s that the mute key correctly generates exactly one
ACPI event:

 acpid: received event "ibm/hotkey HKEY 00000080 00001017"
 acpid: rule from 24760[0:0] matched
 acpid: notifying client 24760[0:0]
 acpid: rule from 5696[107:114] matched
 acpid: notifying client 5696[107:114]
 acpid: rule from /etc/acpi/events/thinkpad-mute matched
 acpid: executing action "/etc/acpi/always-mute.sh"
 BEGIN HANDLER MESSAGES
 END HANDLER MESSAGES
 acpid: action exited with status 0
 acpid: 3 total rules matched
 acpid: completed event "ibm/hotkey HKEY 00000080 00001017"

always-mute.sh does:

acpi_fakekey $KEY_VOLUMEUP
acpi_fakekey $KEY_MUTE

I also checked her keyboard shortcuts, and Lock Screen is set to the default
of Ctrl+Alt+L.

I don't know what's triggering the lock screen event.

--
 - mdz

Revision history for this message
DSHR (s-heuer) wrote :

My mute key locks the screen, same situation as described by Jane:

m500286@x60:~$ acpi_listen
ibm/hotkey HKEY 00000080 00001017

m500286@x60:~$ lshal -m

Start monitoring devicelist:
-------------------------------------------------
16:46:36.257: computer_logicaldev_input_5 condition ButtonPressed = mute

No visible X events ...

Even with a stopped acpid the mute-button locks the screen. Is this handled by Xorg?

BTW: The keys worked for me before the update, they just did not trigger the OSD and they did not get passed to the software mixer. So for me it's a regression.

Revision history for this message
Matt Zimmerman (mdz) wrote :

On Tue, Oct 14, 2008 at 02:50:25PM -0000, DSHR wrote:
> My mute key locks the screen, same situation as described by Jane:
>
> m500286@x60:~$ acpi_listen
> ibm/hotkey HKEY 00000080 00001017
>
> m500286@x60:~$ lshal -m
>
> Start monitoring devicelist:
> -------------------------------------------------
> 16:46:36.257: computer_logicaldev_input_5 condition ButtonPressed = mute
>
> No visible X events ...
>
> Even with a stopped acpid the mute-button locks the screen. Is this
> handled by Xorg?

Try using lsinput and input-events (in input-utils) to see whether an input
event is being generated somewhere.

> BTW: The keys worked for me before the update, they just did not trigger
> the OSD and they did not get passed to the software mixer. So for me
> it's a regression.

I wonder why it's different on your system than Jane's...

--
 - mdz

Revision history for this message
Julius Bloch (jbloch) wrote :

Hi,
I have a thinkpad x41 tablet.
Brigthness up is working very randomly.
I have the strong effect that if the notebook is running on battery the brigthness goes down without pressing any brightness key. If it then press the brightness up key it takes a very long time after the keypress is processed.

Revision history for this message
DSHR (s-heuer) wrote :
Download full text (3.2 KiB)

Concentrating on the Mute Key on Thinkpad X60s:

# lsinput
/dev/input/event0
   bustype : BUS_ADB
   vendor : 0x1
   product : 0x1
   version : 256
   name : "Macintosh mouse button emulation"
   bits ev : EV_SYN EV_KEY EV_REL

/dev/input/event1
   bustype : BUS_I8042
   vendor : 0x1
   product : 0x1
   version : 43860
   name : "AT Translated Set 2 keyboard"
   phys : "isa0060/serio0/input0"
   bits ev : EV_SYN EV_KEY EV_MSC EV_LED EV_REP

/dev/input/event2
   bustype : BUS_ISA
   vendor : 0x1f
   product : 0x1
   version : 256
   name : "PC Speaker"
   phys : "isa0061/input0"
   bits ev : EV_SYN EV_SND

/dev/input/event3
   bustype : BUS_HOST
   vendor : 0x0
   product : 0x2
   version : 0
   name : "Power Button (FF)"
   phys : "LNXPWRBN/button/input0"
   bits ev : EV_SYN EV_KEY

/dev/input/event4
   bustype : BUS_HOST
   vendor : 0x0
   product : 0x5
   version : 0
   name : "Lid Switch"
   phys : "PNP0C0D/button/input0"
   bits ev : EV_SYN EV_SW

/dev/input/event5
   bustype : BUS_HOST
   vendor : 0x0
   product : 0x3
   version : 0
   name : "Sleep Button (CM)"
   phys : "PNP0C0E/button/input0"
   bits ev : EV_SYN EV_KEY

/dev/input/event6
   bustype : BUS_HOST
   vendor : 0x0
   product : 0x6
   version : 0
   name : "Video Bus"
   phys : "/video/input0"
   bits ev : EV_SYN EV_KEY

/dev/input/event7
   bustype : BUS_HOST
   vendor : 0x0
   product : 0x6
   version : 0
   name : "Video Bus"
   phys : "/video/input0"
   bits ev : EV_SYN EV_KEY

/dev/input/event8
   bustype : BUS_I8042
   vendor : 0x2
   product : 0xa
   version : 0
   name : "TPPS/2 IBM TrackPoint"
   phys : "isa0060/serio1/input0"
   bits ev : EV_SYN EV_KEY EV_REL

/dev/input/event9
   bustype : BUS_HOST
   vendor : 0x17aa
   product : 0x5054
   version : 16641
   name : "ThinkPad Extra Buttons"
   phys : "thinkpad_acpi/input0"
   bits ev : EV_SYN EV_KEY EV_MSC EV_SW

# input-events -g -t 5 9
/dev/input/event9
   bustype : BUS_HOST
   vendor : 0x17aa
   product : 0x5054
   version : 16641
   name : "ThinkPad Extra Buttons"
   phys : "thinkpad_acpi/input0"
   bits ev : EV_SYN EV_KEY EV_MSC EV_SW

grabbed input device
waiting for events
21:45:00.876229: EV_KEY KEY_MIN_INTERESTING pressed
21:45:00.876242: EV_SYN code=0 value=0
21:45:00.876245: EV_KEY KEY_MIN_INTERESTING released
21:45:00.876249: EV_SYN code=0 value=0
timeout, quitting
released input device

# acpi_listen
ibm/hotkey HKEY 00000080 00001017

xev does not show the key

showkey
kb mode was RAW
[ if you are trying this under X, it might not work
since the X server is also reading /dev/console ]

press any key (program terminates 10s after last keypress)...
keycode 113 press
keycode 113 release
^Ccaught signal 2, cleaning up...

showkey -s
kb mode was RAW
[ if you are trying this under X, it might not work
since the X server is also reading /dev/console ]

press any key (program terminates 10s after last keypress)...
0xe0 0x20 0xe0 0xa0
^Ccaught signal 2, cleaning up...

$ lshal -m

Start monitoring devicelist:
-------------------------------------------------
21:54:21.164: computer_logicaldev_input_5 condition ButtonPressed = mute
^C

St...

Read more...

Revision history for this message
DSHR (s-heuer) wrote :

And here is the output from a verbose g-p-m:

TI:23:07:40 TH:0x86b2640 FI:gpm-button.c FN:gpm_button_filter_x_events,122
 - Key 160 mapped to HAL key lock
TI:23:07:40 TH:0x86b2640 FI:gpm-manager.c FN:button_pressed_cb,1020
 - Button press event type=lock
TI:23:07:40 TH:0x86b2640 FI:gpm-srv-screensaver.c FN:button_pressed_cb,167
 - Button press event type=lock
TI:23:07:40 TH:0x86b2640 FI:gpm-screensaver.c FN:gpm_screensaver_lock,250
 - doing gnome-screensaver lock
TI:23:07:41 TH:0x86b2640 FI:gpm-backlight.c FN:gpm_backlight_button_pressed_cb,536
 - Button press event type=lock
TI:23:07:41 TH:0x86b2640 FI:gpm-info.c FN:button_pressed_cb,679
 - Button press event type=lock
TI:23:07:41 TH:0x86b2640 FI:gpm-brightness-xrandr.c FN:gpm_brightness_xrandr_filter_xevents,552
 - Event0 0x8824e00
TI:23:07:41 TH:0x86b2640 FI:gpm-screensaver.c FN:gpm_screensaver_session_idle_changed,91
 - emitting session-idle-changed : (1)
TI:23:07:41 TH:0x86b2640 FI:gpm-idle.c FN:session_idle_changed_cb,310
 - Received GS session idle changed: 1
TI:23:07:41 TH:0x86b2640 FI:gpm-idle.c FN:gpm_idle_set_mode,98
 - Doing a state transition: 2
TI:23:07:41 TH:0x86b2640 FI:gpm-dpms.c FN:gpm_dpms_set_active,443
 - setting DPMS active: 1
TI:23:07:41 TH:0x86b2640 FI:gpm-dpms.c FN:x11_sync_server_dpms_settings,130
 - Syncing DPMS settings enabled=1 timeouts=0 0 1500
TI:23:07:41 TH:0x86b2640 FI:gpm-dpms.c FN:x11_sync_server_dpms_settings,187
 - set DPMS timeouts: 0 0 1500.
TI:23:07:41 TH:0x86b2640 FI:gpm-backlight.c FN:gpm_backlight_notify_system_idle_changed,587
 - state not changed
TI:23:07:41 TH:0x86b2640 FI:gpm-backlight.c FN:gpm_backlight_brightness_evaluate_and_set,379
 - 1. main brightness 0,710000
TI:23:07:41 TH:0x86b2640 FI:gpm-backlight.c FN:gpm_backlight_brightness_evaluate_and_set,397
 - 2. battery scale 1,000000, brightness 0,710000
TI:23:07:41 TH:0x86b2640 FI:gpm-backlight.c FN:gpm_backlight_brightness_evaluate_and_set,416
 - 3. idle scale 1,000000, brightness 0,710000
TI:23:07:41 TH:0x86b2640 FI:gpm-backlight.c FN:gpm_backlight_brightness_evaluate_and_set,436
 - 4. ambient scale 1,000000, brightness 0,710000
TI:23:07:41 TH:0x86b2640 FI:gpm-brightness.c FN:gpm_brightness_trust_cache,102
 - using cache for value 71 (probably okay)
TI:23:07:41 TH:0x86b2640 FI:gpm-backlight.c FN:gpm_backlight_brightness_evaluate_and_set,444
 - values are the same, no action
TI:23:07:41 TH:0x86b2640 FI:gpm-backlight.c FN:gpm_backlight_sync_policy,160
 - choosing sensible default
TI:23:07:41 TH:0x86b2640 FI:gpm-backlight.c FN:gpm_backlight_sync_policy,162
 - laptop, so use GPM_DPMS_METHOD_OFF
TI:23:07:41 TH:0x86b2640 FI:gpm-backlight.c FN:gpm_backlight_sync_policy,194
 - BACKLIGHT parameters 0 0 1500, method '4'
TI:23:07:41 TH:0x86b2640 FI:gpm-dpms.c FN:x11_sync_server_dpms_settings,130
 - Syncing DPMS settings enabled=1 timeouts=0 0 1500
TI:23:07:41 TH:0x86b2640 FI:gpm-manager.c FN:idle_changed_cb,903
 - Idle state changed: SESSION
TI:23:07:41 TH:0x86b2640 FI:gpm-info.c FN:gpm_info_event_log,579

Revision history for this message
DSHR (s-heuer) wrote :

The mute key is recognized by gnome-power-manager as key 160, the reason seems to be a wrong mapping in X - don't know how to change that. Is xmodmap still the way to go? I'm using an evdev managed keyboard.

$ xev | grep -A2 --line-buffered '^KeyRelease' | sed -n '/keycode /s/^.*keycode \([0-9]*\).* (.*, \(.*\)).*$/\1 \2/p'
160 XF86ScreenSaver

Revision history for this message
Bryce Harrington (bryce) wrote :

In Hardy, xkb generally mapped:

  I20 = XF86AudioMute
  I160 = XF86ScreenSaver

For default xkb_keycodes "evdev", keycode 160 => I160
However for xkb_keycodes "basic", keycode 160 => I20

There are bunches of kludges for different keyboard layouts to map both of these keys differently, but none of those are particularly for thinkpad/lenovo so I'm assuming they don't factor in here.

In Intrepid, things are quite different of course, but I'm wondering if the above discrepancy sheds some light on why the mute key got mis-mapped to the screensaver function in particular.

Revision history for this message
Bryce Harrington (bryce) wrote :

One thing to test might be to edit your /usr/share/X11/xkb/keycodes/evdev and see if changing this:

        <I160> = 160; // #define KEY_COFFEE 152

to

        <I120> = 160; // #define KEY_COFFEE 152

makes the Mute key actually mute the speaker (which works for me on my dell 1420)

Also, just to check the most obvious, can you attach your xorg.conf and the output of `setxkbmap -print`?

Revision history for this message
Bryce Harrington (bryce) wrote :

DSHR, another random idea - can you check your System > Preferences > Keyboard Shortcuts and see what key is set for handling mute?

What I'm wondering is, if you upgraded from Hardy, and GNOME was hanging on to an old keyboard mapping for the key from when you used "basic", then perhaps possibly it's using some incorrect mapping. If this is the case, then maybe we just need GNOME to clue in that after upgrade it should regen its key mappings (or discard them or whatever).

Revision history for this message
Bryce Harrington (bryce) wrote :

Oh, also we need the output of `xkbcomp -xkb :0 -`

Both `xkbcomp -xkb :0 -` and `setxkbmap -print` are always needed for keyboard problems.

Revision history for this message
Bryce Harrington (bryce) wrote :

I forwarded the issue to https://bugs.freedesktop.org/show_bug.cgi?id=18255, but we need the aforementioned information before troubleshooting can be done.

Revision history for this message
DSHR (s-heuer) wrote :
Download full text (3.7 KiB)

Sorry for the delay ... can I remove gnome key settings with gconftool --recursive-delete?

$ xkbcomp -xkb :0
Warning: Could not load keyboard geometry for :0
                  BadAlloc (insufficient resources for operation)
                  Resulting keymap file will not describe geometry

$ setxkbmap -print
xkb_keymap {
 xkb_keycodes { include "evdev+aliases(qwertz)" };
 xkb_types { include "complete" };
 xkb_compat { include "complete" };
 xkb_symbols { include "pc+de+inet(evdev)+level3(ralt_switch)" };
 xkb_geometry { include "pc(pc104)" };
};

$ cat /etc/X11/xorg.conf
# XORG.CONf (xorg X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg

Section "Files"
EndSection

Section "InputDevice"
 Identifier "Generic Keyboard"
 Driver "kbd"
 Option "CoreKeyboard"
 Option "XkbRules" "xorg"
 Option "XkbModel" "pc105"
 Option "XkbLayout" "de"
EndSection

Section "InputDevice"
 Identifier "Configured Mouse"
 Driver "mouse"
 Option "CorePointer"
 Option "Device" "/dev/input/mice"
 Option "Protocol" "ImPS/2"
#Option "ZAxisMapping" "4 5"
#Option "Emulate3Buttons" "true"
       Option "Emulate3Buttons" "on"
       Option "Emulate3TimeOut" "50"
       Option "EmulateWheel" "on"
       Option "EmulateWheelTimeOut" "200"
       Option "EmulateWheelButton" "2"
       Option "YAxisMapping" "4 5"
       Option "XAxisMapping" "6 7"
       Option "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
 Identifier "Synaptics Touchpad"
 Driver "synaptics"
 Option "SendCoreEvents" "true"
 Option "Device" "/dev/psaux"
 Option "Protocol" "auto-dev"
 Option "HorizEdgeScroll" "0"
EndSection

Section "InputDevice"
 Driver "wacom"
 Identifier "stylus"
 Option "Device" "/dev/input/wacom"
 Option "Type" "stylus"
 Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection

Section "InputDevice"
 Driver "wacom"
 Identifier "eraser"
 Option "Device" "/dev/input/wacom"
 Option "Type" "eraser"
 Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection

Section "InputDevice"
 Driver "wacom"
 Identifier "cursor"
 Option "Device" "/dev/input/wacom"
 Option "Type" "cursor"
 Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection

Section "Device"
 Identifier "Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller"
 Driver "intel"
 BusID "PCI:0:2:0"
 # Option "AccelMethod" "exa"
 # Option "MigrationHeuristic" "greedy"
 # Option "ExaNoComposite" "false"
EndSection

Section "Monitor"
 Identifier "Standardbildschirm"
 Option "DPMS"
EndSection

Section "Screen"
 Identifier "Default Scr...

Read more...

Revision history for this message
Jim Popovitch (jimpop) wrote :

> Bryce Harrington wrote on 2008-10-28:
>
> One thing to test might be to edit your /usr/share/X11/xkb/keycodes/evdev and see if changing this:
>
> <I160> = 160; // #define KEY_COFFEE 152
>
> to
>
> <I120> = 160; // #define KEY_COFFEE 152
>
> makes the Mute key actually mute the speaker (which works for me on my dell 1420)

I can confirm that this change corrects the mute key on my T60p.

-Jim P.

Revision history for this message
Jim Popovitch (jimpop) wrote :

Opps! wrote too soon. setting <I120> no longer locks X, however it changes the mute key functionality to the same as up volume.

Revision history for this message
Jim Popovitch (jimpop) wrote :

One more update :-) This time with good news.

I removed all post-install customizations from Intrepid, and setting <I120> does in fact work correctly wrt the T60p Mute button. Naked config defaults to ACPI keyboard mappings, and those work correctly on my T60p with the single modification to /usr/share/X11/xkb/keycodes/evdev.

-Jim P.

Revision history for this message
DSHR (s-heuer) wrote :

<I120> fixes the mute key, I still have the problem that volume down stops totems play in addition to lowering the volume. I plan to reinstall my system - but not today 8-)

I can test the keys on Thinkpad T30, X60s , X61 and T61.

Revision history for this message
Onno Benschop (onno-itmaze) wrote :

I've just installed Intrepid from the Alternate CD and brightness works just fine on my R52 18586MM. I've made no customisations, no configuration changes, or any fixes and I started from a virgin disk (well, reformatted :)

The Access IBM key doesn't appear to work out of the box.

Revision history for this message
Michael Meese (pelennor) wrote :

Hey guys!

Last Saturday I got my brandnew Lenovo Thinkpad LS500 NRJ9AGE and installed Intrepid Ibex (8.10) 64bit.
The problems concerning the hotkeys are still up2date for this modell. I read that with hotkey-setup 0.1.28ubuntu7 the problems should be fixed, but unfortunately not for my SL500.

I tested following keys:

Key: Works?
------------------------------------------------
Lock Screen no
Battery status no
Sleep yes
Wifi/RF kill no
Switch displays yes
Hibernate no (but I use a encrypted swap-partition)
Brightness up yes, but inverted
Brightness down yes, but inverted
Volume up no
Volume down no
Mute no
Multimedia Keys no
Display Zoom no

And an additional key works also not. Which german description I couldn't really translate into english "Einstellungen von Eingabeeinheiten ändern". It have to be something like this: "Changing options of inputdevices".

The main problem is the brightness of the display. The hotkeys works very bad if I try to change the brightness.
The first thing is, that the function is inverted. The second point, the procedure of changing the brightness is very inaccurate. The background gets dark an returns than in an brighter or smother light. Its a very strong flickering of the display.
If I disconnect AC, the display gets on battery brighter and returning to AC it gets darker again. Cazy thing... Also when I log into Ubuntu with my user. First in the gdm, the display is shining like the sun. After I logged it gets darker again... GRML!!!

The are additional problems with the fingerprint sensor and the webcam. They dont work, but I think thats another construction side.

An additional hint:
If I do "sudo modprobe tinkpad_acpi", I get this message:

FATAL: Error inserting thinkpad_acpi
(/lib/modules/2.6.27-7-generic/kernel/drivers/misc/thinkpad_acpi.ko): No
such device

I would be so glad, if some can get me some advice. Its not very funny, if your brand new toy will not work in top condition.

Greetings!
Michael

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :
Revision history for this message
Michael Meese (pelennor) wrote :

This morning I shipped my Notebook back to my onlinetrade...

After one week of investigation I found the reason why it doesnt work correct an a SL500...

http://mailman.linux-thinkpad.org/pipermail/linux-thinkpad/2008-October/044992.html

It isnt a bug. The incompatibel fimrware is the reason why I wont work.

Revision history for this message
imachine (m-jedrasik) wrote :

After recent (9.04) hotkey-setup update, it stopped generating acpi events on my X40.

Any ideas?

I used to fiddle with /etc/modprobe.d/thinkpad_acpi.modprobe and passed hotkey=enable brightness_mode=1 to it, but I'd rather not fiddle with default settings of Ubuntu.

Besides, it should "just work".

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.