VSync goes in and out of sync
Affected version
- Arch Linux, latest state as of Nov. 15
- Mutter version 41.1 (tested with vanilla as well as with !1441 applied)
- The issue appears in xorg 1.21.1.1 (and most likely prior versions, too)
- Nvidia proprietary 495.44
Bug summary
I'm using multiple monitors at different refresh-rates (120hz+60hz), tho I'm not sure that is actually relevant, since when I unplug my 60hz monitor this still happens.
When playing games that are set to vsync, at irregular intervals it looks as if the game vsync goes out of sync with the gpu's vsync, so the game continues rendering at 120fps with absolute consistency, but for a few seconds, between 2 seconds and 20 seconds, the game looks like it's rendering at 60hz instead. After this period the game goes back to 120hz smoothness. Using DXVK to check for frame-time jitter none is detected by its internal profiler, so the jitter doesn't come from the game itself, but some layer on top of the game.
This problem has appeared after upgrading from Gnome 3.38 to Gnome 41.1 and wasn't present before. Before I always had consistently inconsistent synchronization, but with Gnome 41.1 sometimes it's really consistent and perfectly renders at the required 120hz and sometimes these glitches happen. I've tried applying !1441 and it feels like the issue occurs less frequently and for a shorter amount of time, but it still occurs.
Steps to reproduce
- Use a 120hz Monitor with nvidia proprietary drivers on an nvidia GPU
- Start a 3D game that is set to Vsync internally (Edit: With some patience you can also see this on testufo.com)
- Observe the screen for some amount of time while smooth motion appears in the game
*Edit: With lots of patience and an attention to detail, you can also observe this effect happening from dragging a window in circles with nothing else opened (for example an empty terminal). It's not as easy to spot as in a 3D game and the desynchronization seems to last less long (1-3 seconds), but it is visible.
What happened
Mutter appears to lose synchronization between the internal frame-clock and the actual vsync clock at times and then resynchronizes some time later.
What did you expect to happen
I expected Mutter's frame-clock to stay synchronized to the vsync clock.
Relevant logs, screenshots, screencasts etc.
One note: This issue may be more apparent in my setup than in other setups because my monitor uses backlight strobing to reduce motion blur by pixel response-times. The effect is still visible if I turn that feature off, but it's less noticeable.
Edit: Nothing shows up in journalctl --follow
when this framerate weirdness is occuring
Further edit: this desynchronization is not fullscreen. One window/application can become desynchronized like this while other applications that are rendered on the same screen render perfectly smoothly. At one point or another every application is affected by this however. Tho not necessarily at the same time.
Note: Good work on the High-Refresh-Rate support! It has improved dramatically from 3.38 to now. Yes this glitch here is exceptionally annoying, but it only occurs once every minute or 2, while the rest of the time everything renders in perfect buttery smoothness. Keep up the good work!