Bug 450884

Summary: Slight stuttering in game with VRR at higher FPS than set "regular" refresh rate of the display
Product: [Plasma] kwin Reporter: torokati44
Component: compositingAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED NOT A BUG    
Severity: minor CC: torokati44, xaver.hugl
Priority: NOR    
Version First Reported In: 5.24.2   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description torokati44 2022-02-26 17:11:58 UTC
I have a 144 Hz FreeSync-capable monitor on a Radeon RX 580 with the open source driver stack.
The "Adaptive sync" option is set to "Auto" for this display, and the regular refresh rate is set to 120 Hz (because it is a whole multiple of 24 FPS, 30 FPS, and 60 FPS).
I also have a secondary, non-FreeSync-capable, 60Hz monitor.

When playing a Steam game (Trackmania 2 Lagoon Demo), I can see the effects of Adaptive Sync, as the game is butter smooth everywhere between at least 80 and 120 FPS.

However, once the FPS rises above 120, I can see a slight, periodic stutter. So I set the in-game FPS limiter to 115 to avoid this.
I tried many combinations of setting the "base" refresh rate of my display to 100 Hz, 120 Hz, and 144 Hz, and also setting the in-game FPS limiter to 90, 110, and 130, and in all cases, I could only see this stuttering then the FPS was higher than the set base refresh rate of my display.

STEPS TO REPRODUCE
1. Set a FreeSync display to a lower base refresh rate than its maximum supported, and Adaptive Sync to Auto.
2. Play a full-screen game with FPS between the set base refresh rate and the maximum supported by the display.

OBSERVED RESULT

There is a constant, slight periodic jerk in motion of the game.

EXPECTED RESULT

The game is smooth across the whole supported VRR range of the display, regardless of the base refresh rate set on it.

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: Fedora 35, Linux 5.16.11
KDE Plasma Version: 5.24.2
KDE Frameworks Version: 5.91.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION

This has been the same before the recent update of Fedora 35 to Plasma 5.24, with Plasma 5.23 as well.
Comment 1 torokati44 2022-02-26 18:12:43 UTC
Forgot to mention: I use Wayland.
Comment 2 Zamundaaa 2022-02-27 18:17:27 UTC
That's just how VSync works. If the game refreshes more often than your monitor can or the set refresh rate allows, you will see slight stutter because the timing of your game and the monitor gets out of sync every so often.
To work around that you can enable the in-game "VSync" setting
Comment 3 torokati44 2022-02-27 18:28:43 UTC
Isn't the whole point of Adaptive Sync (or FreeSync), that there is _no_ "refresh rate"? That is, when it is actually in operation, of course.
The display I'm talking about has a VRR range of 48 Hz to 144 Hz. I just usually use it at 120 Hz when not gaming.
Therefore, I'd imagine that no matter what refresh rate is set on the monitor when Adaptive Sync is off (even if it is in auto mode); when it is on, any content (game) within the entire supported range of the device should be smooth.
So, 130 FPS, 140 FPS, etc. should still always be smooth, no?
Comment 4 Zamundaaa 2022-02-27 18:42:33 UTC
No. Adaptive Sync enables the system to lower the refresh rate below what the monitor is set to, not above it; there isn't even a driver API to target a specific refresh rate right now.
If you want to go above 120Hz, you need to set your monitor to run at above 120Hz.
Comment 5 torokati44 2022-02-27 21:34:36 UTC
Oh dear, you are absolutely right. I did not know that Adaptive Sync had this limitation.
I just booted Windows to check if it has the same thing, and when setting the refresh rate to 120 Hz, even the reported VRR range of the display shrinks to only 48 - 120 Hz.
It still seems so silly to me that this is how it works.
Thank you for the information and sorry for the spam!