Explicit Sync and why my apps may crash on Wayland with Nvidia hardware

What is Explicit Sync you may ask. Well, Xaver explained it in deep on his blog.

Xaver:

When applications “render” things, that rendering doesn’t happen immediately. Instead, they effectively record a list of commands with OpenGL or Vulkan for the GPU to execute, and that list then gets handed to the GPU to execute at its own pace.

This is needed for performance reasons: If the CPU had to wait for the GPU to execute each command one by one, both CPU and GPU would often sit around, doing nothing except waiting for the other one to finish its task. By executing commands on the GPU while the CPU does other things, like preparing new commands for the GPU, both can do a lot more work in the same time.

However, in practice, rendering commands don’t stand alone on their own. You might be running one task to render an image, and another one to process the result into something else, or to read it back to the CPU, so that it can be saved as a file on disk. If you do that without synchronization, you might be reading from the image in the middle of rendering, or even before the GPU has started to work on the buffer at all.

This all sounds wonderful, if it would work. There is a lot of work still to be done. Arch updated libraries and drivers and has to chase some bugs to get Nvidia users back to a stable state on Plasma 6.1 and other desktops.

Open Issues (there are more for sure):

Forum threads:

Articles:

What Manjaro does so far

We keep the efforts to get explicit sync working currently in our unstable branch. This means you won’t get the Plasma 6.1 updates anytime soon. Also you won’t get the newer Nvidia drivers any time soon in other branches. We may also might hold back libraries which enable explicit sync to avoid unwanted issues within stable and testing branches.

What can you do to help?

Nvidia users who don’t need the PC for production work should switch to unstable and update to the lastest packages and keep updating their systems. Your system won’t be stable for sure. You might see issues and maybe new bugs as the ride goes on. You may also want to have some technical understanding on how to debug or do a git bisect and recompile packages for Manjaro to help testing issues and solutions for those problems you may face. In short it is still kinda a mess and a wonky ride if you use Nvidia hardware and latest packages/software as of now.

8 Likes