nvidia glvnd and update-alternatives

Everything about X, Gnome, KDE, ... and everything running on it

nvidia glvnd and update-alternatives

Postby jpl » 2018-09-28 02:28

I run testing and recently have found myself reinstalling the nvidia drivers (390.87-2) from scratch due to a failed upgrade. However even after a fresh install the alternatives system points all the glx libraries to mesa instead of the vendor libs. This is on a desktop with a GTX 1060.

This is what my alternatives looks like after a `sudo apt-get install nvidia-driver`. Note that the /usr/lib/nvidia targets are pointing to mesa!
Code: Select all
$ update-alternatives --query glx
Name: glx
Link: /usr/lib/glx
Slaves:
 glx--libEGL.so.1-i386-linux-gnu /usr/lib/i386-linux-gnu/libEGL.so.1
 glx--libEGL.so.1-x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/libEGL.so.1
 glx--libGL.so.1-i386-linux-gnu /usr/lib/i386-linux-gnu/libGL.so.1
 glx--libGL.so.1-x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/libGL.so.1
 glx--libGLESv1_CM.so.1-x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/libGLESv1_CM.so.1
 glx--libGLESv2.so.2-i386-linux-gnu /usr/lib/i386-linux-gnu/libGLESv2.so.2
 glx--libGLESv2.so.2-x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/libGLESv2.so.2
 glx--libGLX_indirect.so.0-i386-linux-gnu /usr/lib/i386-linux-gnu/libGLX_indirect.so.0
 glx--libGLX_indirect.so.0-x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/libGLX_indirect.so.0
 glx--libnvidia-cfg.so.1-i386-linux-gnu /usr/lib/i386-linux-gnu/libnvidia-cfg.so.1
 glx--libnvidia-cfg.so.1-x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/libnvidia-cfg.so.1
 glx--linux-libglx.so /usr/lib/xorg/modules/linux/libglx.so
 glx--nvidia-blacklists-nouveau.conf /etc/modprobe.d/nvidia-blacklists-nouveau.conf
 glx--nvidia-bug-report.sh /usr/bin/nvidia-bug-report.sh
 glx--nvidia-drm-outputclass.conf /usr/share/X11/xorg.conf.d/nvidia-drm-outputclass.conf
 glx--nvidia-load.conf /etc/modules-load.d/nvidia.conf
 glx--nvidia-modprobe.conf /etc/modprobe.d/nvidia.conf
 glx--nvidia_drv.so /usr/lib/xorg/modules/drivers/nvidia_drv.so
Status: manual
Best: /usr/lib/nvidia
Value: /usr/lib/nvidia

Alternative: /usr/lib/mesa-diverted
Priority: 5
Slaves:
 glx--libEGL.so.1-i386-linux-gnu /usr/lib/mesa-diverted/i386-linux-gnu/libEGL.so.1
 glx--libEGL.so.1-x86_64-linux-gnu /usr/lib/mesa-diverted/x86_64-linux-gnu/libEGL.so.1
 glx--libGL.so.1-i386-linux-gnu /usr/lib/mesa-diverted/i386-linux-gnu/libGL.so.1
 glx--libGL.so.1-x86_64-linux-gnu /usr/lib/mesa-diverted/x86_64-linux-gnu/libGL.so.1
 glx--libGLESv1_CM.so.1-x86_64-linux-gnu /usr/lib/mesa-diverted/x86_64-linux-gnu/libGLESv1_CM.so.1
 glx--libGLESv2.so.2-i386-linux-gnu /usr/lib/mesa-diverted/i386-linux-gnu/libGLESv2.so.2
 glx--libGLESv2.so.2-x86_64-linux-gnu /usr/lib/mesa-diverted/x86_64-linux-gnu/libGLESv2.so.2
 glx--libGLX_indirect.so.0-i386-linux-gnu /usr/lib/i386-linux-gnu/libGLX_mesa.so.0
 glx--libGLX_indirect.so.0-x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/libGLX_mesa.so.0

