You are not logged in.

#1 2017-04-11 03:45:10

bensmooth
Member
Registered: 2017-04-11
Posts: 3

NVidia and OpenGL on 340xx drivers - not DRI2 capable?

Hello,

I am currently having some issues with getting 64-bit OpenGL apps to work with my GT218M [NVS 3100M].  I am using the 340xx series of nvidia drivers, as I believe they are the correct ones for my card.  It was working until recently; it probably broke in the past month or so.  I use lxde as my desktop environment, and it is still working fine.

Running glxgears32 does miraculously produce some spinning gears.  Running glxgears produces errors:

[ben@lappy386 ~]$ LIBGL_DEBUG=verbose glxgears
libGL: screen 0 does not appear to be DRI2 capable
libGL: OpenDriver: trying /usr/lib/xorg/modules/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib/xorg/modules/dri/swrast_dri.so
libGL: Can't open configuration file /home/ben/.drirc: No such file or directory.
libGL: Can't open configuration file /home/ben/.drirc: No such file or directory.
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  154 (GLX)
  Minor opcode of failed request:  3 (X_GLXCreateContext)
  Value in failed request:  0x0
  Serial number of failed request:  37
  Current serial number in output stream:  39

Installed packages:
https://pastebin.com/vbyKXH2Y

Packages that may be of note:

lib32-nvidia-340xx-utils 340.102-3
nvidia-340xx 340.102-5
nvidia-340xx-utils 340.102-8
lib32-mesa 17.0.3-1
lib32-mesa-demos 8.3.0-2
mesa 17.0.3-1
mesa-demos 8.3.0-2

Since I have seen similar threads include it, here is my latest Xorg log:
https://pastebin.com/D8jynFhm

I have tried reinstalling the nvidia packages (and then rebooting) like so:
sudo pacman -S lib32-nvidia-340xx-utils nvidia-340xx nvidia-340xx-utils

In my troubleshooting, I noticed that glxgears32 is somehow able to get to the nvidia libs:

ldd /usr/bin/glxgears32
linux-gate.so.1 (0xf779a000)
libGL.so.1 => /usr/lib32/nvidia/libGL.so.1 (0xf763f000)
libm.so.6 => /usr/lib32/libm.so.6 (0xf75e3000)
libX11.so.6 => /usr/lib32/libX11.so.6 (0xf7496000)
libc.so.6 => /usr/lib32/libc.so.6 (0xf72d6000)
libnvidia-tls.so.340.102 => /usr/lib32/nvidia/libnvidia-tls.so.340.102 (0xf72d1000)
libnvidia-glcore.so.340.102 => /usr/lib32/nvidia/libnvidia-glcore.so.340.102 (0xf4d3d000)
libXext.so.6 => /usr/lib32/libXext.so.6 (0xf4d28000)
libdl.so.2 => /usr/lib32/libdl.so.2 (0xf4d23000)
/lib/ld-linux.so.2 (0xf779c000)
libxcb.so.1 => /usr/lib32/libxcb.so.1 (0xf4cf8000)
libXau.so.6 => /usr/lib32/libXau.so.6 (0xf4cf4000)
libXdmcp.so.6 => /usr/lib32/libXdmcp.so.6 (0xf4ceb000)

glxgears is not able to:

ldd /usr/bin/glxgears
linux-vdso.so.1 (0x00007ffc293e7000)
libGL.so.1 => /usr/lib/libGL.so.1 (0x00007f25ae1e4000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007f25aded1000)
libX11.so.6 => /usr/lib/libX11.so.6 (0x00007f25adb92000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007f25ad7ee000)
libGLX.so.0 => /usr/lib/libGLX.so.0 (0x00007f25ad5bc000)
libXext.so.6 => /usr/lib/libXext.so.6 (0x00007f25ad3aa000)
libGLdispatch.so.0 => /usr/lib/libGLdispatch.so.0 (0x00007f25ad0f4000)
libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f25acef0000)
libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f25accd2000)
/lib64/ld-linux-x86-64.so.2 (0x00007f25ae46f000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007f25acaa9000)
libXau.so.6 => /usr/lib/libXau.so.6 (0x00007f25ac8a5000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007f25ac69f000)

