Bug#1029681: nvidia-legacy-340xx-driver: Qt5 apps fail to launch with a segfault

Andreas Beckmann anbe at debian.org
Sat Feb 11 13:43:04 GMT 2023


Control: tag -1 upstream wontfix

On 11/02/2023 12.23, jim_p wrote:
> Some manjaro user from github found a solution for kodi v20. Launching it like
> so makes it work, so this probably means that kodi v20, unlike v19, does not
> detect the library properly.
> 
> LD_PRELOAD=/usr/lib/x86_64-linux-gnu/nvidia/libGL.so.1 kodi

That workaround is very helpful for understanding the problem.
Thanks for digging it out.

The 340 legacy driver predates libglvnd and ships a monolithic 
libGL.so.1. With libglvnd libGL.so.1 has been split into libOpenGL.so.0 
and libGLX.so.0, all three are being just dispatch libraries (instead of 
actual implementations) that forward the OpenGL etc. calls to the 
corresponding vendor implementations.
While it worked in the past to replace the system libGL.so.1 (from 
libglvnd) with the nvidia provided one, new application versions may 
have moved on to expect a libglvnd based environment ...

Just checked ... kodi 20 is linked against libGLX.so.0 and libGL.so.1, 
while kodi 19 was only linked against libGL.so.1

Starting kodi 20 with the nvidia legacy 340xx driver installed gets you 
two halves of two different OpenGL implementations: libGLX.so.0 
(libglvnd) which uses the MESA implementation and libGL.so.1 from nvidia 
- of course that mixture does not work. As libGLX.so.0 is a subset of 
libGL.so.1 preloading the nvidia libGL.so.1 gets you lucky here because 
it overrides the symbols from libGLX.so.0 and you are afterwards running 
with only one consistent implementation.
For other applications this does not seem to work since not all 
entrypoints can be redirected to the nvidia libGL.so.1 - perhaps because 
there are some symbols being used that didn't even exist in the old 
days. Could it be that Qt5 now makes use of Wayland, and that does not 
work at all with a legacy libGL.so.1 ?

That seems to be another indicator that the breakage is unrelated to the 
kernel module but that the OpenGL world has moved on, assuming a 
libglvnd based setup.

In bookworm:

# apt-cache rdepends libopengl0 | wc -l
68
# apt-cache rdepends libglx0 | wc -l
43
# apt-cache rdepends libgl1 | wc -l
509
# apt-cache rdepends libwayland-server0 | wc -l
50
# apt-cache rdepends libwayland-client0 | wc -l
153

Btw, kitty uses wayland (but already in bullseye).
And libqt6opengl6 depends on libopengl0 ...

In bullseye:

# apt-cache rdepends libopengl0 | wc -l
39
# apt-cache rdepends libglx0 | wc -l
31
# apt-cache rdepends libgl1 | wc -l
540
# apt-cache rdepends libwayland-server0 | wc -l
39
# apt-cache rdepends libwayland-client0 | wc -l
91

Andreas



More information about the pkg-nvidia-devel mailing list