Mice under Gnome: Normalization of Relative motion
I am currently trying to setup a gaming mouse using 8000 DPI for the increased precision / resolution. At those DPI values, the mouse is way too sensitive. According to the following article, mouse motion should be normalized under Wayland. This is done with libinput: https://wayland.freedesktop.org/libinput/doc/1.11.3/motion_normalization.html
I have created my own hwdb as described in the documentation:
[jaap@Jaap-Desktop ~]$ cat /etc/udev/hwdb.d/71-mouse-local.hwdb
mouse:usb:v046dpc08b:name:Logitech G502 HERO Gaming Mouse:
MOUSE_DPI=8000@1000
I have verified whether this value is correctly being applied, like this:
[jaap@Jaap-Desktop ~]$ sudo udevadm test /sys/class/input/event13
...
...
MOUSE_DPI=8000@1000
...
...
However, this does not seem to work correctly. In Gnome, both under Xorg (also using libinput) and Wayland I am getting a way too sensitive mouse cursor. The only way to fix this is to use Gnome´s mouse speed setting, but that´s a hacky way to do it: I use two different Mice, and this setting will apply to both at the same time. I could create different sensitivity profiles for both, but normalizing mouse speed such that the same distance traveled on the mouse pad, is ALWAYS the same distance traveled on the cursor seems so much more elegant, especially when I ever switch to a newer mouse in the future.
Interestingly enough, the MOUSE_DPI setting DOES seem to affect the cursor sensitivity at the login screen (GDM), and both Mice with two different DPI settings behave identical. Does anyone have any idea how to get this properly working on the desktop as well?
About this post
- Posted
- Archived
- Score
- 16 · 85% up
- Kind
- Text
- ID
- mrocho
7 comments
Are you sure your mouse's native DPI is 8000? A lot of gamin mice advertise bonkers dpi numbers but it turns out its just simulated and less accurate than the native dpi.
I am using a Logitech G502 Hero. Its sensor is supposed to be native (no scaling, acceleration, etc) throughout its entire DPI range.
It almost certainly does not have native scaling beyond 1000 DPI. Senior Mouse Engineer at Logitech explaining how the native resolution of the mice is much lower than the advertised amounts and that increasing it beyond the native resolution increases noise.
https://www.youtube.com/watch?v=lc7JVjcPzL0
This setting only applies on 'Default' acceleration profile, it does nothing if you use 'Flat' acceleration profile, which maps mouse movement to cursor movement on 1:1 scale. If you use 'Flat' profile you can only use mouse deceleration ratio to control the mapping scale.
Thank you very much for your explanation. Having said that, that sucks :(. Acceleration is not something I want while gaming, but apparently I have to choose between two evils: Either have acceleration, or an incorrectly scaled mouse. Is this a technical limitation in Gnome, or a design choice?
You can try setting MOUSE_DPI to a little lower than your mouse maximum value, then turn the GNOME mouse pointer speed to lowest. It will provide a little smoother cursor movement than using flat acceleration with low DPI like 700 or 800, but still provide a faster pointer movement with very little acceleration. I run my G305 at 12000 DPI and set MOUSE_DPI to 9000@1000.
Games usually read mouse events directly and this setting should be ignored, even for games run under wine.
Can you change gnome-settings-daemon mouse speed .desktop file to not load (edit it and move it into .config/applications or wherever) and have it use your systems settings? I disable a lot of gnome's settings that way.
Edit: Looks like gnome40 doesn't have a seperate mouse module in /usr/lib/gsd-* anymore so I guess nevermind.