Saturday, 9 March 2019

ubuntu - Disabling mouse acceleration in X.Org (Linux)


This is the Linux version of my Disabling mouse acceleration in Mac OS X question. Hopefully I'll get an answer this time.


I am tired of mouse acceleration and want to have a completely linear mouse response. This is easily achievable through any of the 5 or so methods (some subtly implied) on the X.Org wiki page on pointer acceleration. However, they also disable velocity scaling.


I don't want a 1:1 mapping between device and screen coordinates. I want a 1:N mapping where N is a constant. Any ideas?



Answer



Looking through X.org's sources, playing around with a custom server and doing some obsessive testing with my mouse, I can safely say that the current limited profile (7) achieves this when the threshold value is set to 0. The acceleration value then becomes the velocity scaler (scalar?).


So:


xinput set-prop  "Device Accel Profile" 7
xset m 0

The second part can also be set using your desktop environment's mouse settings panel. Don't forget that it needs to be in x/y form for non-integer values, e.g. 16/10 for 1.6.


There are also some other settings (deceleration etc.) to adjust, but this takes care of the worst part of the problem. Some configuration files should be edited for permanency, but again, the important thing is that it's possible.


Edit: For permanence, you can add this to your xorg.xconf:


Section "InputClass"
Identifier "Mouse with No Acceleration"
MatchIsPointer "yes"
MatchProduct "Mouse"
Option "AccelerationProfile" "7"
EndSection

From there on, you can use your desktop environment's mouse settings, as I've mentioned. However, if you want a complete xorg.conf solution:


Section "InputClass"
Identifier "Mouse With No Acceleration"
MatchIsPointer "yes"
MatchProduct "Mouse"
Option "AccelerationProfile" "7" # "limited" profile
Option "AccelerationNumerator" "2" # these adjust the sensitivity
Option "AccelerationDenominator" "1" # these adjust the sensitivity
Option "AccelerationThreshold" "0" # this disables acceleration
# in the "limited" profile
EndSection

No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...