Explicit Sync: Wayland’s Final Steps Towards Ultimate Desktop Experience

Wayland integrates explicit sync, eliminating flickering and frame pacing issues with NVIDIA drivers on Linux.

Imagine if I said combining Wayland with NVIDIA could give you the smoothest experience ever on your Linux system. Imagine no annoying flickers, glitches, screen artifacts, lags, or apps crashing. Everything would run at the speed of light and be as smooth and pleasing to the senses as possible.

And no, I’m not out of my mind as I write this. What I’m about to share, known as explicit sync, will completely transform Wayland’s image. It’s going from being seen as a better-but-not-quite-there display protocol to the go-to solution. It’s a real game-changer. Let me tell you why.

Wayland Integrates Explicit Sync

In an engaging blog post, Xaver Hugl, a KDE developer, discusses in great detail why the people using Wayland faced issues, especially those using NVIDIA GPUs. He also talks about some exciting updates that are just around the corner. Here’s what he shared.

In a significant development for the Linux graphics landscape, Wayland has recently integrated an “explicit synchronization” or explicit sync feature.

An update that promises to refine the interaction between applications, the operating system, and graphics hardware, promising to lead to smoother and more reliable graphics performance across a variety of devices.

Okay, that sounds exciting. But I bet some of you might wonder, “What exactly is explicit synchronization, and what’s all the fuss about?” Let me explain.

Implicit/Explicit Sync Explained

Have you ever wondered why people using AMD or Intel GPUs on their Linux systems seem to have fewer issues than those with NVIDIA? The answer is simple – it all comes down to “implicit buffer synchronization.” AMD and Intel support this feature, but NVIDIA doesn’t.

Rendering in applications involves the GPU executing a series of commands at its own pace, which the CPU prepares. This division of labor between the CPU and GPU boosts performance by allowing both to work simultaneously on different tasks.

In other words, synchronization in graphics APIs is managed implicitly (known as implicit sync), meaning the kernel or graphics driver is in charge of automatically handling the timing of these tasks without direct input from the application.

However, this asynchronous operation can cause issues. For example, since the graphics driver doesn’t get any information directly from the application itself, if an application attempts to read or modify an image while the GPU is still processing it, the result can be unpredictable – flickers, glitches, crashes.

This is where explicit synchronization comes in – it ensures that these operations occur in the correct order, maintaining the integrity of the graphics output. Now incorporated into Wayland, this new model changes the game by allowing applications to directly specify when rendering is complete and which tasks need synchronization.

Furthermore, this approach prevents accidental syncs and enhances performance by reducing the workload on drivers to interpret command dependencies.

Wayland + NVIDIA: A Match in Heaven

The move to explicit sync is particularly relevant due to the limitations of the previous synchronization models with certain graphics drivers, notably the proprietary NVIDIA driver.

The lack of support for implicit sync in these drivers led to significant issues on Wayland, including flickering and frame pacing problems. Although workarounds exist, they are far from perfect and could lead to crashes or other glitches.

The introduction of explicit sync in Wayland aims to resolve these issues, offering a more stable and consistent graphics experience. This is especially crucial for NVIDIA users on Wayland, as it addresses the most significant remaining barrier to using this display protocol.

Now we’re getting to the really exciting part. The NVIDIA 555 beta driver, slated for release on May 15, will be the first to support the explicit sync features.

“Beta release is currently targeted for May 15. It will include support for both the Wayland explicit sync protocol for EGL applications and the counterpart X11 explicit sync protocol for GLX and Vulkan X11 applications.”

In other words, now all is in NVIDIA’s hands. Once that happens, using Wayland with NVIDIA graphics cards should be a smooth and complete experience.

Of course, window managers like Mutter (GNOME) and KWin (KDE Plasma), as well as a compatibility layer like Xwayland, should also provide support to allow users to take advantage of explicit sync capabilities.

The good news is that the required merge requests are already being worked on. Here they are – MutterKWin, and Xwayland.

Bottom Line

The future looks bright, with explicit sync now part of Wayland and soon to be supported by Mutter, KWin, Xwayland, and NVIDIA drivers. This paves the way for smoother, more reliable graphics rendering across a wide range of hardware and software configurations, ultimately enhancing the computing experience for Linux users.

Yes, NVIDIA users will be the main ones to benefit from this because their drivers do not support implicit buffer synchronization. The explicit sync should fix most of the issues people with NVIDIA hardware currently have.

At the same time, however, other drivers will also expected to benefit since Vulkan, a modern graphics API that provides high-efficiency access to modern GPUs, uses the same explicit sync approach.

One thing is sure – the next few months will be pretty exciting. Wayland, which everyone discusses as a great solution but hasn’t met expectations, might finally make a breakthrough. We have to wait a bit longer, a few months, to see if it happens.

Bobby Borisov

Bobby Borisov

Bobby, an editor-in-chief at Linuxiac, is a Linux professional with over 20 years of experience. With a strong focus on Linux and open-source software, he has worked as a Senior Linux System Administrator, Software Developer, and DevOps Engineer for small and large multinational companies.

Think You're an Ubuntu Expert? Let's Find Out!

Put your knowledge to the test in our lightning-fast Ubuntu quiz!
Ten questions to challenge yourself to see if you're a Linux legend or just a penguin in the making.

1 / 10

Ubuntu is an ancient African word that means:

2 / 10

Who is the Ubuntu's founder?

3 / 10

What year was the first official Ubuntu release?

4 / 10

What does the Ubuntu logo symbolize?

5 / 10

What package format does Ubuntu use for installing software?

6 / 10

When are Ubuntu's LTS versions released?

7 / 10

What is Unity?

8 / 10

What are Ubuntu versions named after?

9 / 10

What's Ubuntu Core?

10 / 10

Which Ubuntu version is Snap introduced?

The average score is 68%