Disable Mouse Acceleration (libinput/solaar/logitech)

I purchased a new trackball (Logitech MX Ergo) which is superbly supported by 'Solaar' software.
Solaar is a pretty good (albeit slow starting) driver+config-app for Logitech mice.

One thing is missing though: You can not disable acceleration (which is a bit problematic with a trackball, especially when gaming)
And since solaar runs the mouse, mate-mouseconfig is ignored.
So what to do ?

Solution:
I first used the command 'xinput' to find out the exact name of my pointing device:

thom@monolith:~$ xinput
⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ Logitech MX Ergo                        	id=8	[slave  pointer  (2)]
⎜   ↳ Corsair Corsair Gaming K55 RGB Keyboard 	id=9	[slave  pointer  (2)]
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
    ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
    ↳ Power Button                            	id=6	[slave  keyboard (3)]
    ↳ Power Button                            	id=7	[slave  keyboard (3)]
    ↳ Logitech MX Ergo                        	id=10	[slave  keyboard (3)]
    ↳ Corsair Corsair Gaming K55 RGB Keyboard 	id=11	[slave  keyboard (3)]

Then I searched for the name of the parameter to disable acceleration

thom@monolith:~$ xinput list-props "pointer:Logitech MX Ergo" |grep -i accel
	libinput Accel Speed (302):	0.000000
	libinput Accel Speed Default (303):	0.000000
	libinput Accel Profiles Available (304):	1, 1
	libinput Accel Profile Enabled (305):	0, 1
	libinput Accel Profile Enabled Default (306):	1, 0

According to the libinput documentation:

libinput Accel Profile Enabled
3 boolean values (8 bit, 0 or 1), in order "adaptive", "flat", "custom". Indicates which acceleration profile is currently enabled on this device.

It is a bit cryptic how they wrote it but I understood it as:
0 0 = adaptive
0 1 = flat
1 0 = custom

Then I added this line to my "$HOME/.profile" :

xinput set-prop "pointer:Logitech MX Ergo" "libinput Accel Profile Enabled" 0 1

Which, indeed switched off acceleration a.k.a. a 'flat' profile.

This will work for other pointing devices too (tested with my old Logitech M570).
Just don't forget to adjust the commands to the name of your pointing device.

2 Likes