Menu key emits XF86WakeUp on Thinkpad X61s

Bug #287428 reported by Václav Šmilauer on 2008-10-22
66
This bug affects 5 people
Affects Status Importance Assigned to Milestone
hotkey-setup (Ubuntu)
Undecided
Unassigned
Declined for Jaunty by Steve Langasek
xkeyboard-config (Ubuntu)
Undecided
Unassigned
Declined for Jaunty by Steve Langasek

Bug Description

When I press the menu key on Thinkpad X61s, it doesn't do anything. I checked with xev and the generated keycode is 151 (xev-reported), which is mapped to <I151> and this, in turn to XF86WakeUp.

I tried diferent keyboard models for Thinkpads, bot none of them worked in this respect. A temporary solution was to replace "XF86WakeUp" with "Menu" in /usr/share/X11/xkb/symbols/inet:86, where <I151> is mapped.

I am running fully up-to-date intrepid:

 ii xkb-data 1.3-2ubuntu4 X Keyboard Extension (XKB) configuration data

The same problem occurs on my T60 2007-63G. I used to have the compose key on my menu key.

Timo Aaltonen (tjaalton) wrote :

Works fine on my X61. What does 'xprop -root |grep XKB' show?

Changed in xkeyboard-config:
status: New → Incomplete
Václav Šmilauer (eudoxos) wrote :

 $ xprop -root |grep XKB
 _XKB_RULES_NAMES_BACKUP(STRING) = "evdev", "pc105", "cz", "qwerty", ""
 _XKB_RULES_NAMES(STRING) = "evdev", "thinkpad60", "us,cz", ",qwerty_bksl", grp:caps_toggle,grp:win_switch,srvrkeys:none,nbsp:level2,grp:menu_toggle"

 $ xev
 [...]
 KeyPress event, serial 30, synthetic NO, window 0x4200001,
    root 0x7d, subw 0x0, time 247541486, (248,166), root:(263,257),
    state 0x10, keycode 151 (keysym 0x1008ff2b, XF86WakeUp), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

 KeyRelease event, serial 33, synthetic NO, window 0x4200001,
    root 0x7d, subw 0x0, time 247541534, (248,166), root:(263,257),
    state 0x10, keycode 151 (keysym 0x1008ff2b, XF86WakeUp), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False
 [...]

Here is the output on my system (T60, german language environment):

$ xprop -root |grep XKB
_XKB_RULES_NAMES_BACKUP(STRING) = "evdev", "pc105", "de", "nodeadkeys", ""
_XKB_RULES_NAMES(STRING) = "evdev", "thinkpad60", "de", "nodeadkeys", "ctrl:nocaps,compose:menu"

Behnam Esfahbod "ZWNJ" (behnam) wrote :

I have the same problem with X61 Tablet too.

_XKB_RULES_NAMES_BACKUP(STRING) = "evdev", "pc105", "us", "", "grp:alts_toggle"
_XKB_RULES_NAMES(STRING) = "evdev", "pc105", "us", "", "grp:alts_toggle"

Is it possible to fix this by changing the keycode for Fn or Menu keys in hotkey-setup/ibm.hk??

Matthäus Brandl (matthaeus) wrote :

Same here on a X60s:
% xprop -root | grep XKB
_XKB_RULES_NAMES_BACKUP(STRING) = "evdev", "evdev", "de", "nodeadkeys", "lv3:ralt_switch,compose:menu"
_XKB_RULES_NAMES(STRING) = "evdev", "evdev", "de", "nodeadkeys", "lv3:ralt_switch,compose:menu,ctrl:ctrl_aa,compose:menu"

Btw, Fn returns XF86WakeUp as well... (Though it works as expected)

Václav Šmilauer (eudoxos) wrote :

I think that it is actually BIOS that handles Fn+something and generates ACPI events from that, which the system responds to. For instance here, Fn+F2 locks the screen but Menu+F2 doesn't, although the keysyms as reported by X (XF86WakeUp) are the same for both Fn and Menu.

Bryce Harrington (bryce) wrote :

Okay, if the bios is fiddling with things, the issue will need to be worked out at the kernel level. Reassigning.
See https://wiki.ubuntu.com/Hotkeys/ (esp. the Troubleshooting sub-page) for more info.

Jeffrey Baker (jwbaker) wrote :

This doesn't have anything to do with the kernel or the BIOS. Please try to keep pointless buck-passing to a minimum.

Changed in xkeyboard-config:
status: New → Confirmed
Bryce Harrington (bryce) wrote :