I am not sure how this linkage happens, so I am unsure of what to do next.  Does anyone have any suggestions?

Thanks,
Ben

Offline

#2 2017-04-11 05:01:20

tom.ty89
Member
Registered: 2012-11-15
Posts: 897

Re: NVidia and OpenGL on 340xx drivers - not DRI2 capable?

$ pacman -Qo /usr/lib/libGL.so.1

I think you have libglvnd installed. Not sure about how this will go but at least currently, it seems like the older branches of nvidia drivers are not supported, since their utils packages are libgl providers.

If the command returns libglvnd, then you may want to remove the package and see:

# pacman -Rs libglvnd

Edit: Since libglvnd is pulled my mesa and mesa is pulled by things like gtk3, so you may not really be able to remove it. Though if you don't mind uninstalling a bunch of things to test, you can:

# pacman -Rcs libglvnd

Or, there is also lib32-libglvnd. Maybe you can install that and see if glxgears32 get any hiccup instead.

Last edited by tom.ty89 (2017-04-11 05:12:12)

Offline

#3 2017-04-12 01:52:20

bensmooth
Member
Registered: 2017-04-11
Posts: 3

Re: NVidia and OpenGL on 340xx drivers - not DRI2 capable?

Looks like I do have it installed:

pacman -Qo /usr/lib/libGL.so.1
/usr/lib/libGL.so.1 is owned by libglvnd 0.2.999+g4ba53457-2

I also already had the 32-bit version installed:

pacman -Qo /usr/lib32/libGL.so.1
/usr/lib32/libGL.so.1 is owned by lib32-libglvnd 0.2.999+g4ba53457-2

glxgears32 still happily chugs along somehow.

I did find these:
https://devtalk.nvidia.com/default/topi … t/5107104/
https://lists.archlinux.org/pipermail/a … 28695.html
Seems like I may be SOL...short of trying to run Nouveau instead.

Edit:
The mailing list says:
"Nvidia-340xx driver will still work with bumblebee but will need a specific (non libglvnd?) Mesa version."
Any ideas on that? 

Don't think I'm too comfortable with removing libglvnd either:

checking dependencies...
:: apr-util optionally requires unixodbc: enable odbc support
:: avahi optionally requires gtk3: avahi-discover-standalone, bshell, bssh, bvnc
:: gtk2 optionally requires adwaita-icon-theme: Default icon theme
:: lib32-sdl optionally requires lib32-alsa-lib: ALSA audio driver
:: lib32-sdl2 optionally requires lib32-alsa-lib: ALSA audio driver
:: libcanberra optionally requires libcanberra-pulse: PulseAudio driver
:: libproxy optionally requires webkit2gtk: PAC proxy support
:: libreoffice-still optionally requires unixodbc: adds ODBC database support
:: libreoffice-still optionally requires gtk3: for GTK3 integration
:: pcmanfm optionally requires gvfs: for trash support, mounting with udisks and remote filesystems
:: pinentry optionally requires gcr: gnome3 backend
:: qt4 optionally requires unixodbc: ODBC driver
:: qt5-base optionally requires unixodbc: ODBC driver
:: qt5-base optionally requires gtk3: GTK platform plugin
:: wine optionally requires lib32-libldap
:: wine optionally requires lib32-gnutls
:: wine optionally requires alsa-plugins
:: wine optionally requires lib32-alsa-plugins
:: wine optionally requires lib32-alsa-lib
:: wine optionally requires lib32-libxcomposite
:: wine optionally requires lib32-libxinerama
warning: dependency cycle detected:
warning: mesa will be removed after its libglvnd dependency
warning: dependency cycle detected:
warning: lib32-mesa will be removed after its lib32-libglvnd dependency

