Bug 29969 - X server losing keyboard events
Summary: X server losing keyboard events
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: highest blocker
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
Keywords: patch
Depends on:
Reported: 2010-09-02 02:44 UTC by Thomas Hellström
Modified: 2010-09-17 16:37 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:

Patch to restore console event drain behavior (1.32 KB, patch)
2010-09-02 02:44 UTC, Thomas Hellström
no flags Details | Splinter Review

Description Thomas Hellström 2010-09-02 02:44:41 UTC
Created attachment 38382 [details] [review]
Patch to restore console event drain behavior

When using non-evdev keyboard drivers (kbd_drv.so) on linux, the server loses keyboard events. This is because these events race with the console event removal callback that was originally intended for use only with evdev.

The problem is really quite severe. On for example SUSE Linux Enterprise 11 SP1, about 10% of keystrokes are lost when run as a virtual machine guest in some configurations. Lost keyrelease events trigger false autorepeats.

The problem appears with the attached commit and with corresponding cherry-picked commit in other branches. For the 1.6 branch that affects SLES SP1, it's 0c9db0ea. I'm attaching a patch that restores the console drain callback behavior prior to this commit.

IMHO this is severe enough to warrant emergency bugfix releases.

Author: Peter Hutterer <peter.hutterer@who-t.net>  2009-01-09 05:32:14
Committer: Peter Hutterer <peter.hutterer@who-t.net>  2009-01-16 07:21:16
Parent: 646add4eb47c01c045ef64405510a08ecfb5bfd6 (dix: remove XineramaCheckMotion, merge into CheckMotion.)
Child:  ca46c01869768a8661a9d8a71493ed5f0760a8ab (XQuartz: mieq: Wait for the server to finish initializing before letting other threads mieqEnqueue)
Branches: master, remotes/origin/compat_output, remotes/origin/dri2-swapbuffers, remotes/origin/master, remotes/origin/server-1.7-branch, remotes/origin/server-1.7-nominations, remotes/origin/server-1.8-branch, remotes/origin/server-1.9-branch, remotes/origin/xorg-server-1.7-apple
Follows: xorg-server-
Precedes: xorg-server-

    xfree86: always force RAW mode under linux.
    The previous check for AEI on left us with the possibility that AEI is forced
    off in the config, but devices are added through evdev nonetheless. A keyboard
    added this way can CTRL+C the server. Even when we use kbd, we can set the
    mode to RAW, so it's safer alround to to so.
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Comment 1 Jesse Adkins 2010-09-17 16:37:04 UTC
Fixed on Sep 2 2010 by git commit 71972c2534d490284d3d42b456c2f34b964b2894.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.