Some Ugly Code Can Get NVIDIA's Linux Driver Working With Accelerated XWayland
Written by Michael Larabel in NVIDIA on 23 August 2020 at 08:45 PM EDT. 77 Comments
Red Hat's Adam Jackson has been working on "GLX Delay" as a means of offering accelerated GLX with OpenGL for XWayland when using the NVIDIA proprietary driver. The proposed code is going through Mesa even though it's for the proprietary NVIDIA driver benefit and also requires a change to the OpenGL Vendor Neutral Dispatch Library (libglvnd).

This work-in-progress code does allow the likes of glxgears and glxinfo to now successfully run on XWayland with the NVIDIA proprietary driver. Adam prominently noted, "due to the design of this approach the actual GL rendering part should be about as fast as it is against Xorg, or against EGL on the bare metal, so in principle this can eventually be just as performant as it is with Xorg."

So while it's nice for NVIDIA binary Linux gamers wanting accelerated XWayland support, this code is quite a bit hacky and does some wrangling so it will work without changes to the NVIDIA proprietary driver. Among the features not implemented are support for resizing XWayland windows, various GLX features, SwapBuffers extra features like vsync are not wired up, and more. The code is being sent in through Mesa since it's reusing Mesa's GLX code

As for why Jackson is working on this NVIDIA XWayland acceleration support, he commented, "I want the xfree86 code out of my life, and this approach seems like it'll eliminate a large class of reasons why you might need to use Xorg and NVIDIA's driver. Certainly it's better than what you currently get for GLX clients in that scenario, which is llvmpipe. On the other hand, I can see the argument that this entrenches the position of NVIDIA's libEGL, since we've only made it more useable. But I think, on balance, that this reduces the binary driver footprint, and I think that's a good direction to go."

The work-in-progress code can be found via this Mesa merge request. We'll see what other upstream Linux graphics driver developers think of this approach over the days ahead.
Related News
About The Author
Author picture

Michael Larabel is the principal author of 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 automated benchmarking software. He can be followed via Twitter or contacted via

Popular News This Week