How Explicit Sync Could Be the Solution to NVIDIA/Wayland Issues: A Developer’s Explanation

If you’ve ever questioned why NVIDIA GPU issues on Wayland affect some Linux users but not you, the recent writings of KDE developer Xaver Hugl can shine some light. He offers an insightful blog post explaining how the explicit sync protocol will level the playing field for all.

You may have noted the news about explicit sync, short for explicit synchronization, being incorporated into Wayland protocols. So, what exactly is it? Essentially, it’s a fresh protocol deriving from DRM synchronization objects. It enables applications to explicitly inform the graphics driver in userspace, kernel, or compositor when they’ve finished rendering.

Previously, when applications rendered something, there was always a delay in the rendering process. This method, known as “implicit sync,” depends on applications to record a list of commands with the OpenGL or Vulkan drivers for the GPU to carry out. This could be at the root of issues some Linux users face with NVIDIA and Wayland.

“This framework simplifies the process for app developers to construct functioning applications, but it can also lead to problems,” said Xaver Hugl. “The most significant issue for Wayland is that the application doesn’t always know which tasks it is synchronizing to. Therefore, it’s possible to unintentionally synchronize with GPU commands with no relevance to your specific task.”

With explicit synchronization in place, “accidental” synchronization won’t occur anymore. Xaver Hugl remarks that this will enhance performance by decreasing the tasks drivers need to perform since applications will now communicate directly with them rather than attempting to determine task dependencies from a list of commands.

“There’s been a lot of discussions around the internet among individuals frequently experiencing these issues, and others who are not, and you might now have an understanding as to why not everyone is impacted,” Xaver Hugl expounds. “This implies a multitude of factors – like the CPU and GPU you own, the apps you utilize, the driver version, the kernel, compositor, and more – determine if you actually encounter the issue.”

In conclusion, the NVIDIA GPU users should watch out for the explicit sync protocol in the coming year. It is being incorporated in the Wayland compositors, the exclusive NVIDIA driver, and Xwayland. This is aimed at satisfying everyone and promoting Wayland adoption among NVIDIA users.

Image credits: NVIDIA Corporation (edited by Marius Nestor)

Last updated 4 hours ago


Tags: