Bug 431449 - set new latency contr to "prefer smoother animations" by default to prevent stutter
Summary: set new latency contr to "prefer smoother animations" by default to prevent s...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (show other bugs)
Version: git master
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-11 16:41 UTC by tempel.julian
Modified: 2021-01-14 18:57 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
patch (1.29 KB, patch)
2021-01-14 13:37 UTC, Vlad Zahorodnii
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tempel.julian 2021-01-11 16:41:22 UTC
SUMMARY

Thanks to the recent vsync rework, upstream KWin now finally doesn't introduce stutter to application window content anymore.
However, the default setting for new latency control "balance of latency and smoothness" introduces stutter when moving windows.


STEPS TO REPRODUCE
1. Open www.vsynctester.com in Firefox (Webrender/OGL enabled) or Chromium 
2. Drag another window (e.g. Dolphin)

OBSERVED RESULT

With "balance of latency and smoothness", the moving animation of the window shows intermittent stutter, whereas vsynctester.com in the background remains smooth. Oddly this stutter issue seems to be worse with the lower refresh rate of 60Hz vs. 85Hz.


EXPECTED RESULT

The window movement should be smooth. It is when setting latency to "prefer smoother animations", which still has very bearable latency.

Thus I suggest making "prefer smoother animations" the default setting. It might also to be considered whether it would make sense to drop the options with lower latency than "prefer smoother animations" if they can't deliver an acceptable result with low GPU load and a fast GPU. Even better of course would be if they significantly lowered latency while not introducing any stutter under low GPU load conditions (kwin-lowlatency does achieve that).



SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch 5.10
KDE Plasma Version: KWin git-master 8d84fe4b6ae26c501e416a5bc5eee8f5cf4a02bd
Mesa 21 git-master + xf86-video-amdgpu, RX 5700 XT
single 1440p display
Comment 1 David Edmundson 2021-01-11 17:19:43 UTC
We definitely can tweak the values. They came from guesstimates. It's something we didn't know at the time of writing.

