Nvidia FX 5200 OpenGL problems with game demo
by Jesse Guardiani · in Torque Game Engine · 11/14/2004 (6:22 pm) · 39 replies
Howdy,
I am a registered user, but I haven't downloaded and *built* Torque on Linux yet. (I built it on Win32 a while back and just haven't gotten around to it on Linux yet.)
With my old i810 graphics chipset under Linux with a 2.6 kernel, I experienced terrain discoloration and too-slow gameplay with the Torque Demo binary. So, since I prefer Gentoo Linux for game development over Win32, I bought a GeForce FX 5200 128MB, installed nvidia-kernel module and nvidia-glx, and switched my OpenGL implementation to 'nvidia' with 'opengl-update nvidia'.
Unfortunately, when I start the Torque Demo binary, I get a popup stating: "Unable to initialize OpenGL. (Error: Could not load OpenGL library)".
Any ideas?
I am a registered user, but I haven't downloaded and *built* Torque on Linux yet. (I built it on Win32 a while back and just haven't gotten around to it on Linux yet.)
With my old i810 graphics chipset under Linux with a 2.6 kernel, I experienced terrain discoloration and too-slow gameplay with the Torque Demo binary. So, since I prefer Gentoo Linux for game development over Win32, I bought a GeForce FX 5200 128MB, installed nvidia-kernel module and nvidia-glx, and switched my OpenGL implementation to 'nvidia' with 'opengl-update nvidia'.
Unfortunately, when I start the Torque Demo binary, I get a popup stating: "Unable to initialize OpenGL. (Error: Could not load OpenGL library)".
Any ideas?
#22
11/19/2004 (2:54 am)
Actually i was wrong it comes right after the SDL_GL_Loadlibrary call, when it tries to find what extensions are available. It dies right about that point but due to some heavy macro'ing in that region of code its a bit hard to find out what is really happening without some code changes.
#23
On my gentoo box (2004.2)
/usr/lib:
-rw-r--r-- 1 root root 739 Sep 29 18:59 libGL.la
lrwxr-xr-x 1 root root 44 Sep 29 18:59 libGL.so -> /usr/lib/opengl/nvidia/lib/libGL.so.1.0.6111
lrwxr-xr-x 1 root root 44 Sep 29 18:59 libGL.so.1 -> /usr/lib/opengl/nvidia/lib/libGL.so.1.0.6111
-rw-r--r-- 1 root root 2008020 Sep 23 20:31 libGLU.a
-rw-r--r-- 1 root root 769 Sep 23 20:31 libGLU.la
lrwxrwxrwx 1 root root 13 Sep 23 20:32 libGLU.so -> libGLU.so.1.3
lrwxrwxrwx 1 root root 13 Sep 23 20:32 libGLU.so.1 -> libGLU.so.1.3
-rwxr-xr-x 1 root root 1644926 Sep 23 20:31 libGLU.so.1.3
lrwxr-xr-x 1 root root 48 Sep 29 18:59 libGLcore.so -> /usr/lib/opengl/nvidia/lib/libGLcore.so.1.0.6111
lrwxr-xr-x 1 root root 48 Sep 29 18:59 libGLcore.so.1 -> /usr/lib/opengl/nvidia/lib/libGLcore.so.1.0.6111
The other piece:
/etc/ld.so.conf
# ld.so.conf autogenerated by env-update; make all changes to
# contents of /etc/env.d directory
/usr/local/lib
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.4.2
/opt/intel/compiler70/ia32/lib
/usr/lib/opengl/nvidia/lib
/usr/lib/mozilla
/usr/X11R6/lib
/opt/sun-jdk-1.4.2.05/jre/lib
/usr/qt/3/lib
/usr/kde/3.3/lib
/usr/lib/speech-tools/lib
/usr/games/lib
/usr/glibc-2.3.4/lib
/usr/lib/libstdc++-v3/
Torque works just fine here.
11/23/2004 (9:43 am)
@BenOn my gentoo box (2004.2)
/usr/lib:
-rw-r--r-- 1 root root 739 Sep 29 18:59 libGL.la
lrwxr-xr-x 1 root root 44 Sep 29 18:59 libGL.so -> /usr/lib/opengl/nvidia/lib/libGL.so.1.0.6111
lrwxr-xr-x 1 root root 44 Sep 29 18:59 libGL.so.1 -> /usr/lib/opengl/nvidia/lib/libGL.so.1.0.6111
-rw-r--r-- 1 root root 2008020 Sep 23 20:31 libGLU.a
-rw-r--r-- 1 root root 769 Sep 23 20:31 libGLU.la
lrwxrwxrwx 1 root root 13 Sep 23 20:32 libGLU.so -> libGLU.so.1.3
lrwxrwxrwx 1 root root 13 Sep 23 20:32 libGLU.so.1 -> libGLU.so.1.3
-rwxr-xr-x 1 root root 1644926 Sep 23 20:31 libGLU.so.1.3
lrwxr-xr-x 1 root root 48 Sep 29 18:59 libGLcore.so -> /usr/lib/opengl/nvidia/lib/libGLcore.so.1.0.6111
lrwxr-xr-x 1 root root 48 Sep 29 18:59 libGLcore.so.1 -> /usr/lib/opengl/nvidia/lib/libGLcore.so.1.0.6111
The other piece:
/etc/ld.so.conf
# ld.so.conf autogenerated by env-update; make all changes to
# contents of /etc/env.d directory
/usr/local/lib
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.4.2
/opt/intel/compiler70/ia32/lib
/usr/lib/opengl/nvidia/lib
/usr/lib/mozilla
/usr/X11R6/lib
/opt/sun-jdk-1.4.2.05/jre/lib
/usr/qt/3/lib
/usr/kde/3.3/lib
/usr/lib/speech-tools/lib
/usr/games/lib
/usr/glibc-2.3.4/lib
/usr/lib/libstdc++-v3/
Torque works just fine here.
#24
11/23/2004 (9:49 am)
Sorry haven't the time to finish looking into this. Between work and catching a cold ... bleah!
#25
11/24/2004 (8:57 am)
Have you tried the newest driver 6629 (i beleive)? Also have you tried running a precompiled version from one of the demos (something like thinktanks for example)?
#26
11/24/2004 (9:01 am)
If you look at the software environment I posted, you'll see that it is 6629. My problem is specifically with the precompiled Torque Demo. I haven't tried compiling it from scratch yet, but Ben says that he has, and gets the same error.
#27
I get that here on a Matrox Parhelia under Linux in the GL_FUNCTION macros where something wierd is going on, (related files x86UNIXGL.cc and platformGL.h) see bindGLFunctions() is where it breaks for me. Most likely something wrong with GetProcAddress.
11/24/2004 (9:48 am)
Sorry Jesse i was looking at Gregory's post when i posted that last one. I get that here on a Matrox Parhelia under Linux in the GL_FUNCTION macros where something wierd is going on, (related files x86UNIXGL.cc and platformGL.h) see bindGLFunctions() is where it breaks for me. Most likely something wrong with GetProcAddress.
#28
I had a colleague using gentoo who had a similar issue and mentioned that removing the /usr/lib/opengl or editing ld.so.conf to override the current lib paths fixed his issue when forcing it to use the path pointing to where the real libGL.* files were.
12/09/2004 (10:22 am)
I found my problem on my Mandrake system. When the file libGLwrapper.so.whatever exists in /usr/X11R6/lib and you run ldconfig, the symlink file libGL.so.1 (symlink) gets recreated pointing to that specific file. Removing the file libGLwrapper file fixed my issue.I had a colleague using gentoo who had a similar issue and mentioned that removing the /usr/lib/opengl or editing ld.so.conf to override the current lib paths fixed his issue when forcing it to use the path pointing to where the real libGL.* files were.
#29
[0:52]jesse@isaac:[/etc]# locate GL | grep -i wrapper
Exit 1
[0:53]jesse@isaac:[/etc]# locate wrapper | grep -i gl
Exit 1
Admittedly, my /usr/X11R6/lib/libGL.so.1 was pointing to the Mesa libs, and not the nvidia libs, but changing that doesn't seem to help, even after an 'ldconfig'.
[0:54]jesse@isaac:[/etc]# cat ld.so.conf
# ld.so.conf autogenerated by env-update; make all changes to
# contents of /etc/env.d directory
/usr/local/lib
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4
/usr/lib/opengl/nvidia/lib
/usr/lib/MozillaFirefox
/usr/lib/mozilla
/usr/X11R6/lib64
/usr/X11R6/lib
/opt/blackdown-jdk-1.4.2.01/jre/lib/i386/
/opt/blackdown-jdk-1.4.2.01/jre/lib/i386/native_threads/
/opt/blackdown-jdk-1.4.2.01/jre/lib/i386/classic/
/usr/qt/3/lib
/usr/kde/3.3/lib
/usr/kde/3.2/lib
/usr/lib/nspr
/usr/lib/nss
/usr/NX/lib
/usr/lib/speech-tools/lib
/usr/games/lib
/usr/lib/fltk-1.1
Commenting out either the nvidia line or the X11R6/lib line doesn't help in ld.so.conf, even after an 'ldconfig'.
Any further ideas? This sounds like a library conflict. Can you give me pointers for tracking down the problem file/symlink? I tried 'lsof -p ' on demo.bin while it was running, but it didn't appear to have any opengl files open at the time of the error window.
12/10/2004 (8:26 pm)
LibGLwrapper.so.whatever doesn't exist on my Gentoo system:[0:52]jesse@isaac:[/etc]# locate GL | grep -i wrapper
Exit 1
[0:53]jesse@isaac:[/etc]# locate wrapper | grep -i gl
Exit 1
Admittedly, my /usr/X11R6/lib/libGL.so.1 was pointing to the Mesa libs, and not the nvidia libs, but changing that doesn't seem to help, even after an 'ldconfig'.
[0:54]jesse@isaac:[/etc]# cat ld.so.conf
# ld.so.conf autogenerated by env-update; make all changes to
# contents of /etc/env.d directory
/usr/local/lib
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4
/usr/lib/opengl/nvidia/lib
/usr/lib/MozillaFirefox
/usr/lib/mozilla
/usr/X11R6/lib64
/usr/X11R6/lib
/opt/blackdown-jdk-1.4.2.01/jre/lib/i386/
/opt/blackdown-jdk-1.4.2.01/jre/lib/i386/native_threads/
/opt/blackdown-jdk-1.4.2.01/jre/lib/i386/classic/
/usr/qt/3/lib
/usr/kde/3.3/lib
/usr/kde/3.2/lib
/usr/lib/nspr
/usr/lib/nss
/usr/NX/lib
/usr/lib/speech-tools/lib
/usr/games/lib
/usr/lib/fltk-1.1
Commenting out either the nvidia line or the X11R6/lib line doesn't help in ld.so.conf, even after an 'ldconfig'.
Any further ideas? This sounds like a library conflict. Can you give me pointers for tracking down the problem file/symlink? I tried 'lsof -p ' on demo.bin while it was running, but it didn't appear to have any opengl files open at the time of the error window.
#30
* media-video/nvidia-glx
Latest version available: 1.0.6629-r1
Latest version installed: 1.0.6629-r1
Size of downloaded files: 16,116 kB
Homepage: http://www.nvidia.com/
Description: NVIDIA X11 driver and GLX libraries
License: NVIDIA
* media-video/nvidia-kernel
Latest version available: 1.0.6629-r1
Latest version installed: 1.0.6629-r1
Size of downloaded files: 16,116 kB
Homepage: http://www.nvidia.com/
Description: Linux kernel module for the NVIDIA X11 driver
License: NVIDIA
Or possibly the GCC upgrade that the system used to compile the above upgrades:
* sys-devel/gcc
Latest version available: 3.3.4-r1
Latest version installed: 3.3.4-r1
Size of downloaded files: 23,269 kB
Homepage: http://www.gnu.org/software/gcc/gcc.html
Description: The GNU Compiler Collection. Includes C/C++, java compilers, pie and ssp extensions
License: GPL-2 LGPL-2.1
I used to be running gcc-3.3.3-r6. My money is on the GCC upgrade, but there are too many variables to tell for sure. Either way, it's fixed, and I'm up and running again! Woo hoo!
Thanks for the suggestions!
01/10/2005 (7:16 am)
A recent upgrade this past weekend fixed the problem for me. I'm not sure if it was the kernel upgrade from 2.6.9-r6 to 2.6.9-r13, the nvidia upgrades:* media-video/nvidia-glx
Latest version available: 1.0.6629-r1
Latest version installed: 1.0.6629-r1
Size of downloaded files: 16,116 kB
Homepage: http://www.nvidia.com/
Description: NVIDIA X11 driver and GLX libraries
License: NVIDIA
* media-video/nvidia-kernel
Latest version available: 1.0.6629-r1
Latest version installed: 1.0.6629-r1
Size of downloaded files: 16,116 kB
Homepage: http://www.nvidia.com/
Description: Linux kernel module for the NVIDIA X11 driver
License: NVIDIA
Or possibly the GCC upgrade that the system used to compile the above upgrades:
* sys-devel/gcc
Latest version available: 3.3.4-r1
Latest version installed: 3.3.4-r1
Size of downloaded files: 23,269 kB
Homepage: http://www.gnu.org/software/gcc/gcc.html
Description: The GNU Compiler Collection. Includes C/C++, java compilers, pie and ssp extensions
License: GPL-2 LGPL-2.1
I used to be running gcc-3.3.3-r6. My money is on the GCC upgrade, but there are too many variables to tell for sure. Either way, it's fixed, and I'm up and running again! Woo hoo!
Thanks for the suggestions!
#31
(look for "Composite" in the X.org.log file)
01/29/2005 (7:23 am)
Just out of curiosity, is the composite extension enabled in your X server?(look for "Composite" in the X.org.log file)
#32
[18:10]jesse@isaac:[/home/jesse]# grep -i composite /var/log/Xorg.0.log
(II) Initializing built-in extension COMPOSITE
[18:10]jesse@isaac:[/home/jesse]#
01/29/2005 (3:11 pm)
Yes. I'm not sure if it was when I was having trouble or not. Here's the proof:[18:10]jesse@isaac:[/home/jesse]# grep -i composite /var/log/Xorg.0.log
(II) Initializing built-in extension COMPOSITE
[18:10]jesse@isaac:[/home/jesse]#
#33
In the device section for that card.
01/29/2005 (4:44 pm)
Ah, turn it off or put, Option "AllowGLXWithCOmposite" "True"
In the device section for that card.
Option "AllowGLXWithComposite" "boolean"
Enables GLX even when the Composite X extension is loaded.
ENABLE AT YOUR OWN RISK. OpenGL applications will not
display correctly in many circumstances with this setting
enabled. Default: GLX is disabled when Composite is
loaded.
#34
setenv LD_PRELOAD /usr/lib/libGL.so
Warning: I use tcsh, you'll have to figure out what to do for your own shell.
03/16/2005 (2:13 pm)
I had a similar issue on my gentoo box. Adding this to my tge run scripts solved the problem:setenv LD_PRELOAD /usr/lib/libGL.so
Warning: I use tcsh, you'll have to figure out what to do for your own shell.
#35
first i had the garbled textures (terrain/and interiors garbled or white, dts and 2dgui stuff looked fine) and it looked like i had two libGL.so files (one was old, and one was brand new, from when installed nvidia drivers)
so i changed the old one to symlink to the new one, and now i get the same popup about cant initialize..
04/25/2005 (6:47 pm)
Im still having this problemfirst i had the garbled textures (terrain/and interiors garbled or white, dts and 2dgui stuff looked fine) and it looked like i had two libGL.so files (one was old, and one was brand new, from when installed nvidia drivers)
so i changed the old one to symlink to the new one, and now i get the same popup about cant initialize..
#36
and when i run it i get "Unable to initialize OpenGL. (Error: Could not load OpenGL library)
doomgaze:/usr/X11R6/lib# ls -la libGL*
-rw-r--r-- 1 root root 681084 2005-02-23 03:07 libGL.a
lrwxrwxrwx 1 root root 27 2005-04-26 08:37 libGL.so -> ../../lib/libGL.so.1.0.7174
lrwxrwxrwx 1 root root 27 2005-04-26 08:38 libGL.so.1 -> ../../lib/libGL.so.1.0.7174
lrwxrwxrwx 1 root root 27 2005-04-26 08:25 libGL.so.1.2 -> ../../lib/libGL.so.1.0.7174
-rw-r--r-- 1 root root 437376 2005-02-23 03:07 libGL.so.1.2.old
-rw-r--r-- 1 root root 666504 2005-02-23 03:07 libGLU.a
lrwxrwxrwx 1 root root 13 2005-04-24 13:46 libGLU.so -> libGLU.so.1.3
lrwxrwxrwx 1 root root 13 2005-04-24 13:46 libGLU.so.1 -> libGLU.so.1.3
-rw-r--r-- 1 root root 500608 2005-02-23 03:07 libGLU.so.1.3
-rw-r--r-- 1 root root 31382 2005-02-23 03:07 libGLw.a
doomgaze:/usr/lib# ls -la libGL*
lrwxrwxrwx 1 root root 20 2005-04-24 13:46 libGL.a -> ../X11R6/lib/libGL.a
lrwxrwxrwx 1 root root 21 2005-04-24 12:50 libGLcore.so.1 -> libGLcore.so.1.0.7174
-rwxr-xr-x 1 root root 7626156 2005-04-24 12:50 libGLcore.so.1.0.7174
-rw-r--r-- 1 root root 653 2005-04-24 12:50 libGL.la
lrwxrwxrwx 1 root root 17 2005-04-26 08:41 libGL.so -> libGL.so.1.0.7174
lrwxrwxrwx 1 root root 17 2005-04-26 08:41 libGL.so.1 -> libGL.so.1.0.7174
-rwxr-xr-x 1 root root 485260 2005-04-24 12:50 libGL.so.1.0.7174
lrwxrwxrwx 1 root root 17 2005-04-26 08:42 libGL.so.1.2 -> libGL.so.1.0.7174
lrwxrwxrwx 1 root root 21 2005-04-24 13:46 libGLU.a -> ../X11R6/lib/libGLU.a
lrwxrwxrwx 1 root root 13 2005-04-24 13:46 libGLU.so -> libGLU.so.1.3
lrwxrwxrwx 1 root root 13 2005-04-24 13:46 libGLU.so.1 -> libGLU.so.1.3
lrwxrwxrwx 1 root root 26 2005-04-24 13:46 libGLU.so.1.3 -> ../X11R6/lib/libGLU.so.1.3
04/25/2005 (6:53 pm)
I have the latest nvidia drivers for a geforce3 and im on debian linux (sarge) with 2.4.30and when i run it i get "Unable to initialize OpenGL. (Error: Could not load OpenGL library)
doomgaze:/usr/X11R6/lib# ls -la libGL*
-rw-r--r-- 1 root root 681084 2005-02-23 03:07 libGL.a
lrwxrwxrwx 1 root root 27 2005-04-26 08:37 libGL.so -> ../../lib/libGL.so.1.0.7174
lrwxrwxrwx 1 root root 27 2005-04-26 08:38 libGL.so.1 -> ../../lib/libGL.so.1.0.7174
lrwxrwxrwx 1 root root 27 2005-04-26 08:25 libGL.so.1.2 -> ../../lib/libGL.so.1.0.7174
-rw-r--r-- 1 root root 437376 2005-02-23 03:07 libGL.so.1.2.old
-rw-r--r-- 1 root root 666504 2005-02-23 03:07 libGLU.a
lrwxrwxrwx 1 root root 13 2005-04-24 13:46 libGLU.so -> libGLU.so.1.3
lrwxrwxrwx 1 root root 13 2005-04-24 13:46 libGLU.so.1 -> libGLU.so.1.3
-rw-r--r-- 1 root root 500608 2005-02-23 03:07 libGLU.so.1.3
-rw-r--r-- 1 root root 31382 2005-02-23 03:07 libGLw.a
doomgaze:/usr/lib# ls -la libGL*
lrwxrwxrwx 1 root root 20 2005-04-24 13:46 libGL.a -> ../X11R6/lib/libGL.a
lrwxrwxrwx 1 root root 21 2005-04-24 12:50 libGLcore.so.1 -> libGLcore.so.1.0.7174
-rwxr-xr-x 1 root root 7626156 2005-04-24 12:50 libGLcore.so.1.0.7174
-rw-r--r-- 1 root root 653 2005-04-24 12:50 libGL.la
lrwxrwxrwx 1 root root 17 2005-04-26 08:41 libGL.so -> libGL.so.1.0.7174
lrwxrwxrwx 1 root root 17 2005-04-26 08:41 libGL.so.1 -> libGL.so.1.0.7174
-rwxr-xr-x 1 root root 485260 2005-04-24 12:50 libGL.so.1.0.7174
lrwxrwxrwx 1 root root 17 2005-04-26 08:42 libGL.so.1.2 -> libGL.so.1.0.7174
lrwxrwxrwx 1 root root 21 2005-04-24 13:46 libGLU.a -> ../X11R6/lib/libGLU.a
lrwxrwxrwx 1 root root 13 2005-04-24 13:46 libGLU.so -> libGLU.so.1.3
lrwxrwxrwx 1 root root 13 2005-04-24 13:46 libGLU.so.1 -> libGLU.so.1.3
lrwxrwxrwx 1 root root 26 2005-04-24 13:46 libGLU.so.1.3 -> ../X11R6/lib/libGLU.so.1.3
#37
i could only get either, garbled textures, or failed to init..
i had two versions of libGL.so, the one that came with debian is the one with missing/garbled terrain and interior textures
the one that came with nvidia's driver doesnt seem to init with torque at all
works on other games though
04/25/2005 (8:33 pm)
Damn i tried all night to get it to runi could only get either, garbled textures, or failed to init..
i had two versions of libGL.so, the one that came with debian is the one with missing/garbled terrain and interior textures
the one that came with nvidia's driver doesnt seem to init with torque at all
works on other games though
#38
1: i had 2 version of libGL.so (software had garbled terrain/interiors textures)
2: the module loader just wouldnt seem to use nvidia's libGL.so (beats me as to why, put it into the conf and everything.. )
what jerry said worked
i set the LD_PRELOAD variable to /usr/lib/libGL.so
put following lines in the launch script:
LD_PRELOAD=/usr/lib/libGL.so
export LD_PRELOAD
make sure that /usr/lib/libGL.so doesnt symlink to software openGL it should link to nvidia's which is probably in that same directory
now torque works, all the textures are great, and it runs fantastically
04/26/2005 (9:04 pm)
I finally got it to work! talk about lots of problems1: i had 2 version of libGL.so (software had garbled terrain/interiors textures)
2: the module loader just wouldnt seem to use nvidia's libGL.so (beats me as to why, put it into the conf and everything.. )
what jerry said worked
i set the LD_PRELOAD variable to /usr/lib/libGL.so
put following lines in the launch script:
LD_PRELOAD=/usr/lib/libGL.so
export LD_PRELOAD
make sure that /usr/lib/libGL.so doesnt symlink to software openGL it should link to nvidia's which is probably in that same directory
now torque works, all the textures are great, and it runs fantastically
#39
04/29/2005 (12:26 pm)
@Charles: Great to hear.
Torque Owner Ben Doobov
Unable to initialise opengl..... etc OK.
no difference sorry. It's the same issue that I can see.
been working, woulda done it sooner if id seen.