primus icon indicating copy to clipboard operation
primus copied to clipboard

Nvidia is deprecating non-GLVND OpenGL and EGL libraries on Linux

Open Skippertak opened this issue 5 years ago • 6 comments

https://devtalk.nvidia.com/default/topic/1032650/linux/unix-graphics-feature-deprecation-schedule/

Will this break primus in the future? Whenever I install primus, that feature is a required use flag

Skippertak avatar Jun 10 '19 06:06 Skippertak

From where do you get the information that glvnd is required for primus? I haven't tested it extensively (yet) but: PRIMUS_libGLa=/usr/lib/x86_64-linux-gnu/nvidia/current/libGLX_nvidia.so.0 PRIMUS_libGLd=/usr/lib/x86_64-linux-gnu/libGL.so.1 LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/primus glxgears seems to work perfectly on my system. Here:

  • libGLX_nvidia.so.0 is the glvnd-library from nvidia
  • libGL.so.1 is the GLVND-dispatch version, that will use the mesa driver (based on the primary display being rendered by intel/mesa)
  • /usr/lib/x86_64-linux-gnu/primus contains the libGL.so.1 for the application to load from primus.

felixdoerre avatar Sep 09 '19 16:09 felixdoerre

Just a funny, possibly related remark: on my Debian system with primus and thus non-GLVND nvidia libraries installed, when I manually start secondary Xorg that renders everything using nvidia and displays through intel, and run glxgears, the GLVND-dispatch version of libGL.so.1 happily uses non-GLVND nvidia libraries and it works. Haven't tested this with anything more complex, though. But it seems to suggest that as far as glxgears is concerned, there isn't very much of a difference between the GLVND and non-GLVND version of nvidia libraries.

liskin avatar Sep 09 '19 16:09 liskin

@liskin How are you sure that the glxgears are using the nvidia libraries? What exactly are you running? When I run: optirun bash in one terminal (to force-start the secondary Xorg), and LD_DEBUG=libs glxgears in another terminal, I can pretty clearly see that these glxgears don't use nvidia.

felixdoerre avatar Sep 09 '19 16:09 felixdoerre

@felixdoerre When I say "secondary Xorg that renders everything using nvidia", I don't mean the kind of secondary headless Xorg that optirun/bumblebee starts. I'm talking about a real foreground Xorg that I interact with using my mouse and keyboard and that uses xrandr --setprovideroutputsource modesetting NVIDIA-0 to attach the intel outputs for displaying. I don't think it's possible to use intel GL with such a setup (except perhaps using xrandr --setprovideroffloadsink or DRI3, neither of which I enabled for this test). Also, glxinfo tells me I'm using the nvidia drivers.

liskin avatar Sep 09 '19 17:09 liskin

(The setup I'm describing is somewhat like https://wiki.archlinux.org/index.php/Nvidia-xrun, but tweaked a bit not to require root.)

liskin avatar Sep 09 '19 17:09 liskin

aah ok, thanks for the explanation.

felixdoerre avatar Sep 09 '19 17:09 felixdoerre