evdev keyboard problem in xorg 1.5.2 and evdev 2.0.99+

Scott Serr serrjunk at theserrs.net
Wed Dec 31 21:23:45 PST 2008

Peter Hutterer wrote:
> On Wed, Dec 31, 2008 at 02:19:51PM -0700, Scott Serr wrote:
>> Timo, it almost works.
>> I installed a fresh Ubuntu 8.10 with xkb-data package
>> xkb-data_1.3-2ubuntu4.4_all.deb.  All updates to date.  Indeed there is
>> an evdev config file in the xkb-data.
>> This is very weird... The only way it works is if I switch Preferences->
>> Appearance-> VisualEffects back and forth between None and
>> Normal/Extra.  It doesn't matter if it is set one way or the other...
>> The "up arrow" causing a "PrtScn" happens every time before this is
>> toggled.   And after a toggle, "up arrow" works correctly.  I also
>> tested on a new user, same behavior.  Need to fiddle with the
>> VisualEffects radio button.
> printscreen is handled through a passive grab on the keycode. evdev has
> different keycodes than the kbd driver, with the up/printscreen overlap being
> the most prominent.
> when you hit a key on the physical keyboard, this keyboard's (evdev) map is
> flushed into the core keyboard and the keycode-keysym mapping in the core
> keyboard change. however, if the clients don't update the map after that they
> listen to the wrong keycodes leading to the symptoms you described.
> restarting the client causes said client to load the keymap from the core
> keyboard (i.e. the evdev one now) and have the right layout from the start.
> This bug has a zombie-like ability to come back and annoy users, though it has
> been "fixed" in many different ways many times already.
> Cheers,
>   Peter
Yes, it disappeared like magic when I run from from gdm instead of 
startx.  startx launching gnome seems to always have this weird effect, 
until I fiddle with the VisualEffects.  Did I mention I have to do this 
each time I start gnome this way?  I reverted back to Hardy from 
Intrepid since multiseat seems more stable there... and Hardy even has 
this problem, atleast on my hardware.

This information might help someone try to squash the bug better.

For anyone wishing to reproduce this... it appears that it happens 
regardless of what XkbRules, XkbModel, XkbLayout are set to.

Here is a keyboard section of xorg.conf for Hardy:
Section "InputDevice"
    Identifier   "Keyboard0"
    Driver       "evdev"
    Option       "Path"        
    Option       "XkbRules"    "xorg"
    Option       "XkbModel"    "evdev"
    Option       "XkbLayout"    "us"

Here is one for Intrepid.
Section "InputDevice"
    Identifier   "Keyboard0"
    Driver       "evdev"
    Option       "Path"        
    Option       "CoreKeyboard"
    Option       "XkbRules"    "evdev"

After making your evdev keyboard section is done...
/etc/init.d/gdm stop

Thanks, all...  I have a work around...  (running gdm, like I was going 
to after debugging anyway)

More information about the xorg mailing list