Not really an xkeyboard-config issue; more of a hotkey problem.
See http://wiki.ubuntu.com/Hotkeys for more help in tracking down hotkey problems.

nandhp (nandhp) wrote :

$ xprop -root |grep XKB
_XKB_RULES_NAMES_BACKUP(STRING) = "evdev", "pc105", "us", "", ""
_XKB_RULES_NAMES(STRING) = "evdev", "pc104", "us", "altgr-intl", "lv3:ralt_alt,compose:caps,lv3:menu_switch"

I'm having the same problem on a Lenovo ThinkPad T500 running up-to-date Intrepid.

Paul Fisher (thetorpedodog) wrote :

This problem also affects the IBM Thinkpad T60p.

_XKB_RULES_NAMES_BACKUP(STRING) = "evdev", "pc105", "us", "", ""
_XKB_RULES_NAMES(STRING) = "evdev", "thinkpad60", "us", "", "ctrl:nocaps,compose:menu"

Robert Persson (ireneshusband) wrote :

If you want the menu key to pop up contextual menus, then Václav Šmilauer's solution works. If you want it to act as a compose key, you can edit /usr/share/X11/xkb/keycodes/evdev and map the lessthangreaterthan key onto it and select that as the compose key in your keyboard preferences. In both these cases, the function key continues to behave the same as the menu key in xev, but it continues to do its function key job properly.

If you can make the key behave as it should through some hacks in /usr/share/X11/xkb, then I find it hard to see how this could be a kernel issue, and certainly not a BIOS issue. In other words I too cannot see the value in kicking this off to the hotkeys people.

FaberfoX (faberfox) wrote :

T61 here, up to date jaunty, issue is still present, would be great to see it fixed for release.
One thing I'm not sure is relevant here is that when mapping the key to Menu on /usr/share/X11/xkb/symbols/inet, it does not work if set as compose or to switch layout.
Everything Robert Persson says is right, so who should be contacted regarding this?

Chad Miller (cmiller) wrote :

Same for X301. Menu key yields XF86WakeUp.

I don't know if it matters, but X thinks there's *two* keyboards for thinkpads.

[ 2.290479] (**) ThinkPad Extra Buttons: always reports core events
[ 2.290512] (**) ThinkPad Extra Buttons: Device: "/dev/input/event8"
[ 2.294169] (II) ThinkPad Extra Buttons: Found keys
[ 2.294186] (II) ThinkPad Extra Buttons: Configuring as keyboard
[ 2.294221] (II) XINPUT: Adding extended input device "ThinkPad Extra Buttons" (type: KEYBOARD)
[ 2.294257] (**) Option "xkb_rules" "evdev"
[ 2.294275] (**) ThinkPad Extra Buttons: xkb_rules: "evdev"
[ 2.294285] (**) Option "xkb_model" "pc105"
[ 2.294301] (**) ThinkPad Extra Buttons: xkb_model: "pc105"
[ 2.294309] (**) Option "xkb_layout" "us"
[ 2.294325] (**) ThinkPad Extra Buttons: xkb_layout: "us"
[ 2.375786] (II) config/hal: Adding input device AT Translated Set 2 keyboard
[ 2.375870] (**) AT Translated Set 2 keyboard: always reports core events
[ 2.375886] (**) AT Translated Set 2 keyboard: Device: "/dev/input/event4"
[ 2.375949] (II) AT Translated Set 2 keyboard: Found keys
[ 2.375962] (II) AT Translated Set 2 keyboard: Configuring as keyboard
[ 2.375987] (II) XINPUT: Adding extended input device "AT Translated Set 2 keyboard" (type: KEYBOARD)
[ 2.376010] (**) Option "xkb_rules" "evdev"
[ 2.376030] (**) AT Translated Set 2 keyboard: xkb_rules: "evdev"
[ 2.376040] (**) Option "xkb_model" "pc105"
[ 2.376058] (**) AT Translated Set 2 keyboard: xkb_model: "pc105"
[ 2.376069] (**) Option "xkb_layout" "us"
[ 2.376087] (**) AT Translated Set 2 keyboard: xkb_layout: "us"

Steve Langasek (vorlon) wrote :

Several users having this problem report a keyboard layout of 'thinkpad60' in their xprop output. In intrepid and beyond, you should be using the generic 'evdev' keyboard layout instead, configurable under System->Preferences->Keyboard Layouts: Keyboard Model. Other values for Keyboard Model are possible, but are incorrect for recent kernels and should be avoided.

On a ThinkPad X61 configured to use the 'evdev' model, the Menu key works fine here.

