PDA

View Full Version : nVIDIA drivers slow?



richardve
05-01-2001, 01:49 PM
I've noticed that the nVIDIA drivers for Linux (latest) are almost 6 times slower than my windows drivers (12.01)
I'm very sure that it's NOT software rendering and the drivers are loaded correctly.

Can someone tell me if it's normal that those drivers are so slow?

I've read that it can be slower because of some conflicting Mesa drivers but since I'm very new to Linux I don't know wich files to remove...
Here are the mesa files I found in "/usr/X11R6/lib":

libMesaGL.so.1
libMesaGL.so.1.0
libMesaGL.so.3
libMesaGLU.so
libMesaGLU.so.1
libMesaGLU.so.3


Some details:

- Direct rendering is enabled.
- I've got XFree86 4.0.3 installed so that shouldn't be the problem.
- My videocard is a GeForce2 MX

richardve
05-02-2001, 05:12 AM
Hmm, it seems that it's not a conflicting Mesa library...
(checked with ldd)

AGP is also enabled
(checked with cat /proc/nv/card0)

05-02-2001, 08:46 AM
Don't GeForece's (and all NVidia cards) use the NVidia drivers and not mesa?
http://www.nvidia.com/Products/Drivers.nsf/Linux.html

richardve
05-02-2001, 11:17 AM
Well, actually I am using the nVIDIA drivers, but they're just 6 times slower than the windows drivers http://www.opengl.org/discussion_boards/ubb/frown.gif
And it's not software rendering (I've tried the Mesa drivers before installing nVIDIA's drivers)



[This message has been edited by richardve (edited 05-02-2001).]

zen
05-02-2001, 02:43 PM
Are you sure the files you posted above are the only opengl libraries you have installed?Try find / -name 'lib*GL*' as root to see if there are any other libraries that may be used instead of nvidia's.

richardve
05-02-2001, 09:01 PM
This is what I got after doing that find command as root:

/usr/lib/libGL.so.1.0.769
/usr/lib/libGLcore.so.1.0.769
/usr/lib/libGLcore.so.1
/usr/lib/libGL.so.1
/usr/lib/libGL.so
/usr/X11R6/lib/libGLU.so.1
/usr/X11R6/lib/libGLU.so.1.2.030401
/usr/X11R6/lib/libGLU.so.3
/usr/X11R6/lib/libMesaGLU.so.1
/usr/X11R6/lib/libMesaGLU.so.3
/usr/X11R6/lib/libGL.so.1
/usr/X11R6/lib/libGL.so.3
/usr/X11R6/lib/libGL.so
/usr/X11R6/lib/libGLw.a
/usr/X11R6/lib/libGL.so.1.0
/usr/X11R6/lib/libGL.so.1.2.030401
/usr/X11R6/lib/libGLwrapper.so.0.1.4
/usr/X11R6/lib/libMesaGL.so.1
/usr/X11R6/lib/libMesaGL.so.1.0
/usr/X11R6/lib/libMesaGL.so.3
/usr/X11R6/lib/libGL.la
/usr/X11R6/lib/libGLU.la
/usr/X11R6/lib/libGLU.so
/usr/X11R6/lib/libMesaGLU.so

But like I said in my first post; I really don't know wich of those files can be deleted...

Walantis
05-02-2001, 09:37 PM
Hi,

try this:
rm -f /usr/lib/libGL.*
rm -f /usr/lib/libGLcore*
rm -f /usr/X11R6/lib/libGLU*
rm -f /usr/X11R6/lib/libMesa*
rm -f /usr/X11R6/lib/libGL*

rm -f /usr/X11R6/lib/extensions/libglx*
rm -f /usr/X11R6/lib/extensions/libGL*

rm -f /usr/X11R6/lib/modules/drivers/nvdia.o (or nv.o)
(not sure, about the path; do a search)...

then, download the NVIDIA_KERNEL and GLX thingy from their page, unpack it in your locar dir, and move the libs (with links)
to /usr/X11R6/lib...

the libGLcore* and libglx* stuff goes to /usr/X11R6/lib/extensions

the nv.o (or was it nvidia.o) has to be copied to /usr/X11R6/lib/modules/drivers/

in general: all files which contain "mesa"
have to be removed http://www.opengl.org/discussion_boards/ubb/wink.gif

that should work,

walantis

richardve
05-03-2001, 09:14 AM
I've done everything wich is suggested but it's still too slow http://www.opengl.org/discussion_boards/ubb/frown.gif

Walantis
05-03-2001, 11:14 AM
Hi,

another idea...take a look (as root) at this:

cat /proc/nv/card0

and tell me what you see...maybe there's a problem
with agp support ?!

hope it helps,

walantis

richardve
05-03-2001, 12:17 PM
----- Driver Info -----
NVRM Version: 1.0-769
----- Card Info -----
Model: GeForce2 MX
IRQ: 11
----- AGP Info -----
AGP Status: Enabled
AGP Driver: NVIDIA
Bridge: Via Apollo Pro
SBA: Supported [disabled]
FW: Unsupported [disabled]
Rates: 2x 1x [2x]
Registers: 0x07000203:0x00000102