Packages (111) adwaita-icon-theme-3.22.0+1+g58cd459e-1  alsa-plugins-1.1.1-1  art-sharp-2.24.2-4
               at-spi2-atk-2.22.0-1  at-spi2-core-2.22.0-1  eclipse-common-4.6.2-2  eclipse-java-4.6.2-2
               firefox-52.0.2-1  galculator-2.1.4-3  gconf-sharp-2.24.2-5  gconf-sharp-peditors-2.24.2-4
               gcr-3.20.0+11+g8322f27-1  gedit-3.22.0+4+g2c70ccb86-1  gnome-disk-utility-3.22.1-1
               gnome-mime-data-2.18.0-7  gnome-screenshot-3.22.0+1+g7568f0e-1  gnome-sharp-2.24.2-4
               gnome-vfs-2.24.4-10  gnome-vfs-sharp-2.24.2-4  gspell-1.2.1-1  gtk3-3.22.10-1  gtkmm3-3.22.0-1
               gtksourceview3-3.22.2-1  gvfs-1.30.3-1  gvfs-smb-1.30.3-1  jdk8-openjdk-8.u121-1
               lib32-alsa-lib-1.1.3-1  lib32-alsa-plugins-1.1.1-1  lib32-atk-2.22+1+gd57f97d-1  lib32-cairo-1.14.6-2
               lib32-curl-7.52.1-1  lib32-e2fsprogs-1.43.4-1  lib32-flashplugin-25.0.0.148-1
               lib32-gdk-pixbuf2-2.36.2-2  lib32-gmp-6.1.1-1  lib32-gnutls-3.4.15-1  lib32-gtk2-2.24.30-1
               lib32-keyutils-1.5.9-1  lib32-krb5-1.13.7-1  lib32-libcroco-0.6.11-1  lib32-libcups-2.2.1-1
               lib32-libdatrie-0.2.10-1  lib32-libdrm-2.4.77-1  lib32-libglvnd-0.2.999+g4ba53457-2
               lib32-libidn-1.33-1  lib32-libldap-2.4.44-1  lib32-libpciaccess-0.13.4-1  lib32-libpsl-0.17.0-1
               lib32-librsvg-2.40.16-1  lib32-libssh2-1.8.0-1  lib32-libtasn1-4.10-1  lib32-libthai-0.1.26-1
               lib32-libtxc_dxtn-1.0.1-5  lib32-libxcomposite-0.4.4-2  lib32-libxft-2.3.2-1
               lib32-libxinerama-1.1.3-1  lib32-libxshmfence-1.2-1  lib32-libxss-1.2.2-2  lib32-libxxf86vm-1.1.4-1
               lib32-llvm-libs-3.9.1-2  lib32-mesa-17.0.3-1  lib32-nettle-3.3-1  lib32-nspr-4.13-1
               lib32-nss-3.27.1-1  lib32-openssl-1:1.0.2.k-1  lib32-p11-kit-0.23.2-1  lib32-pango-1.40.3-1
               lib32-pixman-0.34.0-1  lib32-sqlite-3.17.0-1  lib32-wayland-1.13.0-1  libart-lgpl-2.3.21-3
               libbonobo-2.32.1-4  libbonoboui-2.24.5-3  libcanberra-pulse-0.30-8  libgnome-2.32.1-6
               libgnome-data-2.32.1-6  libgnome-sharp-2.24.2-4  libgnomecanvas-2.30.3-3  libgnomeui-2.24.5-2
               libidl2-0.8.14-4  libiodbc-3.52.10-1  libomxil-bellagio-0.9.3-1  libpeas-1.20.0-2
               libpwquality-1.3.0-2  libtxc_dxtn-1.0.1-6  meld-3.16.4-1  mesa-17.0.3-1  mime-types-9-1
               mysql-workbench-6.3.9-3  nspluginwrapper-1.4.4-3  orbit2-2.14.19-3  pavucontrol-3.0-4  pcre2-10.22-2
               pygobject-devel-3.22.0-2  python-gobject-3.22.0-2  python2-gobject-3.22.0-2  remmina-1:1.2.0rcgit.18-1
               steam-1.0.0.54-1  unixodbc-2.3.4-2  vte3-0.46.1-1  wayland-protocols-1.7-1  webkit2gtk-2.14.5-1
               webkitgtk-2.4.11-4  wireshark-cli-2.2.5-1  wireshark-common-2.2.5-1  wireshark-gtk-2.2.5-1
               xf86-video-ati-1:7.9.0-1  xf86-video-intel-1:2.99.917+770+gcb6ba2da-1  xf86-video-vmware-13.2.1-2
               zenity-3.22.0+1+gcd1647c-1  libglvnd-0.2.999+g4ba53457-2

