Issue
I have noticed a slight lag-like thing while playing Left 4 Dead 2 recently, mainly when turning with the character. It wasn't too obvious, but I felt something was wrong. I couldn't aim properly with the weapons and therefore I often missed shots. It seemed too much of a coincidence. I have tried tweaking some mouse sensitivity, acceleration etc. however the issue persisted.
Solution
Long story short, others have experienced the same problem while gaming on Linux. Luckily, def075 mentioned [1] that this may be a mouse polling issue. I did a quick search and found the solution [2]. Do the following,
- gksudo gedit /etc/modules
- And add the following 2 lines to the end of the file,
-r usbhid
usbhid mousepoll=1 - And finally reboot.
Where the "mousepoll" tells the operating system how often to query (read data from) the mouse. The faster it does it, the less lag there is in the input. For reference [3],
1=1000 Hz (1ms)
2=500Hz (2ms)
4=250Hz (4ms)
8=125Hz (8ms)
10=100Hz (default, 10ms)
I have set mine to "mousepoll=1" and it works just fine. Some other posts say to set it to 2, I personally just went for the maximum to be on the safe side. Feel free to experiment with this, however I personally don't think that this would cause a great decrease in CPU time/performance on overall.
References
[1] - http://forums.steampowered.com/forums/showthread.php?t=3147537
[2] - http://ubuntuforums.org/showthread.php?t=392494
[3] - https://wiki.archlinux.org/index.php/Mouse_Polling_Rate