Nothing wrong with it AFAIK...

Could it be that Linux has a larger function calling overhead wich makes it slower when using immediate mode (glVertex3f[v], etc) for rendering?

zen
05-03-2001, 06:02 PM
Well these *.030401 files seem to be from the mesa 3.4.1 distribution and used software rendering(if they were actually used of course),some of the others as well possibly.I think what walantis means with all these rm -f's is that you should delete *everything* in that list returned by find first so make sure that the same find command return nothing afterwards.Then install the correct libs which means the ones from nvidia using the installation instruction they should give you.You might also wanna do a 'ldconfig -v|grep GL' as root to see what lib files of opengl are actually beeing used.Good luck.

05-03-2001, 07:46 PM
Interesting... I do have the nvidia drivers for linux and it is no speed problem but some programs fails to run or rather the display is never updated. All benchmark I have seen also shows almost identical numbers for linux/windows.

How do you get the libMesa* files? I do not have them. Mesa installed the normal GL* files but nvidi overwrote them.

I checked my AGP status but it was disabled. How did you enabled yours?

I do not know what the problem is but here is a list with things to check:
- check that XF86Config have Driver "nvidia" and not Driver "nv"
- make sure that XF86Config has Load "glx"
- make sure it does not have Load "dri" or Load "GLcore"
- run xdpyinfo and make sure that you have "GLX", "NV-GLX" and "NVIDIA-GLX"
- try to disable AGP in XF86Config by setting Option "NvAGP" "0"
- run the gears sample with -info and study the output
- my GL libs are in /usr/lib but it seems yours are in /usr/X11R6/lib?

richardve
05-04-2001, 04:08 AM
zen:

Thx, but I really did exactly what walantis said http://www.opengl.org/discussion_boards/ubb/smile.gif


nvidia_linux:

I got the Mesa files by installing them http://www.opengl.org/discussion_boards/ubb/wink.gif
Just wanted to try them before using the nVIDIA drivers.

XF86Config-4 has Driver "nvidia" and Load "glx"
It doesn't load "dri" or "GLcore"
xdpyinfo says that GLX, NV-GLX and NVIDIA-GLX are there.
Disabling AGP doesn't help (I did restart Linux of course).

The gears sample runs with 400 FPS in 800x600 resolution (windowed)

Those GL libs in /usr/X11R6/lib are mostly symlinks..


I've tried some more GL programs and it seems that NeHe's tutorials (Linux/X version) are the only programs wich are so slow under Linux (maybe because they're using immediate mode?).

After trying TuxRacer under Win2K and Linux I came to the conclusion that it's actually many times faster when using vertex arrays..

Average FPS in Win2K (detonator 11.01): 49 FPS
Average FPS in Linux (769): 111 FPS (!)

Nice increase of FPS... http://www.opengl.org/discussion_boards/ubb/smile.gif


"I checked my AGP status but it was disabled. How did you enabled yours?"

I haven't done anything to enable/disable it http://www.opengl.org/discussion_boards/ubb/smile.gif

Walantis
05-04-2001, 05:30 AM
Hi!

Maybe this will help:
you said that only the nehe demos run so slow (not because imm. mode, i use it, too).

BUT: maybe you have build your libGLU and libglut with the new GL libs from nvidia ?

try it out...

zen
05-04-2001, 10:01 AM
Since you're getting 400fps in gears you are running in HW but you said it doesn't load dri and glcore and I think that's your problem.Checkout dri.sourceforge.net for info on setting up dri(which is very important)and some sample xf86 config files for many cards.

richardve
05-04-2001, 10:34 PM
Walantis:

No, I haven't build anything (it's all out of the box) so it's impossible that the libGLU & libGLUT are build with the libs from nVIDIA.

However, I've tried to rebuild them and nothing changed..

zen:

The README from nVIDIA says that I should _not_ load dri and glcore.
But direct rendering _is_ enabled.
(checked with glXIsDirect())


I've noticed something weird today...
When I press 2 or more keys in TuxRacer it slows down to 20 FPS until I release the keys.
I'm also pressing a key to rotate the cube in NeHe's tutorials.

05-05-2001, 12:36 AM
Sometimes do I also got some strange performance (both faster and slower) compared to windows. I looked at some benchmarks and they showed an almost identical speed. Somewhere did I read that nvidia use the same code base so this is hard to explain. http://www.opengl.org/discussion_boards/ubb/confused.gif

I managed to get agpart running and the speed increase was pretty good, like10-20% but after about 10 seconds did the computer crash. If anyone is curious can I report that linux do some kind of scandisk like windows then restarting from a crash. http://www.opengl.org/discussion_boards/ubb/wink.gif
Maybe did the driver check the agp driver and refused to use it...

The glu and glut libraries are shared like windows dlls so they use any updated gl libraries without recompiling. The tempation was too big so I downloaded the glu 1.3 libs from the mesa page but perhaps will I get problems with windows portability.

Another brain storming idea is to change the color depth of the desktop. I tried SDL but got among other problem with the keyboard input. Perhaps is it some problems with the new XFree86?
But glut works...

