X.Org Server Adds "AsyncFlipSecondaries" To Deal With Crappy Multi-Monitor Experience
Written by Michael Larabel in X.Org on 9 September 2021 at 04:00 PM EDT. 64 Comments
X.ORG --
At the moment when running the X.Org Server in a multi-monitor configuration with displays of different refresh rates, it can lead to a poor experience with a variety of visual deficiencies when running an unredirected full-screen window with page-flipping for DRI3/Present. There is now a change that was merged into the X.Org Server with a new "AsyncFlipSecondaries" to improve that experience when running multiple displays of varying refresh rates.

Open-source developer Mario Kleiner who came up with this new "AsyncFlipSecondaries" feature sums up the problem as:
Whenever an unredirected fullscreen window uses pageflipping for a DRI3/Present PresentPixmap() operation and the X-Screen has more than one active output, multiple crtc's need to execute pageflips. Only after the last flip has completed can the PresentPixmap operation as a whole complete.

If a sync_flip is requested for the present, then the current implementation will synchronize each pageflip to the vblank of its associated crtc. This provides tear-free image presentation across all outputs, but introduces a different artifact, if not all outputs run at the same refresh rate with perfect synchrony: The slowest output throttles the presentation rate, and present completion is delayed to flip completion of the "latest" output to complete. This means degraded performance, e.g., a dual-display setup with a 144 Hz monitor and a 60 Hz monitor will always be throttled to at most 60 fps. It also means non-constant present rate if refresh cycles drift against each other, creating complex "beat patterns", tremors, stutters and periodic slowdowns - quite irritating!

Mario devised the AsyncFlipSecondaries option in allowing for a vblank-synced flip on the primary display while all other displays will try to flip async/immediately and not synchronized to the central vblank. So the secondary displays may have potential tearing but that trade-off should be better than the status quo for at least some users.

More details via this commit. The AsyncFlipSecondaries addition will be part of the upcoming X.Org Server 21.1 release.
Related News
About The Author
Author picture

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter or contacted via MichaelLarabel.com.

Popular News This Week