Changed in hotkey-setup (Ubuntu):
status: Confirmed → Invalid
Tv (tv42) wrote :

Steve, this is not just 'thinkpad60', there's plenty of us with just evdev having the problem. X61 tablet here:

xprop -root|grep XKB_XKB_RULES_NAMES(STRING) = "evdev", "pc105", "us", "", ""

KeyPress event, serial 27, synthetic NO, window 0x3000001,
    root 0xaa, subw 0x0, time 432442552, (309,407), root:(310,408),
    state 0x0, keycode 151 (keysym 0x1008ff2b, XF86WakeUp), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 27, synthetic NO, window 0x3000001,
    root 0xaa, subw 0x0, time 432442565, (309,407), root:(310,408),
    state 0x0, keycode 151 (keysym 0x1008ff2b, XF86WakeUp), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

On Sun, Jun 14, 2009 at 12:42:09AM -0000, Tv wrote:
> Steve, this is not just 'thinkpad60', there's plenty of us with just
> evdev having the problem. X61 tablet here:

> xprop -root|grep XKB_XKB_RULES_NAMES(STRING) = "evdev", "pc105", "us", "", ""
                                                          ^^^^^^^

This is also wrong, and also needs to be set to 'evdev'.

Please check the settings under System->Preferences->Keyboard as suggested
in my previous message.

--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
<email address hidden> <email address hidden>

Kamil Páral (kamil.paral) wrote :

On Thinkpad R61 under Ubuntu 8.10 the Menu key did not work, but under Ubuntu 9.04 and this setting
_XKB_RULES_NAMES(STRING) = "evdev", "pc105", "us,cz", ",qwerty", "grp:caps_toggle,altwin:super_win"
it works ok.

Same behaviour on a T400 and a X200 with Jaunty. As a workaround i also exchanged "XF86WakeUp" with "Menu" in "sudo gedit /usr/share/X11/xkb/symbols/inet" at button "I151".
I'm using the "IBM Thinkpad R60/T60/R61/T61" layout too. Using an different model solves the problem, but the bug should be fixed, or the layout deleted.

Why is this bug incomplete? What informations are missing?

Steve Langasek (vorlon) wrote :

jango, the bug is marked incomplete because there's no evidence that this is a kernel bug. There is only a configuration bug, which is that you should not use any model other than 'Generic evdev' with current versions of the kernel and X. Since this is effectively a configuration error, the only way to "fix" this would be to wipe out or ignore the user's keyboard configuration choice.

This would have to be handled by something in the X stack, so reassigning back to xkeyboard-config.

affects: linux (Ubuntu) → xkeyboard-config (Ubuntu)
thedward (thedward) wrote :

I am on a Thinkpad x200s and have selected the evdev layout. I am still experiencing this problem.
Both the fn key and the menu key register as keycode 151 (XF86WakeUp).

thedward (thedward) wrote :

It appears that it is a hotkey-setup problem. If I comment out
the following line from /usr/share/hotkey-setup/ibm.hk then my
menu key works as expected:

setkeycodes e05d $KEY_WAKEUP # Fn-click (Press & release with no action), observed on R52

This setting is presumably useful for folks on some models, so
simply commenting it out by default is likely not the correct
solution.

Bryce Harrington (bryce) on 2009-09-02
tags: added: intrepid
Bryce Harrington (bryce) on 2010-03-16
tags: added: omit
Simos Xenitellis  (simosx) wrote :

Shouldn't this be fixed nowdays in udev, in /lib/udev/keymaps/?

The lenovo-thinkpad_x200_tablet file has an entry
0x5D menu

Please check again with Ubuntu 10.04 and report back.

Kamil Páral (kamil.paral) wrote :

Menu key works fine for R61 under Ubuntu 10.04.

Launchpad Janitor (janitor) wrote :

[Expired for xkeyboard-config (Ubuntu) because there has been no activity for 60 days.]

Changed in xkeyboard-config (Ubuntu):
status: Incomplete → Expired
Paul Sladen (sladen) wrote :

It's not really a bug. <Fn> /is/ the wakeup key when the machine is suspended. If anyone wants to map it to other functions, then that's okay, but being able to do that is not universal... <Fn> on ThinkPads and LenovoPads is a magical/special key. If only generates its own code if not combined with any of the other magic (blue highlighted) key combinations and that is more of a fluke than anything.

Tina Russell (tinarussell) wrote :

This is about the Menu key, though, not the Fn key.

Paul Sladen (sladen) wrote :

On the X61T I have, the menu key gives Menu, which means I can't reproduce this.

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

Duplicates of this bug

Other bug subscribers