With vrr and atomic modesetting, commits that only modify the cursor plane get delayed page flips
In Plasma 6, if the cursor is moved but nothing else on the screen has changed, KWin does an atomic commit that only contains cursor plane properties. When this happens on my 120Hz screen with VRR active, the pageflip happens about 14ms after the atomic ioctl is called, and the cursor accordingly doesn't look very smooth.
If I change the code to also add some primary plane property to the commit, like SRC_X
, without actually changing the property, the behavior is as expected: The pageflip always happens at most 1000ms/120 = 8.33ms
after the ioctl, as the commit triggers a new refresh cycle at that point.
I tested this on a Ryzen 7840U, and on a rx 6800XT, both with kernel 6.6.3. We also got two bug reports about this: https://bugs.kde.org/show_bug.cgi?id=477917, https://bugs.kde.org/show_bug.cgi?id=477899
To test it yourself, use a live boot of the Plasma 6 beta and change the adaptive sync setting to "always". Moving the cursor on an otherwise idle screen will feel a lot more sluggish than with adaptive sync off.
Note that the observed behavior is expected with the legacy cursor ioctls, so I suspect the kernel code at some point confuses the cursor-only commit with the legacy ioctl, which does a cursor-only commit internally.