Alternative: /usr/lib/nvidia
Priority: 100
Slaves:
 glx--libEGL.so.1-i386-linux-gnu /usr/lib/mesa-diverted/i386-linux-gnu/libEGL.so.1
 glx--libEGL.so.1-x86_64-linux-gnu /usr/lib/mesa-diverted/x86_64-linux-gnu/libEGL.so.1
 glx--libGL.so.1-i386-linux-gnu /usr/lib/mesa-diverted/i386-linux-gnu/libGL.so.1
 glx--libGL.so.1-x86_64-linux-gnu /usr/lib/mesa-diverted/x86_64-linux-gnu/libGL.so.1
 glx--libGLESv1_CM.so.1-x86_64-linux-gnu /usr/lib/mesa-diverted/x86_64-linux-gnu/libGLESv1_CM.so.1
 glx--libGLESv2.so.2-i386-linux-gnu /usr/lib/mesa-diverted/i386-linux-gnu/libGLESv2.so.2
 glx--libGLESv2.so.2-x86_64-linux-gnu /usr/lib/mesa-diverted/x86_64-linux-gnu/libGLESv2.so.2
 glx--libGLX_indirect.so.0-i386-linux-gnu /usr/lib/i386-linux-gnu/libGLX_nvidia.so.0
 glx--libGLX_indirect.so.0-x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/libGLX_nvidia.so.0
 glx--libnvidia-cfg.so.1-i386-linux-gnu /usr/lib/i386-linux-gnu/nvidia/libnvidia-cfg.so.1
 glx--libnvidia-cfg.so.1-x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/nvidia/libnvidia-cfg.so.1
 glx--linux-libglx.so /usr/lib/nvidia/libglx.so
 glx--nvidia-blacklists-nouveau.conf /etc/nvidia/nvidia-blacklists-nouveau.conf
 glx--nvidia-bug-report.sh /usr/lib/nvidia/nvidia-bug-report.sh
 glx--nvidia-drm-outputclass.conf /etc/nvidia/nvidia-drm-outputclass.conf
 glx--nvidia-load.conf /etc/nvidia/nvidia-load.conf
 glx--nvidia-modprobe.conf /etc/nvidia/nvidia-modprobe.conf
 glx--nvidia_drv.so /usr/lib/nvidia/nvidia_drv.so

Alternative: /usr/lib/nvidia/bumblebee
Priority: 95
Slaves:
 glx--libEGL.so.1-i386-linux-gnu /usr/lib/mesa-diverted/i386-linux-gnu/libEGL.so.1
 glx--libEGL.so.1-x86_64-linux-gnu /usr/lib/mesa-diverted/x86_64-linux-gnu/libEGL.so.1
 glx--libGL.so.1-i386-linux-gnu /usr/lib/mesa-diverted/i386-linux-gnu/libGL.so.1
 glx--libGL.so.1-x86_64-linux-gnu /usr/lib/mesa-diverted/x86_64-linux-gnu/libGL.so.1
 glx--libGLESv1_CM.so.1-x86_64-linux-gnu /usr/lib/mesa-diverted/x86_64-linux-gnu/libGLESv1_CM.so.1
 glx--libGLESv2.so.2-i386-linux-gnu /usr/lib/mesa-diverted/i386-linux-gnu/libGLESv2.so.2
 glx--libGLESv2.so.2-x86_64-linux-gnu /usr/lib/mesa-diverted/x86_64-linux-gnu/libGLESv2.so.2
 glx--libGLX_indirect.so.0-i386-linux-gnu /usr/lib/i386-linux-gnu/libGLX_mesa.so.0
 glx--libGLX_indirect.so.0-x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/libGLX_mesa.so.0
 glx--libnvidia-cfg.so.1-i386-linux-gnu /usr/lib/i386-linux-gnu/nvidia/libnvidia-cfg.so.1
 glx--libnvidia-cfg.so.1-x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/nvidia/libnvidia-cfg.so.1
 glx--nvidia-blacklists-nouveau.conf /etc/nvidia/nvidia-blacklists-nouveau.conf
 glx--nvidia-bug-report.sh /usr/lib/nvidia/nvidia-bug-report.sh


After tearing into this for a while it seems that the default installation gives the GLVND version of the nvidia libs, which don't provide libEGL.so.1 or libGL.so.1, instead having libEGL.so.0 and libGL.so.0. There was a package called libegl1-glvnd-nvidia which provided libEGL.so.1 but it is now only in the -legacy driver. I worked around this by installing the nonglvnd libs, which fixed the targets for GL and EGL but the GLES libraries still point to mesa. I can manually hack on /var/lib/dpkg/alternatives/glx to point to the correct libs but that seems brittle.

I also had a problem with X trying to load GLX from /usr/lib/xorg/modules/extensions/libglx.so
which I worked around by replacing that file with a symlink to the nvidia lib in /usr/lib/nvidia/current/libglx.so
This also seems bad but I am not sure how it's supposed to work and at least I have a desktop again.