I don't think we should be changing the default from balanced, but rather changing the timings the interval represent.
Comment 2 David Rubio 2021-01-11 17:22:05 UTC
The stutter in the default option is specially noticeable on Wayland. The compositor stutters like crazy on my (midly old, arguably...) RX 480. Anything that's not "prefer smoother animations" would inevitably cause even the cursor to stutter (which is super annoying), and even on that setting it will inevitably stutter randomly, making so the cursor stops moving completely for a second or so. On X doing "prefer smoother animations" works fine and I have no stutter.
Comment 3 tempel.julian 2021-01-11 17:25:15 UTC
(In reply to David Edmundson from comment #1)
> We definitely can tweak the values. They came from guesstimates. It's
> something we didn't know at the time of writing.
> 
> I don't think we should be changing the default from balanced, but rather
> changing the timings the interval represent.

I'd try patches with different values. :)
Comment 4 Vlad Zahorodnii 2021-01-12 10:02:20 UTC
(In reply to tempel.julian from comment #0)
> With "balance of latency and smoothness", the moving animation of the window
> shows intermittent stutter, whereas vsynctester.com in the background
> remains smooth.

This confuses me. If vsynctester doesn't stutter, it means that the compositor repaints the screen on time, but it's unfortunate enough not to process some input events.

It's worth noting that the mouse movement may not be as uniform as you want it to be, e.g. I've tried to move the mouse at a constant rate as much as possible but I still see some jumpy movement. (on my machine, kwin won't perform compositing if you move the cursor unless a window has been damaged) Things might look differently if you have a super duper expensive gaming mouse with high polling rate though.
Comment 5 tempel.julian 2021-01-12 11:54:11 UTC
Yes, looks like an input issue. Indeed my mouse works at 1000Hz polling rate, though that's rather common even among cheaper mice these days.
I think KWin should be able to deal with this (kwin-lowlatency really is :) ), as low-end polling rate of 125Hz isn't even sufficient to supply a 60Hz display with a guaranteed input update for each refresh. High polling rate is a dumb brute force solution, but the only realistic one available afaik. :(
Comment 6 Vlad Zahorodnii 2021-01-12 13:29:24 UTC
Just to be sure, can you run evhz and move any window, e.g. konsole?
Comment 7 Vlad Zahorodnii 2021-01-12 13:37:53 UTC
In my case (I have a wireless mouse), the polling rate varies a lot and on average it's quite low

Logitech MX Master 2S: Latest    62Hz, Average    93Hz
Logitech MX Master 2S: Latest    50Hz, Average    92Hz
Logitech MX Master 2S: Latest    83Hz, Average    91Hz
Logitech MX Master 2S: Latest   125Hz, Average    92Hz
Logitech MX Master 2S: Latest    62Hz, Average    91Hz
Logitech MX Master 2S: Latest    62Hz, Average    91Hz
Logitech MX Master 2S: Latest   125Hz, Average    92Hz
Logitech MX Master 2S: Latest    55Hz, Average    91Hz
Logitech MX Master 2S: Latest   166Hz, Average    92Hz
Logitech MX Master 2S: Latest   125Hz, Average    93Hz
Logitech MX Master 2S: Latest   100Hz, Average    92Hz
Logitech MX Master 2S: Latest   125Hz, Average    93Hz
Logitech MX Master 2S: Latest   125Hz, Average    93Hz
Logitech MX Master 2S: Latest    71Hz, Average    92Hz
Logitech MX Master 2S: Latest   125Hz, Average    93Hz
Logitech MX Master 2S: Latest   125Hz, Average    93Hz
Logitech MX Master 2S: Latest    55Hz, Average    92Hz
Logitech MX Master 2S: Latest   125Hz, Average    93Hz
Logitech MX Master 2S: Latest   125Hz, Average    93Hz
Logitech MX Master 2S: Latest    62Hz, Average    93Hz
Logitech MX Master 2S: Latest   125Hz, Average    93Hz
Logitech MX Master 2S: Latest    62Hz, Average    92Hz
Logitech MX Master 2S: Latest   125Hz, Average    93Hz
Logitech MX Master 2S: Latest   125Hz, Average    93Hz
Logitech MX Master 2S: Latest   125Hz, Average    94Hz
Logitech MX Master 2S: Latest    62Hz, Average    94Hz
Logitech MX Master 2S: Latest   100Hz, Average    93Hz
Logitech MX Master 2S: Latest    71Hz, Average    93Hz
Logitech MX Master 2S: Latest   125Hz, Average    93Hz
Logitech MX Master 2S: Latest    83Hz, Average    94Hz
Logitech MX Master 2S: Latest   250Hz, Average    96Hz
Logitech MX Master 2S: Latest    62Hz, Average    95Hz
Logitech MX Master 2S: Latest    50Hz, Average    95Hz
Logitech MX Master 2S: Latest   250Hz, Average    97Hz
Logitech MX Master 2S: Latest    83Hz, Average    96Hz
Logitech MX Master 2S: Latest   250Hz, Average    99Hz
Logitech MX Master 2S: Latest   125Hz, Average    99Hz
Logitech MX Master 2S: Latest    41Hz, Average    98Hz
Comment 8 David Rubio 2021-01-12 13:38:26 UTC
evhz: 
Logitech G203 Prodigy Gaming Mouse: Latest  1000Hz, Average   906Hz
Logitech G203 Prodigy Gaming Mouse: Latest   500Hz, Average   898Hz
Logitech G203 Prodigy Gaming Mouse: Latest   500Hz, Average   890Hz
Logitech G203 Prodigy Gaming Mouse: Latest   500Hz, Average   890Hz
Logitech G203 Prodigy Gaming Mouse: Latest  1000Hz, Average   890Hz
Logitech G203 Prodigy Gaming Mouse: Latest   500Hz, Average   890Hz
Logitech G203 Prodigy Gaming Mouse: Latest   333Hz, Average   880Hz
Logitech G203 Prodigy Gaming Mouse: Latest   500Hz, Average   872Hz
Logitech G203 Prodigy Gaming Mouse: Latest   333Hz, Average   861Hz
Logitech G203 Prodigy Gaming Mouse: Latest   500Hz, Average   854Hz
Logitech G203 Prodigy Gaming Mouse: Latest   250Hz, Average   842Hz
Logitech G203 Prodigy Gaming Mouse: Latest   250Hz, Average   830Hz
Logitech G203 Prodigy Gaming Mouse: Latest   125Hz, Average   817Hz
Logitech G203 Prodigy Gaming Mouse: Latest     3Hz, Average   801Hz
Logitech G203 Prodigy Gaming Mouse: Latest    90Hz, Average   787Hz
Logitech G203 Prodigy Gaming Mouse: Latest   333Hz, Average   776Hz
Logitech G203 Prodigy Gaming Mouse: Latest   333Hz, Average   766Hz
Logitech G203 Prodigy Gaming Mouse: Latest   200Hz, Average   753Hz
Logitech G203 Prodigy Gaming Mouse: Latest   500Hz, Average   746Hz
Logitech G203 Prodigy Gaming Mouse: Latest   333Hz, Average   735Hz
Logitech G203 Prodigy Gaming Mouse: Latest   200Hz, Average   730Hz
Logitech G203 Prodigy Gaming Mouse: Latest   250Hz, Average   719Hz
Logitech G203 Prodigy Gaming Mouse: Latest   200Hz, Average   706Hz
Logitech G203 Prodigy Gaming Mouse: Latest   200Hz, Average   694Hz
Logitech G203 Prodigy Gaming Mouse: Latest   500Hz, Average   686Hz
Logitech G203 Prodigy Gaming Mouse: Latest  1000Hz, Average   686Hz
Logitech G203 Prodigy Gaming Mouse: Latest   250Hz, Average   674Hz
Logitech G203 Prodigy Gaming Mouse: Latest   333Hz, Average   664Hz
Logitech G203 Prodigy Gaming Mouse: Latest   250Hz, Average   652Hz
Logitech G203 Prodigy Gaming Mouse: Latest   333Hz, Average   642Hz
Logitech G203 Prodigy Gaming Mouse: Latest   500Hz, Average   634Hz
Logitech G203 Prodigy Gaming Mouse: Latest   500Hz, Average   626Hz
Logitech G203 Prodigy Gaming Mouse: Latest   166Hz, Average   613Hz
Logitech G203 Prodigy Gaming Mouse: Latest   250Hz, Average   601Hz
Logitech G203 Prodigy Gaming Mouse: Latest   333Hz, Average   591Hz

Should be stuck at 1000Hz, but guess not.
Comment 9 David Rubio 2021-01-12 13:40:50 UTC
Ah, if I move it slowly the Hz goes down. (In reply to David Rubio from comment #8)
> evhz: 
> Logitech G203 Prodigy Gaming Mouse: Latest  1000Hz, Average   906Hz
> Logitech G203 Prodigy Gaming Mouse: Latest   500Hz, Average   898Hz
> Logitech G203 Prodigy Gaming Mouse: Latest   500Hz, Average   890Hz
> Logitech G203 Prodigy Gaming Mouse: Latest   500Hz, Average   890Hz
> Logitech G203 Prodigy Gaming Mouse: Latest  1000Hz, Average   890Hz
> Logitech G203 Prodigy Gaming Mouse: Latest   500Hz, Average   890Hz
> Logitech G203 Prodigy Gaming Mouse: Latest   333Hz, Average   880Hz
> Logitech G203 Prodigy Gaming Mouse: Latest   500Hz, Average   872Hz
> Logitech G203 Prodigy Gaming Mouse: Latest   333Hz, Average   861Hz
> Logitech G203 Prodigy Gaming Mouse: Latest   500Hz, Average   854Hz
> Logitech G203 Prodigy Gaming Mouse: Latest   250Hz, Average   842Hz
> Logitech G203 Prodigy Gaming Mouse: Latest   250Hz, Average   830Hz
> Logitech G203 Prodigy Gaming Mouse: Latest   125Hz, Average   817Hz
> Logitech G203 Prodigy Gaming Mouse: Latest     3Hz, Average   801Hz
> Logitech G203 Prodigy Gaming Mouse: Latest    90Hz, Average   787Hz
> Logitech G203 Prodigy Gaming Mouse: Latest   333Hz, Average   776Hz
> Logitech G203 Prodigy Gaming Mouse: Latest   333Hz, Average   766Hz
> Logitech G203 Prodigy Gaming Mouse: Latest   200Hz, Average   753Hz
> Logitech G203 Prodigy Gaming Mouse: Latest   500Hz, Average   746Hz
> Logitech G203 Prodigy Gaming Mouse: Latest   333Hz, Average   735Hz
> Logitech G203 Prodigy Gaming Mouse: Latest   200Hz, Average   730Hz
> Logitech G203 Prodigy Gaming Mouse: Latest   250Hz, Average   719Hz
> Logitech G203 Prodigy Gaming Mouse: Latest   200Hz, Average   706Hz
> Logitech G203 Prodigy Gaming Mouse: Latest   200Hz, Average   694Hz
> Logitech G203 Prodigy Gaming Mouse: Latest   500Hz, Average   686Hz
> Logitech G203 Prodigy Gaming Mouse: Latest  1000Hz, Average   686Hz
> Logitech G203 Prodigy Gaming Mouse: Latest   250Hz, Average   674Hz
> Logitech G203 Prodigy Gaming Mouse: Latest   333Hz, Average   664Hz
> Logitech G203 Prodigy Gaming Mouse: Latest   250Hz, Average   652Hz
> Logitech G203 Prodigy Gaming Mouse: Latest   333Hz, Average   642Hz
> Logitech G203 Prodigy Gaming Mouse: Latest   500Hz, Average   634Hz
> Logitech G203 Prodigy Gaming Mouse: Latest   500Hz, Average   626Hz
> Logitech G203 Prodigy Gaming Mouse: Latest   166Hz, Average   613Hz
> Logitech G203 Prodigy Gaming Mouse: Latest   250Hz, Average   601Hz
> Logitech G203 Prodigy Gaming Mouse: Latest   333Hz, Average   591Hz
> 
> Should be stuck at 1000Hz, but guess not.

After re-setting it to 1000Hz, it's now stuck at 1000Hz, lol

Logitech G203 Prodigy Gaming Mouse: Latest  1000Hz, Average  1000Hz
Logitech G203 Prodigy Gaming Mouse: Latest  1000Hz, Average  1000Hz
Logitech G203 Prodigy Gaming Mouse: Latest  1000Hz, Average  1000Hz
Logitech G203 Prodigy Gaming Mouse: Latest  1000Hz, Average  1000Hz
Logitech G203 Prodigy Gaming Mouse: Latest  1000Hz, Average  1000Hz
Logitech G203 Prodigy Gaming Mouse: Latest  1000Hz, Average  1000Hz
Logitech G203 Prodigy Gaming Mouse: Latest  1000Hz, Average  1000Hz
Logitech G203 Prodigy Gaming Mouse: Latest  1000Hz, Average  1000Hz
Logitech G203 Prodigy Gaming Mouse: Latest  1000Hz, Average  1000Hz
Logitech G203 Prodigy Gaming Mouse: Latest  1000Hz, Average  1000Hz
Logitech G203 Prodigy Gaming Mouse: Latest  1000Hz, Average  1000Hz
Logitech G203 Prodigy Gaming Mouse: Latest  1000Hz, Average  1000Hz
Logitech G203 Prodigy Gaming Mouse: Latest  1000Hz, Average  1000Hz
Logitech G203 Prodigy Gaming Mouse: Latest  1000Hz, Average  1000Hz
Logitech G203 Prodigy Gaming Mouse: Latest  1000Hz, Average  1000Hz
Logitech G203 Prodigy Gaming Mouse: Latest  1000Hz, Average  1000Hz
Logitech G203 Prodigy Gaming Mouse: Latest  1000Hz, Average  1000Hz
Logitech G203 Prodigy Gaming Mouse: Latest  1000Hz, Average  1000Hz
Logitech G203 Prodigy Gaming Mouse: Latest  1000Hz, Average  1000Hz
Logitech G203 Prodigy Gaming Mouse: Latest  1000Hz, Average  1000Hz
Logitech G203 Prodigy Gaming Mouse: Latest  1000Hz, Average  1000Hz
Logitech G203 Prodigy Gaming Mouse: Latest  1000Hz, Average  1000Hz
Logitech G203 Prodigy Gaming Mouse: Latest  1000Hz, Average  1000Hz
Logitech G203 Prodigy Gaming Mouse: Latest  1000Hz, Average  1000Hz
Logitech G203 Prodigy Gaming Mouse: Latest  1000Hz, Average  1000Hz
Logitech G203 Prodigy Gaming Mouse: Latest  1000Hz, Average  1000Hz
Logitech G203 Prodigy Gaming Mouse: Latest  1000Hz, Average  1000Hz
Logitech G203 Prodigy Gaming Mouse: Latest  1000Hz, Average  1000Hz
Logitech G203 Prodigy Gaming Mouse: Latest  1000Hz, Average  1000Hz
Logitech G203 Prodigy Gaming Mouse: Latest  1000Hz, Average  1000Hz
Logitech G203 Prodigy Gaming Mouse: Latest  1000Hz, Average  1000Hz
Logitech G203 Prodigy Gaming Mouse: Latest  1000Hz, Average  1000Hz
Logitech G203 Prodigy Gaming Mouse: Latest  1000Hz, Average  1000Hz

Though if you move it slowly it starts to go down to like 1 or 3Hz, I guess to save energy.
Comment 10 tempel.julian 2021-01-12 13:47:40 UTC
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest    27Hz, Average     0Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest   500Hz, Average    13Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   175Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest   500Hz, Average   381Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   405Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   504Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   575Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   628Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest   500Hz, Average   669Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   652Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   684Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   710Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   732Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   751Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   768Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   782Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   795Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   807Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   817Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   826Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   834Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   842Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   849Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   855Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   861Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   866Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   871Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   875Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   880Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   884Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   887Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   891Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   894Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   897Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   900Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   903Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   906Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   908Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   910Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   913Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   915Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   917Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   919Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   921Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   922Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   924Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   926Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   927Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   929Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   930Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   931Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   933Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   934Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   935Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   936Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   937Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   939Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   940Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   941Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   942Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   943Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   943Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   944Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   961Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   976Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   984Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   984Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   992Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   992Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   992Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   992Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average   992Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average  1000Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average  1000Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average  1000Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average  1000Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average  1000Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average  1000Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average  1000Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average  1000Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average  1000Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average  1000Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average  1000Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average  1000Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average  1000Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average  1000Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average  1000Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average  1000Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average  1000Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average  1000Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average  1000Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average  1000Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average  1000Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average  1000Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average  1000Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average  1000Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average  1000Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average  1000Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average  1000Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average  1000Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average  1000Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average  1000Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average  1000Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average  1000Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average  1000Hz
SteelSeries SteelSeries Rival 100 Gaming Mouse: Latest  1000Hz, Average  1000Hz

---

I'll try whether a lower polling rate makes a difference. The dynamic lowering of polling rate to save power shouldn't be responsible for the "skipping", as it naturally is also active with kwin-lowlatency.
Comment 11 tempel.julian 2021-01-12 16:02:58 UTC
The difference between "Balance of latency and smoothness" and "prefer smoother animations" seems at least to be less with 125Hz mouse polling rate vs. 1000Hz and 85Hz display refresh rate. However, it's a bit hard to tell, as the 125Hz polling rate look really bad in general. I really think the goal should be to make it as good as possible with 1000Hz.

Also, I think it would be really unfortunate to roll out Plasma 5.21 with default settings that wouldn't suite a substantial part of the user base well (as both David Rubio and me have issues with very different refresh rates), especially if there's the chance to basically avoid the issue for free with slightly different "golden numbers".
Comment 12 David Rubio 2021-01-12 16:36:25 UTC
431509 might also just be this.
Comment 13 David Rubio 2021-01-12 16:36:53 UTC
(In reply to David Rubio from comment #12)
> 431509 might also just be this.

At least in part, but it seems like it's not as cut clear and might be different :p
Comment 14 David Rubio 2021-01-12 16:37:51 UTC
(In reply to tempel.julian from comment #11)
> The difference between "Balance of latency and smoothness" and "prefer
> smoother animations" seems at least to be less with 125Hz mouse polling rate
> vs. 1000Hz and 85Hz display refresh rate. However, it's a bit hard to tell,
> as the 125Hz polling rate look really bad in general. I really think the
> goal should be to make it as good as possible with 1000Hz.
> 
> Also, I think it would be really unfortunate to roll out Plasma 5.21 with
> default settings that wouldn't suite a substantial part of the user base
> well (as both David Rubio and me have issues with very different refresh
> rates), especially if there's the chance to basically avoid the issue for
> free with slightly different "golden numbers".

I have a 144Hz monitor, so 125Hz polling rate actually does look really bad :P

But yeah, smoothness of animations and stuttering is definitely more noticeable on my 144Hz monitor than in my 60Hz monitor.
Comment 15 Vlad Zahorodnii 2021-01-13 07:17:13 UTC
Okay, so it seems like it's an issue related to high mouse polling rates. Aurorae is a known performance killer, do stutters also occur with breeze window decoration?
Comment 16 tempel.julian 2021-01-13 11:47:44 UTC
My reports are with Breeze decorations. :)
Comment 17 Vlad Zahorodnii 2021-01-13 11:51:56 UTC
Hmm, okay then, I will wait until my 1000Hz mouse arrives.
Comment 18 Vlad Zahorodnii 2021-01-14 13:37:33 UTC
Created attachment 134849 [details]
patch

Could someone please test this patch? Do windows still stutter when you move them?
Comment 19 tempel.julian 2021-01-14 14:23:03 UTC
With that patch, the skipping  seems to be entirely gone and I can use "force lowest latency" on both Xorg and Wayland without issues. :)
Comment 20 Bug Janitor Service 2021-01-14 17:34:44 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/590
Comment 21 Vlad Zahorodnii 2021-01-14 17:36:21 UTC
It will be highly appreciated if somebody could test ^^^
Comment 22 tempel.julian 2021-01-14 18:06:38 UTC
With that MR, everything is fine here on both Xorg and Wayland! :)
Comment 23 Vlad Zahorodnii 2021-01-14 18:15:07 UTC
Phew! Great! :-)
Comment 24 Vlad Zahorodnii 2021-01-14 18:57:32 UTC
Git commit b5a1eba2779b06715508365c6e2b86017151cef0 by Vlad Zahorodnii.
Committed on 14/01/2021 at 18:45.
Pushed by vladz into branch 'master'.

Properly schedule repaints with premature presentation timestamps

The last presentation timestamp might be in the future by a couple of
hundred microseconds.

This may break timestamp aligning code because it assumes that the
last presentation timestamp is less or equal to the current time.

In order to properly handle this case, we have to first compute the
next expected presentation timestamp by advancing the last presentation
timestamp by the amount of vblank interval. If that fails, we can safely
resort to aligning timestamps.
Related: bug 431509

M  +5    -2    renderloop.cpp

https://invent.kde.org/plasma/kwin/commit/b5a1eba2779b06715508365c6e2b86017151cef0