Explicit GPU Synchronization Merged For XWayland

Written by Michael Larabel in X.Org on 9 April 2024 at 06:44 AM EDT. 51 Comments
One year in the making, NVIDIA's code for explicit GPU synchronization in XWayland along with the X.Org Server DRI3 and Present extensions has now been merged! This is a big culmination of all the recent work around Wayland explicit synchronization and notably takes care of a number of NVIDIA driver problems on Wayland in the process.

Erik Kurzinger of NVIDIA explained in the year old merge request for the X.Org Server:
"Here is our proposal for adding explicit GPU synchronization to the DRI3 and Present extensions, along with an implementation for Xwayland. While we at NVIDIA may be particularly keen to have this in place, since our driver lacks implicit sync support, a general consensus seems to be forming around the idea that explicit sync is the best path forward for the Linux graphics stack. Xwayland will likely remain an important component in that stack for some time yet, and therefore I feel that this work will be of long-term benefit to the community more broadly.

The design takes inspiration from the proposed Wayland wp_linux_explicit_sync_v2 protocol, making use of DRM syncobjs as the main primitive. I believe this offers a few benefits. One, having both X11 and Wayland use a similar mechanism for explicit sync will simplify development for client-side drivers, and two, it will also hopefully make it fairly straight-forward for Xwayland itself to add support for the Wayland explicit sync protocol, presumably once it's more widely implemented by compositors.

I've tried to keep this initial proposal focused on getting a usable GPU synchronization primitive in place, and adding support for it to the PresentPixmap request, believing this to be the most important part of the presentation pipeline. Other use-cases for this primitive are conceivable, for instance perhaps in the Damage extension, but I feel that those are best left for later."

The 11 patches in this series have gone through a lot of work since the merge request was opened in August 2022. The Linux DRM sync object protocol for Wayland is also in good shape now and the DRI3 1.4 and Present 1.4 plumbing all complete.

Explicit sync merged for XWayland

As of this morning all of the work has been merged as an exciting culmination of the effort. A few Wayland compositors still need to land their explicit GPU synchronization object support but the GNOME Mutter code is already in place Mesa 24.1 Vulkan drivers support Wayland explicit sync, and other pieces coming together nicely. NVIDIA is also expected to have out a new Linux binary driver release soon for ironing out their Wayland support with explicit sync capabilities.
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