Here's all the nvidia-related packages I currently have
Code: Select all
$ dpkg-query -l "*nvidia*"
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                       Version            Architecture       Description
+++-==========================-==================-==================-=========================================================
un  bumblebee-nvidia           <none>             <none>             (no description available)
ii  glx-alternative-nvidia     0.8.8              amd64              allows the selection of NVIDIA as GLX provider
un  libegl-nvidia-legacy-390xx <none>             <none>             (no description available)
ii  libegl-nvidia0:amd64       390.87-2           amd64              NVIDIA binary EGL library
ii  libegl-nvidia0:i386        390.87-2           i386               NVIDIA binary EGL library
un  libegl1-glvnd-nvidia       <none>             <none>             (no description available)
ii  libegl1-nvidia:amd64       390.87-2           amd64              NVIDIA binary EGL library (non-GLVND variant)
ii  libegl1-nvidia:i386        390.87-2           i386               NVIDIA binary EGL library (non-GLVND variant)
un  libgl1-glvnd-nvidia-glx    <none>             <none>             (no description available)
un  libgl1-nvidia-glvnd-glx    <none>             <none>             (no description available)
ii  libgl1-nvidia-glx:amd64    390.87-2           amd64              NVIDIA binary OpenGL/GLX library (non-GLVND variant)
ii  libgl1-nvidia-glx:i386     390.87-2           i386               NVIDIA binary OpenGL/GLX library (non-GLVND variant)
un  libgl1-nvidia-glx-390.87   <none>             <none>             (no description available)
un  libgl1-nvidia-glx-any      <none>             <none>             (no description available)
un  libgl1-nvidia-glx-i386     <none>             <none>             (no description available)
un  libgl1-nvidia-legacy-390xx <none>             <none>             (no description available)
un  libgldispatch0-nvidia      <none>             <none>             (no description available)
ii  libgles-nvidia1:amd64      390.87-2           amd64              NVIDIA binary OpenGL|ES 1.x library
ii  libgles-nvidia1:i386       390.87-2           i386               NVIDIA binary OpenGL|ES 1.x library
ii  libgles-nvidia2:amd64      390.87-2           amd64              NVIDIA binary OpenGL|ES 2.x library
ii  libgles-nvidia2:i386       390.87-2           i386               NVIDIA binary OpenGL|ES 2.x library
un  libgles2-glvnd-nvidia      <none>             <none>             (no description available)
un  libglvnd0-nvidia           <none>             <none>             (no description available)
ii  libglx-nvidia0:amd64       390.87-2           amd64              NVIDIA binary GLX library
ii  libglx-nvidia0:i386        390.87-2           i386               NVIDIA binary GLX library
un  libglx0-glvnd-nvidia       <none>             <none>             (no description available)
ii  libnvidia-cfg1:amd64       390.87-2           amd64              NVIDIA binary OpenGL/GLX configuration library
ii  libnvidia-cfg1:i386        390.87-2           i386               NVIDIA binary OpenGL/GLX configuration library
un  libnvidia-cfg1-any         <none>             <none>             (no description available)
un  libnvidia-egl-wayland      <none>             <none>             (no description available)
ii  libnvidia-egl-wayland1:amd 390.87-2           amd64              NVIDIA binary Wayland EGL external platform library
ii  libnvidia-egl-wayland1:i38 390.87-2           i386               NVIDIA binary Wayland EGL external platform library
ii  libnvidia-eglcore:amd64    390.87-2           amd64              NVIDIA binary EGL core libraries
ii  libnvidia-eglcore:i386     390.87-2           i386               NVIDIA binary EGL core libraries
un  libnvidia-eglcore-390.87   <none>             <none>             (no description available)
un  libnvidia-encode1          <none>             <none>             (no description available)
un  libnvidia-fbc1             <none>             <none>             (no description available)
ii  libnvidia-glcore:amd64     390.87-2           amd64              NVIDIA binary OpenGL/GLX core libraries
ii  libnvidia-glcore:i386      390.87-2           i386               NVIDIA binary OpenGL/GLX core libraries
un  libnvidia-glcore-390.87    <none>             <none>             (no description available)
un  libnvidia-ifr1             <none>             <none>             (no description available)
un  libnvidia-legacy-390xx-egl <none>             <none>             (no description available)
ii  libnvidia-ml1:amd64        390.87-2           amd64              NVIDIA Management Library (NVML) runtime library
un  libopengl0-glvnd-nvidia    <none>             <none>             (no description available)
ii  nvidia-alternative         390.87-2           amd64              allows the selection of NVIDIA as GLX provider
un  nvidia-alternative--kmod-a <none>             <none>             (no description available)
un  nvidia-alternative-legacy- <none>             <none>             (no description available)
un  nvidia-alternative-legacy- <none>             <none>             (no description available)
un  nvidia-alternative-legacy- <none>             <none>             (no description available)
un  nvidia-current             <none>             <none>             (no description available)
un  nvidia-current-updates     <none>             <none>             (no description available)
ii  nvidia-driver              390.87-2           amd64              NVIDIA metapackage
ii  nvidia-driver-bin          390.87-2           amd64              NVIDIA driver support binaries
un  nvidia-driver-bin-390.87   <none>             <none>             (no description available)
un  nvidia-driver-binary       <none>             <none>             (no description available)
un  nvidia-driver-libs         <none>             <none>             (no description available)
un  nvidia-driver-libs-i386    <none>             <none>             (no description available)
ii  nvidia-driver-libs-nonglvn 390.87-2           amd64              NVIDIA metapackage (non-GLVND OpenGL/GLX/EGL/GLES librari
ii  nvidia-driver-libs-nonglvn 390.87-2           i386               NVIDIA metapackage (non-GLVND OpenGL/GLX/EGL/GLES librari
ii  nvidia-driver-libs-nonglvn 390.87-2           i386               NVIDIA metapackage (non-GLVND OpenGL/EGL/etc. 32-bit libr
ii  nvidia-egl-common          390.87-2           amd64              NVIDIA binary EGL driver - common files
ii  nvidia-egl-icd:amd64       390.87-2           amd64              NVIDIA EGL installable client driver (ICD)
ii  nvidia-egl-icd:i386        390.87-2           i386               NVIDIA EGL installable client driver (ICD)
ii  nvidia-egl-wayland-common  390.87-2           amd64              NVIDIA binary Wayland EGL external platform - common file
ii  nvidia-egl-wayland-icd:amd 390.87-2           amd64              NVIDIA Wayland EGL external platform library (ICD)
ii  nvidia-egl-wayland-icd:i38 390.87-2           i386               NVIDIA Wayland EGL external platform library (ICD)
un  nvidia-glx                 <none>             <none>             (no description available)
un  nvidia-glx-any             <none>             <none>             (no description available)
ii  nvidia-installer-cleanup   20151021+8         amd64              cleanup after driver installation with the nvidia-install
un  nvidia-kernel-390.87       <none>             <none>             (no description available)
ii  nvidia-kernel-common       20151021+8         amd64              NVIDIA binary kernel module support files
ii  nvidia-kernel-dkms         390.87-2           amd64              NVIDIA binary kernel module DKMS source
un  nvidia-kernel-source       <none>             <none>             (no description available)
ii  nvidia-kernel-support      390.87-2           amd64              NVIDIA binary kernel module support files
un  nvidia-kernel-support--v1  <none>             <none>             (no description available)
un  nvidia-kernel-support-any  <none>             <none>             (no description available)
un  nvidia-legacy-304xx-altern <none>             <none>             (no description available)
un  nvidia-legacy-340xx-altern <none>             <none>             (no description available)
un  nvidia-legacy-390xx-nonglv <none>             <none>             (no description available)
ii  nvidia-legacy-check        390.87-2           amd64              check for NVIDIA GPUs requiring a legacy driver
un  nvidia-libopencl1          <none>             <none>             (no description available)
un  nvidia-libopencl1-dev      <none>             <none>             (no description available)
un  nvidia-libvdpau1           <none>             <none>             (no description available)
ii  nvidia-modprobe            390.25-1           amd64              utility to load NVIDIA kernel modules and create device n
ii  nvidia-nonglvnd-vulkan-com 390.87-2           amd64              NVIDIA Vulkan driver - common files (non-GLVND variant)
ii  nvidia-nonglvnd-vulkan-icd 390.87-2           amd64              NVIDIA Vulkan ICD (non-GLVND variant)
ii  nvidia-nonglvnd-vulkan-icd 390.87-2           i386               NVIDIA Vulkan ICD (non-GLVND variant)
un  nvidia-opencl-icd          <none>             <none>             (no description available)
ii  nvidia-persistenced        390.25-1           amd64              daemon to maintain persistent software state in the NVIDI
ii  nvidia-settings            390.67-1           amd64              tool for configuring the NVIDIA graphics driver
un  nvidia-settings-gtk-390.67 <none>             <none>             (no description available)
un  nvidia-smi                 <none>             <none>             (no description available)
ii  nvidia-support             20151021+8         amd64              NVIDIA binary graphics driver support files
un  nvidia-va-driver           <none>             <none>             (no description available)
ii  nvidia-vdpau-driver:amd64  390.87-2           amd64              Video Decode and Presentation API for Unix - NVIDIA drive
un  nvidia-vulkan-common       <none>             <none>             (no description available)
un  nvidia-vulkan-icd          <none>             <none>             (no description available)
ii  xserver-xorg-video-nvidia  390.87-2           amd64              NVIDIA binary Xorg driver
un  xserver-xorg-video-nvidia- <none>             <none>             (no description available)


Is this a bug in glx-alternative-nvidia? Am I doing something really boneheaded? Any help would be appreciated.
jpl
 
Posts: 6
Joined: 2011-08-25 14:49

Return to Desktop & Multimedia

Who is online

Users browsing this forum: No registered users and 5 guests

fashionable