You will first need to identify the device number of the mouse you’d like to configure:
$ xinput list
Logitech USB Gaming Mouse id=10 [slave pointer (2)]
- which is shown in this example as 10. To list the properties of the mouse:
$ xinput list-props 10
Device 'Logitech USB Gaming Mouse': ... Device Accel Profile (252): 0
The value given determines how the driver handles the acceleration:
-1: none no velocity-dependent pointer acceleration or deceleration. If constant deceleration is also unused, motion processing is suppressed, saving some cycles.
0: classic (the default) similar to old behaviour, but more predictable Xorg Wiki - Development/Documentation/PointerAcceleration
Setting this property to
-1 it will disable mouse acceleration entirely.
$ xinput set-prop 10 252 -1
After confirming that the above command works, you can create a shell script to be executed at boot. You may choose to replace the index numbers, eg.
252 with the more meaningful property names
"Logitech USB Gaming Mouse" and
"Device Accel Profile" respectively.
$HOME/bin/macceloff.sh script contains: