VRR improvements
This is just a list of issues and plans to summarize the information spread around elsewhere.
workarounds
-
when the refresh rate isn't stable, many screens flicker in brightness -
we could limit the refresh rate change in the KMS thread (#174) -
LFC throws a wrench into the above, as the kernel will be doubling the refresh rate once it falls below some minimum. So we'll have to do LFC ourselves, and ideally get a kernel API to disable its LFC handling -
In absence of our own LFC implementation, a minimum refresh rate would be desired, to prevent the kernel from going too crazy with LFC at low refresh rates -
We could also detect if the refresh rate is reasonably stable or not, and disable VRR if it isn't, which mostly circumvents the LFC issue and should be easier to do for Plasma 6.0
-
-
when we commit a cursor-plane-only update, amdgpu doesn't update the FreeSync refresh rate: https://gitlab.freedesktop.org/drm/amd/-/issues/3034. I'll try to fix it again but depending on how long that takes, kernel release schedules etc we might have to ship a workaround for Plasma 6.0 - which would be to just always send a primary plane "update" with SRC_X = 0
-
we should keep VRR_ENABLED
set to 1 even if the vrr policy is set to automatic and no window is fullscreen, because HDMI is stupid: https://gitlab.freedesktop.org/drm/amd/-/issues/2200
Improvements
-
we should use VRR to save power when displays don't have anything (or only very little) going on (#148) -
when a software cursor gets moved around on top of a window updating with a reasonable refresh rate, the cursor shouldn't take over the refresh rate -
when a hardware cursor gets moved on top of a window updating with a reasonable refrsh rate, the cursor shouldn't take over the refresh rate. https://gitlab.freedesktop.org/drm/amd/-/issues/2186 causes problems for that, so doing that may require forcing a software cursor with VRR on AMD... (#85 (closed)) -
in Always
mode, when the focused window has a reasonable and stable refresh rate, enable VRR even in windowed mode and restrict repaint scheduling to that window. If that works well and the brightness flicker problem is solved or worked around well enough, get rid of theAutomatic
option and make VRR just a toggle -
add an effect that shows whether or not VRR is active, and at what refresh rate it's running, without scheduling repaints itself
Edited by Xaver Hugl