Skip Navigation

KDE KWin Merge Request Opened For Dynamic Triple Buffering

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.

0
0 comments