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 – Mutter, KWin, 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.
Great summary of the current state of play – appreciated!
> no annoying flickers, glitches, screen artifacts, lags
I’ve been using Linux with XFree86 / X11 / Xorg for over 20 years and I’ve never experienced those issues. There are however real issues and even functionality limitations introduced by the Wayland protocol.
> or apps crashing
This is an age-old problem that affects all apps in all operating systems, and the display sync method won’t change that.
These are not Wayland limitations but limitations of Linux graphics stack. Every modern graphics stack on other operating systems is based on explicit sync for good reasons. That includes Android which is also based on Linux. Implicit sync is outdated concept that doesn’t work nicely with modern technologies like Vulkan.
Thanks for the nice explanation.
I moved from nvidia to amd years ago as I use tumbleweed and the issues after big kernel updates was just to much hassle.
Still nice that all will get a smooth experience.
Thanks for confirming that it is right decision to look for AMD based laptop (without nVidia) to use with Linux
I was always afraid of nVidia in this context (and there is also always known phrase about them), I don’t trust them and correspondingly to their drivers, if they don’t respect privacy and integrated telemetry into win drivers who knows what they integrate into Linux proprietary drivers.