Adaptive Sync doesn't work in most games on Wayland
Brief summary of the problem:
Adaptive Sync, or VRR, doesn't work in more demanding games, such as: Battlefield V (XWayland, Proton), Mafia: The Definitive Edition (XWayland, Proton), Far Cry 5 (XWayland, Proton), The Forest (XWayland, Proton), War Thunder (XWayland, Native) but works in less demanding games like Crab Game (XWayland, Proton), Dusk (XWayland, Proton) and in the VRRTest app.
The issue is visible in one of the videos, where Far Cry 5 is running, an example of a game with broken adaptive sync on Wayland, where you can see the FPS reported by MangoHud is limited to 60 but my monitor's OSD reports the refresh rate is rapidly jumping and is not steady. In a game with working adaptive sync the refresh rate reported by my monitor should match exactly what’s reported in MangoHud, so in this case, it should be 60. Weirdly enough, in Far Cry 5 the issue happens when I look at things like cars, trees, ground and in-game objects, but as soon as I raise my character's head so only the sky is visible, adaptive sync starts working and the the refresh rate value on OSD suddenly starts matching what's reported by MangoHud. So maybe it has something to do with how intensive the scene is to draw? The GPU frequency is lower when I look at the sky in the case of Far Cry 5. Another thing to note is the game is not smooth, probably because, well, my monitor's refresh rate is changing so rapidly, it makes the game stutter and the game feels unresponsive, it also has an additional input lag, indicating to me that the adaptive sync is not working. As I said, all these weird stuttering and input lag issues are gone once I look at the sky (in the case of Far Cry 5).
I've tried limiting frames using a different application, enabling VSync in-game or using the in-game FPS limiter. In Far Cry 5, there’s an option to limit frames from the settings but the issue remains when using that over MangoHud.
This issue is happening in pretty much all AAA games I have. Weirdly enough, this is not the case in games like: Dusk, Crab Game and in the VRRTest application. In there, adaptive sync works as expected (as shown in the second and third video).
This issue is not new. I remember it happening ever since adaptive sync on Wayland became a thing. One major thing to note is that it's like that on ALL Wayland desktop environments and window managers. I've tried KDE Plasma, Gnome with mutter patched to support adaptive sync, Hyprland and Sway. The issue is present in the exact same form on all these environments. VRR works fine for me on Windows.
So, in short:
- It seems that in more demanding games adaptive sync does not work, meaning the monitor’s refresh rate doesn't match what MangoHud says the game's running at.
- Adaptive sync works in less demanding games and test apps.
- When it's not working, the monitor's refresh rate jumps rapidly between values and is not steady
- It creates stutters, the gameplay is not smooth and there's an input lag present, presumably from adaptive sync not working and game being run with Mailbox
- It's like that on all major Wayland desktop environments and window managers (KDE Plasma, Gnome with mutter patched, SwayWM and in Hyprland). VRR works fine on Windows.
Hardware description:
- CPU: AMD Ryzen 7 5800X
- GPU: Advanced Micro Devices, Inc. [AMD/ATI] Navi 23 [Radeon RX 6650 XT / 6700S / 6800S]
- System Memory: 32 GB
- Display(s): Acer KA242Y
- Type of Display Connection: HDMI
Is it possible it's because I'm using an HDMI display?
System information:
- Distro name and Version: Arch Linux
- Kernel version: 6.7.4-zen1-1-zen
- Custom kernel: Linux Zen (the issue remains when using the stock kernel)
- AMD official driver version: N/A, default Mesa drivers on Arch
How to reproduce the issue:
- Enable adaptive sync in desktop environment's settings
- Launch a more demanding 3D game with a frame limiter
- Watch the FPS value reported by MangoHud, or Steam overlay, and compare with the refresh rate value reported by the monitor's OSD
Screenshots/video files
The issue in Far Cry 5: https://www.youtube.com/watch?v=AZjfHj6V0qI
VRRTest app: https://www.youtube.com/watch?v=1HO-2gsI5tg
Crab Game with working adaptive sync: https://www.youtube.com/watch?v=wmukHwONLbA