- cross-posted to:
- linux
- cross-posted to:
- linux
You dismiss the data you recorded because it doesn’t seem to support your hypothysis tgat there is greater lag in wayland, but that’s not really the right approach, and I think it points to a different conclusion.
You recorded a lag of 5 or 6 frames at 90 frames per second in both Xorg and wayland, which suggests that the lag is the same to within 0.011 seconds, and I don’t think that you can say that’s a huge difference. However, what you didn’t test is the acceleration curve on mouse movement. If that curve is different under wayland it could easily feel infuriatingly laggy without actually showing any extra delay on the movement starting or ending.
I’m not sure how you’d accurately test that, a HID device just sending mouse move events wouldn’t do it as wouldn’t mimic you accelerating the mouse from stationary, so wouldn’t exercise the acceleration curve in wayland. You might need a physical device that moves your actual mouse a fixed dustance and then measure the distance the cursor moves on screen. Repeat for different movement speeds and you might have sone useful data.
You went way too HAM on this lol.
If you want to test if the latency is in the software of Wayland itself, you can just create a software emulated HID input device that generates the motion, and a script that registers movement and click. The control being the emulated HID device, and the variable being the different compositor. Start a script that moves for a predetermined amount of time and click, and just record the difference. It should perform the same way each and every time, unless something is slowing it down, no?
The problem with this is more so that I would still have to record this “IRL”, as recording it in software is just… meh (I mean, I could try), and I just don’t have the equipment for that (I demonstrated as much there), so I will probably end up doing the Pico + light sensor thing as described there. Should be more reliable anyway (something very similar has been done already, and successfully), so… yeah, that.
I’m not reading through that entire rant but 2 things I noticed with mouse input on Wayland:
On KDE, the mouse acceleration is horrible by default. However, setting “Pointer acceleration” to “None” in the mouse configuration solves pretty much all my mouse input issues on Wayland.
Also, I noticed that there is quite a difference between default polling rates on wireless mice vs wired mice. When connecting my Logitech Pro X wirelessly I get a 1000 Hz polling rate but if I connect it wired, the polling rate falls back to 250.
This sounds like some silly bug in libinput.
There’s nothing in wayland that would care about whether a mouse was connected wirelessly, but libinput may not be detecting it properly when wired. I’d try reporting it, the fix is likely to be trivial.