zen
05-05-2001, 04:03 AM
Since nvidia_linux has mentioned agpgart.Have you configured your kernel correctly.I don't know how you're supposed to do it with nvidia cards,but I have to compile(either in the kernel or as a module) the agpgart driver and the dri driver for my card.If they compiled as modules they have to be loaded before X starts.

simiansim
05-05-2001, 05:58 PM
look at the following unofficial HOW TO:

NVIDIA, XFREE86 & RED HAT 7.0 http://www.evil3d.net/articles/linux/howto/nvidia/redhat7/


Of note is the new config file for XFREE86 4
/etc/X11/XF86Config-4
the docs for xfree mention the order of config file locations that are looked at. make sure that the config U think you are using is really being used.

you should look at the information x prints to screen as it loads each line is preceeded by 2 characters of status. I think that two EE means that the rest of the line tells you what failed to load

grady
05-05-2001, 09:13 PM
I just got the first thing i've ever done in opengl in linux compiled and, richardve, whatever you do don't delete this topic. I think i'm going to have to do whatever it is your doing to speed mine up. I just compiled something in linux that i've seen run before in windows and something is definitely wrong here...

richardve
05-06-2001, 05:41 AM
I can't find any errors in the log files.
(XF86Config-4 is used instead of XF86Config)

The agpart driver doesn't make it much faster.

I've checked that HOWTO but there's nothing new in it.

grady, I won't delete this topic http://www.opengl.org/discussion_boards/ubb/smile.gif

richardve
05-06-2001, 09:54 AM
I've been running some benchmarks today and most of them were faster with Linux.

Except the NeHe tutorials (again), wich seem to run slower.

05-10-2001, 06:08 AM
Which NeHe lesson are you using? I am responsible for porting lesson32, (The model loading tutorial) and would be concerned if it was happening with my port. I have never compared the performance to the windows version, so I wouldn't know.

linuxedge
05-12-2001, 07:32 PM
This might not be your problem....but check to see what bit-depth you are in. I use the nvidia drivers for a Geforce 2 GTS.

I was in 16 and a NeHe Linux Tutorial 3 failed...glutInit would'nt support GL_ALPHA at all at 16bit , although the NeHE linux/glx Tutorial 3 worked fine....

Switched to 24 bit and all is well. 24 bit seems faster to me...BTW how do you get FPS out of TuxRacer?


Originally posted by davace:
Which NeHe lesson are you using? I am responsible for porting lesson32, (The model loading tutorial) and would be concerned if it was happening with my port. I have never compared the performance to the windows version, so I wouldn't know.

richardve
05-16-2001, 08:26 AM
davace:

It's also slower with tut32 but it is my own fault... http://www.opengl.org/discussion_boards/ubb/wink.gif

It's because the VSync is enabled under Linux but I always disable it under windows.
(NeHe's tutorials don't use time to keep everything in sync so it's faster when VSync is disabled)

I've tried to disable it under Linux but I have to set an environment variable, __GL_SYNC_TO_VBLANK, to zero and I don't know how to do that..
(setenv doesn't work..)

linuxedge:

I don't have 24 bpp support on my GF2MX (I think they left it out because it's actually slower than 32 bpp)

You can see the FPS in TuxRacer by editing the "options" file in the hidden ".tuxracer" directory wich can be found in your home directory.
(on my installation it's "/home/richardve/.tuxracer/options")

rts
05-16-2001, 09:15 AM
Originally posted by richardve:

I've tried to disable it under Linux but I have to set an environment variable, __GL_SYNC_TO_VBLANK, to zero and I don't know how to do that..
(setenv doesn't work..)


To set an environment variable in bash:

export __GL_SYNC_TO_VBLANK=0

To make that "permanent", add that line to your ~/.bash_profile.


The "setenv" command is for tcsh, I believe.

[This message has been edited by rts (edited 05-16-2001).]

05-17-2001, 12:17 AM
Just a note : When using nVidia's drivers, make sure that agpart is NOT compiled into the kernel. When I enabled agpart, /proc/nv/card0 reported that AGP was disabled. Without agpart, AGP is enabled with nVidia's drivers.

05-19-2001, 03:57 PM
I think that you should be able to have agpart enabled and the driver should pick the right agp driver.

If someone missed it: new drivers are available!
No speed increase for the gears sample but some other programs seems to run faster. Maybe is the copy buffer functions better?
Most new stuff for GF3 but also other new extensions and TV out! http://www.opengl.org/discussion_boards/ubb/smile.gif

oboltyo
05-31-2001, 05:59 PM
just a thought, the last linux version I set up had a wierd glitch depending on which window manager i used. Another prob- (sounds like yours) is is that my frame rates would be about 40% slower then they should have been. Usually to get around this I would go back and set up the drivers, XF86Config, and move libglx, and GLcore, edit XF86Config, and XF86Config-4, check lsmod and then restart. This almost always worked. Now I am using Mandrake 8 and X 4.0.3 with new Nvidia drivers- but - I do not always see gears flying , but then quake3 runs at about 111 fps @1024x768 trilinear, high textures.