Prime Nvidia can't find GLX (solved)

So the laptop (XPS 15 Kubuntu 18.04) has an nvidia 900 series mobile GPU. When I went to run the unit tests for PyOpenGL... almost entirely red. Because the X display had no GLX extension. To be clear, X was running, KDE Plasma (which normally uses GLX for rendering) was apparently using XRender silently, basically there was no indication that there was a problem other than PyOpenGL failing to get a context (queue much debugging of PyOpenGL). When I thought to check it, every *other* OpenGL using program also failing to get a context, so a problem with OpenGL, not PyOpenGL.

The Xorg log was reporting:

Failed to initialize GLX extension (Compatible NVIDIA X driver not found)

which on researching it came down to the machine having PRIME, but not having a configuration that would configure the card to work with it. Basically it seems that you need an xorg config and a small xrandr command on startup to get the display to load GLX. A little packaged script in an nvidia forum worked to get the display to come up with GLX (note: the original bug described there is that the whole X server fails to start, my bug was *just* having GLX missing).

nvidia-settings can no longer manage certain aspects of the display, but it does let you use GLX again.

Comments

Comments are closed.

Pingbacks

Pingbacks are closed.