KDE KWin Merge Request Opened For Dynamic Triple Buffering

Written by Michael Larabel in KDE on 26 December 2023 at 05:58 AM EST. 18 Comments
KDE
Similar to the long-worked-on GNOME dynamic triple buffering that is applied when the (most commonly integrated) graphics fall behind schedule in rendering the desktop, a merge request for KDE's KWin compositor has also seen similar work in this area for helping the iGPU catch-up in rendering via a "triple buffering" implementation.

Prolific KWin developer Xaver Hugl opened a merge request overnight that in effect is dynamic triple buffering akin to what Canonical/Ubuntu has worked on the past few years for GNOME. Xaver explained in that pull request:
"When it takes more than one refresh cycle to render a frame, which isn't unheard of with weak integrated GPUs, KWin starts compositing immediately and we may or may not hit the vblank deadline. If it's missed, then the buffer takes a whole refresh cycle of the display to be used, which means the refresh rate drops to half of what it should be - resulting in a less smooth appearance and increased latency.

With this MR, KWin schedules frames so that they can always hit the vblank deadline, and allows a maximum of two frames to be pending at the same time. This means that if the GPU can't keep up, latency will be increased just as much as is needed instead of almost one entire additional frame of latency and the halved refresh rate."

Currently the merge request is considered in draft form as there are some open items around the transitioning between double and triple buffering, whether to also add similar triple buffering for KDE on X.Org, and better handling of render time queries still needs to be wired up.


We'll see where this KWin triple buffering work leads and how soon before it's ready for merging.
Related News
About The Author
Michael Larabel

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, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week