In my previous post I told that I was experiencing about 50ms latency for left and right mouse clics. After some investigations I discovered that the problem was located in xorg.
It appears it’s not a bug, it’s a functionality called “3rd button emulation” that is useful with a 2 button mouse. Xorg waits up to 50ms to see if both left and right buttons are pressed, and in case it is, it generates a middle button press.
It’s nothing to say that this implementation is lame and should be disabled by default.
Following bug reports were filled by people complaining about that behavior:
- https://bugs.freedesktop.org//show_bug.cgi?id=1752
- https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-evdev/+bug/291694
Although a real middle button press is enough to disable the functionality (not persistent), it’s possible to disable it by default (works for Ubuntu 10.10):
sudo gedit /usr/share/X11/xorg.conf.d/20-mouse.conf
Copy-paste to following lines:
Section “InputClass”
Identifier “Mouse0”
MatchIsPointer “true”
Option “Emulate3Buttons” “false”
EndSection
Save, and Restart!
One Reply to “Left and right mouse button lag”