Date: Tue, 28 Sep 2004 09:40:07 HST From: knowtree@aloha.com To: questions@freebsd.org Subject: Repeating keys in XFree86 4.4 Message-ID: <200409281940.i8SJe7h22330@yoda.pixi.com>
next in thread | raw e-mail | index | archive | help
Anybody else having this problem, or know how to fix it? After upgrading XFree86 to 4.4 (Gnome 2.6.2) I have had problems with my keyboard. After a few minutes, keys seem to stick, repeating until the next keystroke. Or, a keypress produces no output. Eventually a key gets stuck permanently, forcing a reboot. This never happens in the text mode console, only in X. Just to be sure I tried two other keyboards, with no improvement. CPU is a Dell GX260 To get any work done at all I have disabled key repeat in the Gnome keyboard control panel. Awkward, and keys still drop out. Sounds like a previously reported bug (http://marc.theaimsgroup.com/?l=xfree86&m=104879558008189&w=2): I've found the solution to a long-standing problem, which for example afflicted users of Sawfish WM. Under certain conditions (in fact during a long enough sync key/board grab), some keys were repeated: Explanation: ============ 1/ XKB-enabled Xfree86 implements key-repeating in software (w/ timers). When a hardware Key Release arrives, the software timer is canceled. 2/ Xfree86 implements key(board) grabs in GrabModeSync by switching a pointer dev->public.processInputProc to either dev->public.enqueueInputProc ... events are put in a queue for later processing or dev->public.realInputProc The problem is, that the public.enqueueInputProc (which is EnqueueEvent() in xc/programs/Xserver/dix/events.c) does not invoke function AccessXCancelRepeatKey(), which cancels the timer. So, if during Sync grab, key Release is signalled/read from kernel(hardware), the timer is not cancelled. Therefore it is run (later), and generates a pair of Release/Press events, and reschedules itself (so it can result in many incorrect key events).
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200409281940.i8SJe7h22330>