mouse/keyboard events getting delayed in games
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
xorg (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
xorg-server (Ubuntu) |
Expired
|
Low
|
Unassigned |
Bug Description
At least in the game Nexuiz, mouse and keyboard input sometimes gets "queued up".
As in: I click around wildly in the menu (this seems to "invite" the bug fast). After that, I can click options, and they won't activate until I move the mouse a bit. Or, I move the mouse right, stop for some seconds, then move it DOWN - and it still goes RIGHT a little.
I debugged this a bit in the Nexuiz source and came to the conclusion that the event loop does not even SEE these events, so this probably can't be a bug in Nexuiz:
in vid_glx.c, the function HandleEvents() is just a simple loop of the form:
while (XPending(
{
...
}
Inside this loop, there is no "return" or "goto", so this must handle all events that are queued up. Also, I get the very same problem when using the SDL build of Nexuiz, which uses a completely different event loop, namely a while(SDL_
I managed to work around this problem by switching away from evdev to mouse, by adding these lines to xorg.conf:
Section "ServerFlags"
Option "AutoAddDevices" "False"
EndSection
Section "InputDevice"
Identifier "mouse"
Driver "mouse"
Option "CorePointer" "True"
Option "Emulate3Buttons" "False"
EndSection
Section "InputDevice"
Identifier "kbd"
Driver "keyboard"
Option "CoreKeyboard" "True"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "de"
Option "XkbVariant" "nodeadkeys"
EndSection
This shows that the problem must be evdev related.
As I have this report open now, I'll submit it, then remove that workaround from my xorg.conf and try to reproduce it with DGA disabled.
[lspci]
00:00.0 Memory controller [0580]: nVidia Corporation CK804 Memory Controller [10de:005e] (rev a3)
Subsystem: Micro-Star International Co., Ltd. Device [1462:7185]
05:00.0 VGA compatible controller [0300]: nVidia Corporation G70 [GeForce 7600 GT] [10de:0391] (rev a1)
Subsystem: Giga-byte Technology Device [1458:3427]
Changed in xorg: | |
status: | New → Confirmed |
Changed in xorg-server: | |
status: | Incomplete → Confirmed |
Changed in xorg-server: | |
importance: | Undecided → Low |
status: | Confirmed → Triaged |
description: | updated |
tags: | added: hardy |
Yes, when turning off DGA (in the GLX build, by "set vid_dgamouse 0" on the game's console, in the SDL build, by doing "export SDL_VIDEO_ X11_DGAMOUSE= 0" on the terminal before starting Nexuiz), the problem goes away.
This however is not an option for first person shooter games like Nexuiz, as the whole point of using DGA is to disable the mouse acceleration that is done otherwise, which massively interferes with aiming in such games (and this is the case both with the SDL and with the GLX build). Or is there an alternate interface Nexuiz could use in the "non-DGA path" to achieve the same result?