It's been repeatable ever since I bought a Ryzen 7950X at the beginning of the year, that's why I tried using system profiler tools to find the reason but as I have no good experience in this it's difficult to find the root cause.
There are tools available to find the source of the problems, I think I used event tracing as a starting point.
https://learn.microsoft.com/en-us/windows-hardware/drivers/d...
I'd also suggest running https://www.resplendence.com/latencymon to see if it's a specific driver causing the stalls, or if it's random.
(Sitting here running wayland, where the mouse feels stuck in molasses!)
I think later versions fixed this one, though.
The cursor is in the bottom half of the screen.
If I move the cursor, that should be represented in the frame that's being currently outputted, not the next frame.
Wayland has no support for that, by design.
The end result is that there is always a delay of at least one Frame.
But honestly, the difference of a frame of latency is ridiculously difficult to feel and we’re talking about a half frame of latency here on average. It’s almost likely something else considering the entire end to end latency here is closer to 50-100ms on most systems and still isn’t what people would describe as laggy. Usually it’s some kind of software bug/hiccup that interrupts things to not be rendered at a constant tick rate or just getting hung and not processing events in a timely fashion.
Also, make sure you use the right config - there are actual issues with some competitors which are not Wayland architecture issues. For example https://github.com/swaywm/sway/issues/4763
If it's Gnome, the very recent release 45 has improvements running the cursor in a separate thread.
I personally run KDE and agree that you can feel a difference between the X11 and Wayland session but it's not terrible.
Don't allocate => don't need to collect.
But C# isn't ideal for a driver because of the weight of the runtime not because it's hard to save on allocations.