Total Removed Size:  1069.51 MiB

Last edited by bensmooth (2017-04-12 02:01:24)

Offline

#4 2017-04-12 02:40:15

tom.ty89
Member
Registered: 2012-11-15
Posts: 897

Re: NVidia and OpenGL on 340xx drivers - not DRI2 capable?

Unfortunately I don't have a hardware that uses the 340xx branch of nvidia so I can't help testing. The most direct way to confirm the issue is probably a small installation with and without libglvnd installed (with a simple wm or so you should be able to avoid mesa).

You can also forcefully uninstall libglvnd for testing:

pacman -Rdd libglvnd

Take your own risk though.

I am not sure if it's really necessary for mesa to pull libglvnd (which actually creates a cycled dependency). Maybe you should file a bug report on this.

Offline

#5 2017-04-12 03:02:38

bensmooth
Member
Registered: 2017-04-11
Posts: 3

Re: NVidia and OpenGL on 340xx drivers - not DRI2 capable?

Interesting...

Found a workaround:
https://forum.manjaro.org/t/workaround- … de/21001/2
https://forum.manjaro.org/t/problem-lib … ound/21164

Apparently, $LD_LIBRARY_PATH was getting set by one of the gnustep packages, and was fracking up the works. 

Unsetting it like so

unset LD_LIBRARY_PATH

allowed glxgears to run.

I uninstalled these packages since they were the ones depending on gnustep-make:
gnustep-back gnustep-base gnustep-gui gnustep-make oolite

Rebooted, and everything seems to be working!

Seems like the package that is breaking things probably shouldn't be doing what it is doing.

Offline

#6 2017-04-12 13:05:36

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: NVidia and OpenGL on 340xx drivers - not DRI2 capable?

gnustep does indeed change LD_LIBRARY_PATH , but it doesn't add /usr/lib to it .

I'm 99% sure somewhere before gnustep adds that lib location to LD_LIBRARY_PATH , it is set to /usr/lib by something else.
If that's true, the error is in nvidia package that doesn't honor LD_LIBRARY_PATH .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#7 2017-04-12 13:28:10

tom.ty89
Member
Registered: 2012-11-15
Posts: 897

Re: NVidia and OpenGL on 340xx drivers - not DRI2 capable?

It does add /usr/lib? The script in /etc/profile.d makes use of another script (/usr/share/GNUstep/Makefiles/print_unique_pathlist.sh) to form the final LD_LIBRARY_PATH. Apparently it takes mainly four variables and dedup. When I add a similar line in the profile.d script but with echo, I can see three of them are /usr/lib. In my environment, LD_LIBRARY_PATH does not exist as an env var before gnustep-make is installed.

I wonder why having /usr/lib in LD_LIBRARY_PATH can cause issue though, or in other word, why programs know to look into /usr/lib/nvidia before it is set but not after. Never knew about how these things work exactly though.

Offline

#8 2017-12-08 05:27:56

triplc
Member
From: Hanoi, Vietnam
Registered: 2009-08-23
Posts: 39

Re: NVidia and OpenGL on 340xx drivers - not DRI2 capable?

LD_PRELOAD=/usr/lib/libGL.so glxgears

works for me. In my computer $LD_LIBRARY_PATH is empty, so the workaround "unset LD_LIBRARY_PATH" does not work. I have the legacy 340xx nivdia,

Last edited by triplc (2017-12-08 05:29:04)

Offline

Board footer

Powered by FluxBB