KDE KWin's Move Away From GBM Surfaces

Written by Michael Larabel in KDE on 14 March 2023 at 06:02 AM EDT. 83 Comments
KDE
KDE developer Xaver Hugl has written a blog post how the KWin compositor's DRM back-end has been working to move itself off GBM surfaces (gbm_surfaces) to instead allocate buffers directly and import them into EGL. This ultimately should be a win for the KWin compositor once everything is complete.

Due to KWin hitting various limitations around gbm_surface, there has been an effort for KWin to allocate buffers manually and then import them into EGL as an EGLImage. But in this new path, KWin ends up losing out support for EGL_KHR_partial_update namely as a performance / power-savings optimization for mobile devices. They hope to be able to restore EGL_KHR_partial_update support in the future.

The KWin developers have also been battling other obstacles in their move off gbm_surface. But the main takeaway from Xaver's blog post is:
"The long term plan is to make the backends exclusively deal with buffers and never interact with graphics APIs. At the moment the existing support for Xorg makes that impossible to do well, but with plans to split the code base for X11 and Wayland and eventually remove support for Xorg entirely, this will change. Even without that however, there’s a bunch of code in the backends that has the potential to be shared and simplified with this change, and a few features that can be implemented easier or at all, like the already mentioned zero copy screencasting."

Hopefully these KWin improvements will address some of the obstacles and bugs/annoyances KDE users have had with the KWin compositor that has also led to various forks being created over the years. See Xaver's blog post here.
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