Bug 478938

Summary: The presentation time protocol is buggy with VRR on Chromium
Product: [Plasma] kwin Reporter: fililip <team>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: normal CC: kde, nate, xaver.hugl
Priority: NOR Keywords: qt6
Version First Reported In: 5.91.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
URL: https://bugs.chromium.org/p/chromium/issues/detail?id=1517884
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description fililip 2023-12-23 13:46:19 UTC
SUMMARY
After setting VRR policy to "Always" (or going fullscreen on "Automatic"), running Chromium with the Ozone hint property set to Wayland or auto, the browser fails to VSync unless the hardware cursor is moved (software cursor has no influence).

STEPS TO REPRODUCE
1. Set VRR policy to "Always" or "Automatic"
2. Launch Chromium with the Wayland backend (and go fullscreen if VRR policy is set to "Automatic")

OBSERVED RESULT
The browser has a seemingly random frametime (easily observed with UFOTest, simply scrolling a website, or with a YouTube video), but while moving the mouse everything looks good - I get 165 FPS. (This isn't good for low framerate video playback though, as moving the mouse sets the refresh rate back to 165Hz.)

EXPECTED RESULT
Chromium's draw/swap calls should dictate the refresh rate in a stable manner.

SOFTWARE/OS VERSIONS
Linux: Arch Linux, kernel version 6.6.7-zen1-1-zen
KDE Plasma Version: 5.91.0 (Plasma 6.0 Beta 2)
KDE Frameworks Version: 5.247.0
Qt Version: 6.7.0beta1

ADDITIONAL INFORMATION
Setting KWIN_FORCE_SW_CURSOR to 1 doesn't cause Chromium to sync properly while moving the mouse - could this have something to do with cursor plane separation?
Comment 1 Zamundaaa 2024-01-09 14:42:10 UTC
This is almost certainly a chromium bug. It abuses presentation time to schedule its rendering, which does not work with VRR.
Comment 2 Nate Graham 2024-01-11 23:42:12 UTC
Can you report it upstream, Fililip?
Comment 4 Zamundaaa 2024-01-28 20:30:53 UTC
*** Bug 480436 has been marked as a duplicate of this bug. ***