High polling rate mouse using USB 3 moves twice or more as fast as it should.
Summary
Originally coming from a Reddit thread, I was able to track down the problem to libinput.
I confirm that the problem is only when I launch Hyprland; when I am using X11 or Windows 10, everything is fine. How can the mouse sensitivity be different? In the Hyprland configuration file, I have disabled the mouse acceleration (= 0
there).
In Hyprland, when the input.force_no_accel is set to true
, both mice move the same, which is correct. They also move the same way, with the acceleration profile being "flat", however, I prefer not to have any acceleration at all. Note that by default, Hyprland uses this acceleration profile: libinput_device_config_accel_get_default_profile(LIBINPUTDEV))
and it seems to cause the trouble.
The 1000 hz+ capable mouse with 1600 DPI, currently running at 4000 hz:
T: Bus=05 Lev=01 Prnt=01 Port=03 Cnt=04 Dev#= 5 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=484d ProdID=1002 Rev= 1.12
S: Manufacturer=HeatMoving
S: Product=Pulsar Dongle
C:* #Ifs= 4 Cfg#= 1 Atr=a0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=usbhid
E: Ad=81(I) Atr=03(Int.) MxPS= 11 Ivl=250us
I:* If#= 1 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=01 Driver=usbhid
The 1000hz-only mouse with 1600 DPI:
T: Bus=09 Lev=02 Prnt=02 Port=02 Cnt=01 Dev#= 3 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=25a7 ProdID=fa7c Rev=13.32
S: Manufacturer=Compx
S: Product=Pulsar Xlite Wireless
C:* #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr= 98mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=usbhid
E: Ad=81(I) Atr=03(Int.) MxPS= 7 Ivl=1ms
I:* If#= 1 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=01 Driver=usbhid
To clarify the problem and summarise, every single mouse, given the same polling rate and the same DPI, must move equally, which is not the case. Setting the "flat" acceleration profile or using Hyprland's trick to use the unaccelerated values from Wayland solves the issue, but this is not a real solution and should never be: the solution for a user would be if libinput handled such situations correctly without any configuration if it is not required (and in this case, as far as I can judge, it isn't).
If you have an idea of where one might look to fix this within the code base, please feel free to share; I might get it done if I have time myself.
Steps to reproduce
Just have a mouse capable of supporting more than 1khz polling rate, and use Wayland (on X11, everything is great).
Required information
-
libinput version: 1.24.0
-
hardware information: AMD 7950x3d, 64GB DDR5 6000mhz.
-
libinput record
output: -
libinput debug-events --verbose
output: