PDA

View Full Version : How to install NVidia driver


Bluey
2004-10-01, 06:06 PM CDT
I apologize before-hand for the irritation this might cause because of my ignorance.

My system specs are as follows:
AMD Athlon XP 2500+
Gigabyte GA-7N400-L
two 512MB PC2700 sticks (DDR)
and my video card is NVidia GeForce2 MX-200 64MB

All the 3D games and screen savers that come with Linux have extremely slow frame rates.

1. Is this a driver or a hardware problem?

2. What is the normal procedure for installing the driver for NVidia cards?

Thanks for your time,
Timothy

SuperNu
2004-10-01, 06:52 PM CDT
Installing the Nvidia driver is really simple provided you read the README (ftp://download.nvidia.com/XFree86/Linux-x86/1.0-6111/README.txt) file. You have to boot into text mode by either editing /etc/iniitab and change the line id:5:initdefault: to id:3:initdefault: or you could boot normally, change to one of the virtual consoles, CTRL+ALT+F1-6, log in as root, type init 3 and run the installer file, sh NVIDIA-Linux-x86-1.0-6111-pkg1.run. Then be sure to edit /etc/X11/xorg.conf and make the necessary changes (be sure to create a backup just in case). Finally, type init 5 to switch back into graphical mode. If X starts up, then everything should be fine. Just make sure the nvidia module is loaded by typing /sbin/lsmod | grep nvidia. If the nvidia module shows up, you are good to go. If you edit /etc/inittab, you must reboot after changing the file and then be sure to change it back or else you will continue to boot into text mode.

--SN

LordMorgul
2004-10-02, 03:32 AM CDT
The questions: 1) yes it is a hardware issue because IF you have an nVIDIA card (which I assume since you asked) then GL is software only in Fedora. You must install the nVIDIA driver before you get any hardware accellerated 3D.

SuperNu, that was a nice coverage of how to do the install with the nvidia-installer. But..
Installing the driver is simpler than that. :-) Here is why you should use this method: http://rpm.livna.org/livna-switcher.html
(its because not breaking what rpm knows about your system.. is a good thing)

Configure yum to use the livna.org repositories. You can download a config that already has livna configured if you go to www.fedorafaq.org and click on the section link regarding how to use yum.

Install like this:
# yum install nvidia-glx

Yum will retrieve the correct kernel module for you at the same time it grabs the glx package. After the install, run the command:
# modprobe nvidia

If no errors are shown then enable the driver:
# nvidia-config-display enable

And reboot. You should be greeted by the nvidia splash screen when X loads. If this does not work out.. I have a little more detailed answer here that specifically deals with the problem of not finding a kernel module RPM available for your kernel (in this case it is when using FC3t2, but if Livna does not have a kernel module that yum finds for your kernel, this method should work).
http://www.fedoraforum.org/forum/showpost.php?p=106977&postcount=76

And, your third option involves use of the RPMs supplied by ATrpms.net. These offer similar features to the Livna packages, they relocate the libs to avoid overwriting the Fedora installed Mesa GL libs, and the kernel modules are available already compiled.
http://atrpms.net/dist/fc2/nvidia-graphics/
http://atrpms.net/dist/common/nvidia-graphics-helpers/

Bluey
2004-10-02, 02:09 PM CDT
Well since I already had the yum.conf from linuxfaq.org, I ran the "yum install nvidia-glx"
It failed the first two times with the "retrygrab()" or "grabretry()", but the thrid time it connected and dowloaded the packages.
But when I run "modprobe nvidia", the command is unknown.
What am I doing wrong?

Please pitty me and instruct me in the great ways of the Linux :p

Timothy



"
[root@localhost tim]# yum install nvidia-glx
Gathering header information file(s) from server(s)
Server: Fedora Core 2 - i386 - Base
Server: Fedora.us Extras (Stable)
Server: Fedora.us Extras (Testing)
Server: Fedora.us Extras (Unstable)
Server: Livna.org - Fedora Compatible Packages (stable)
Server: Livna.org - Fedora Compatible Packages (testing)
Server: Livna.org - Fedora Compatible Packages (unstable)
Server: macromedia.mplug.org - Flash Plugin
Server: Fedora Core 2 - i386 - Released Updates
Finding updated packages
Downloading needed headers
xvidcore-0-1.0.2-0.lvn.1. 100% |=========================| 2.2 kB 00:00
raine-0-0.41.1-0.lvn.1.2. 100% |=========================| 4.2 kB 00:00
vcdimager-devel-0-0.7.20- 100% |=========================| 2.6 kB 00:00
vcdimager-0-0.7.20-0.lvn. 100% |=========================| 4.0 kB 00:00
xvidcore-devel-0-1.0.2-0. 100% |=========================| 2.2 kB 00:00
xine-lib-devel-0-1.0.0-0. 100% |=========================| 4.1 kB 00:00
xine-lib-0-1.0.0-0.lvn.0. 100% |=========================| 9.6 kB 00:00
Resolving dependencies
..Dependencies resolved
I will do the following:
[install: nvidia-glx 1.0.6111-0.lvn.2.2.i686]
[install: kernel-smp 2.6.8-1.521.i686]
I will install/upgrade these to satisfy the dependencies:
[deps: kernel-module-nvidia-2.6.8-1.521smp 1.0.6111-0.lvn.2.2.i686]
Is this ok [y/N]: y
Downloading Packages
Getting kernel-module-nvidia-2.6.8-1.521smp-1.0.6111-0.lvn.2.2.i686.rpm
kernel-module-nvidia-2.6. 100% |=========================| 957 kB 00:04
Getting nvidia-glx-1.0.6111-0.lvn.2.2.i686.rpm
nvidia-glx-1.0.6111-0.lvn 100% |=========================| 3.2 MB 00:14
Getting kernel-smp-2.6.8-1.521.i686.rpm
kernel-smp-2.6.8-1.521.i6 100% |=========================| 15 MB 00:40
Running test transaction:
Test transaction complete, Success!
kernel-smp 100 % done 1/3
/
nvidia-glx 100 % done 2/3
kernel-module-nvidia-2.6.8-1.521smp 100 % done 3/3
Kernel Updated/Installed, checking for bootloader
Grub found - making this kernel the default
Installed: nvidia-glx 1.0.6111-0.lvn.2.2.i686 kernel-smp 2.6.8-1.521.i686
Dep Installed: kernel-module-nvidia-2.6.8-1.521smp 1.0.6111-0.lvn.2.2.i686
Transaction(s) Complete
[root@localhost tim]# modprobe nvidia
bash: modprobe: command not found
"

sayeeth
2004-10-02, 02:56 PM CDT
[root@localhost tim]# modprobe nvidia
bash: modprobe: command not found
"

To run modprobe, you need to logged in su - not su.
What I mean is this:-
1. If you are logged in as su, type exit to log out.
2. Log in using su -
3. Type modprobe nvidia
4. Type nvidia-config-display enable
That should work. :)

clavan
2004-10-02, 03:05 PM CDT
To run modprobe, you need to logged in su - not su.
What I mean is this:-
1. If you are logged in as su, type exit to log out.
2. Log in using su -
3. Type modprobe nvidia
4. Type nvidia-config-display enable
That should work. :)

Or you can do
# which modprobe
/sbin/modprobe

and run the command with the complete path
#/sbin/modprobe

LordMorgul
2004-10-02, 04:55 PM CDT
However only root will be allowed to insert modules in the kernel, so this will only get you a different error message. ;)

clavan
2004-10-02, 05:09 PM CDT
ok you had to be root, but the minus is not nessecery , su is enough, and with the complete path it works 2

Jman
2004-10-02, 07:28 PM CDT
See the FAQ: http://fedorafaq.org/#nvidia

Bluey
2004-10-02, 07:41 PM CDT
to prove that Sayeeth knows what he's talking about please view the following:

"
[root@localhost /]# modprobe nvidia
bash: modprobe: command not found
[root@localhost /]# which modprobe
/usr/bin/which: no modprobe in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/tim/bin)
[root@localhost /]# exit
exit
[tim@localhost tim]$ su -
Password:
[root@localhost root]# which modprobe
/sbin/modprobe
[root@localhost root]# modprobe nvidia
[root@localhost root]# nvidia-config-display enable
[root@localhost root]#
"

I'm now going to restart and see if it worked.

Timothy

Bluey
2004-10-02, 07:59 PM CDT
Well, the games play much much faster, so I'm going to assume that the driver worked.
I did not see any NVidia splash screen though.

When I was playing Tux Racer, the video "jerked" for a moment. Is this the video card being over-taxed in certain instances? or is it something else?

Thanks!
Timothy

LordMorgul
2004-10-03, 02:00 PM CDT
Tux Racer is a simple GL game, not a high performance 3D engine, so there are bound to be slight hitches and glitches in it. It depends on many things how smoothly the game will run, but if it is running 'at all' in a playable way then you have the drivers working.

I would suspect cpu loads of causing the glitches rather than the card gpu load since Tux Racer will be using less of the heavy gpu features than modern engines, such as Q3 or UT2k4. (yes I know Q3 is old)

Bluey
2004-10-03, 04:27 PM CDT
Thank you all for your help!

Now, off to my next goal: jon1012's 3d desktop interface :)

Timothy

Bluey
2004-10-05, 06:51 AM CDT
BTW, I stand corrected.
I just saw the NVidia splash screen. It was only up for a split second, but it was there.

Timothy

GreyGeek
2004-10-05, 07:19 AM CDT
"SU" alone gives root access but with the users environment.
"SU -" gives root access with ROOT's environment.

To compare, issue the 'env' command as a user then as root after logging into root which both methods.

Lun@tik
2004-10-05, 08:02 AM CDT
Hi all,
I have an ASUS NVIDIA MX440 64Mo AGP 8X video card on my Fedora Core 2 with
- Kernel 2.6.8-1.521
- nvidia-glx-1.0.6106-0.lvn.4.2 installed (from livna.org)
- kernel-module-nvidia-2.6.8-1.521-1.0.6106-0.lvn.4.2 installed (from livna.org)

I can see the "Nvidia" splash screen with I boot X, but the "hardware" OpenGL does'nt seem to be activated.
When I run GLXGEARS, it gives me the same FPS as before with my old card (ATI RAGE 128 4Mo).

If I start Unreal Tournament, I got this "log" when the game starts :

--------------------------
OpenGL
GL_VENDOR : Mesa project: www.mesa3d.org
GL_RENDERER : Mesa GLX Indirect
GL_VERSION : 1.2 (1.4 Mesa 5.0.2)
GL_EXTENSIONS : GL_EXT_blend_minmax GL_EXT_draw_range_elements GL_ARB_multitexture GL_EXT_blend_color GL_EXT_fog_coord GL_EXT_texture_object GL_ARB_window_pos GL_EXT_texture3D GL_EXT_multi_draw_arrays GL_EXT_secondary_color GL_ARB_point_parameters GL_EXT_vertex_array GL_EXT_blend_func_separate GL_ARB_imaging
Device supports: GL
Device supports: GL_EXT_fog_coord
Device supports: GL_EXT_secondary_color
Device supports: GL_ARB_multitexture
--------------------------

It seems that the MESA OpenGL is still in use. How can I set the "nvidia" OpenGL active for all my system?

Thanks for your help

Carl

Bradlis7
2004-10-05, 11:56 AM CDT
I'm using the nvidia driver, and I don't have GL support. I don't know if the libna people are working on getting it to work, or if a previous install messed it up. Here's what happens when I start chromium.
SDL initialized.
Xlib: extension "GLX" missing on display ":0.0".
Xlib: extension "GLX" missing on display ":0.0".
Couldn't set GL mode: Couldn't find matching GLX visual


I've had this problem where I installed the nvidia driver from source, and it didn't work, and I never figured out the problem. I've googled for it and everything. I've just been going without 3d.

kbradl1
2004-10-05, 12:28 PM CDT
From the nvidia drivers README:

If X starts, but OpenGL causes problems, you most likely have a
problem with other libraries in the way, or there are stale symlinks.
See Appendix C for details. Sometimes, all it takes is to rerun
'ldconfig'.

You should also check that the correct extensions are present;
'xdpyinfo' should show the "GLX", "NV-GLX" and "NVIDIA-GLX" extensions
present. If these three extensions are not present, then there
is most likely a problem with the glx module getting loaded or it
is unable to implicitly load GLcore. Check your X config file and
make sure that you are loading glx (see "Editing Your X config File"
above). If your X config file is correct, then check the X log file
for warnings/errors pertaining to GLX. Also check that all of the
necessary symlinks are in place (refer to Appendix C).


Appendix C

Problems will arise if applications use the wrong version of a library.
This can be the case if there are either old libGL libraries or stale
symlinks left lying around. If you think there may be something awry
in your installation, check that the following files are in place
(these are all the files of the NVIDIA Accelerated Linux Driver Set,
plus their symlinks):

/usr/X11R6/lib/modules/drivers/nvidia_drv.o

/usr/X11R6/lib/modules/extensions/libglx.so.x.y.z
/usr/X11R6/lib/modules/extensions/libglx.so -> libglx.so.x.y.z

/usr/lib/libGL.so.x.y.z
/usr/lib/libGL.so.x -> libGL.so.x.y.z
/usr/lib/libGL.so -> libGL.so.x

/usr/lib/libGLcore.so.x.y.z
/usr/lib/libGLcore.so.x -> libGLcore.so.x.y.z

/lib/modules/`uname -r`/video/nvidia.o, or
/lib/modules/`uname -r`/kernel/drivers/video/nvidia.o

Installation will also create the /dev files:

crw-rw-rw- 1 root root 195, 0 Feb 15 17:21 nvidia0
crw-rw-rw- 1 root root 195, 1 Feb 15 17:21 nvidia1
crw-rw-rw- 1 root root 195, 2 Feb 15 17:21 nvidia2
crw-rw-rw- 1 root root 195, 3 Feb 15 17:21 nvidia3
crw-rw-rw- 1 root root 195, 255 Feb 15 17:21 nvidiactl

If there are other libraries whose "soname" conflicts with that of
the NVIDIA libraries, ldconfig may create the wrong symlinks. It is
recommended that you manually remove or rename conflicting libraries
(be sure to rename clashing libraries to something that ldconfig will
not look at -- we have found that prepending "XXX" to a library name
generally does the trick), rerun 'ldconfig', and check that the correct
symlinks were made. Some libraries that often create conflicts are
"/usr/X11R6/lib/libGL.so*" and "/usr/X11R6/lib/libGLcore.so*".

If the libraries checks out, then verify that the application is using
the correct libraries. For example, to check that the application
/usr/X11R6/bin/gears is using the NVIDIA libraries, you would do:

$ ldd /usr/X11R6/bin/gears
libglut.so.3 => /usr/lib/libglut.so.3 (0x40014000)
libGLU.so.1 => /usr/lib/libGLU.so.1 (0x40046000)
libGL.so.1 => /usr/lib/libGL.so.1 (0x40062000)
libc.so.6 => /lib/libc.so.6 (0x4009f000)
libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0x4018d000)
libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0x40196000)
libXmu.so.6 => /usr/X11R6/lib/libXmu.so.6 (0x401ac000)
libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x401c0000)
libXi.so.6 => /usr/X11R6/lib/libXi.so.6 (0x401cd000)
libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x401d6000)
libGLcore.so.1 => /usr/lib/libGLcore.so.1 (0x402ab000)
libm.so.6 => /lib/libm.so.6 (0x4048d000)
libdl.so.2 => /lib/libdl.so.2 (0x404a9000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
libXt.so.6 => /usr/X11R6/lib/libXt.so.6 (0x404ac000)

Note the files being used for libGL and libGLcore -- if they are something
other than the NVIDIA libraries, then you will need to either remove the
libraries that are getting in the way, or adjust your ld search path.
If any of this seems foreign to you, then you may want to read the man
pages for "ldconfig" and "ldd" for pointers.


_________________________________________________

Lun@tik
2004-10-05, 12:33 PM CDT
Using
- Kernel 2.6.8-1.521
- nvidia-glx-1.0.6106-0.lvn.4.2 installed (from livna.org)
- kernel-module-nvidia-2.6.8-1.521-1.0.6106-0.lvn.4.2 installed (from livna.org)
I couldn't have 3D hardware support from the drivers, but I managed to fix the problem by adding this line to my xorg.conf:
Option "NvAGP" "1"
to my device "nvidia".

By default, this option is set to "3". Now "glxgears" runs with about 1800-2000 fps, and my Unreal Tournament run much more smootly.

I hope it can fix somebody else problem...

Carl

LordMorgul
2004-10-05, 02:33 PM CDT
Check the libraries you have linked to the applications.. you are apparently getting Mesa libs linked in before the nVIDIA libs.. or only the Mesa libs. This can happen when the symlinks are incorrect, or if you do not have the correct setup of the linking method used by the Livna.org packages (/etc/ld.so.conf and /etc/ld.so.conf.d/nvidia-glx.conf).

You can get a start by using this command, then look at the actual files it claims are being linked.. they are symlinks.
# ldd `which glxgears` | grep GL
# ldd `which glxinfo` | grep GL

Bradlis7
2004-10-05, 06:26 PM CDT
kbradl1, I am missing a lot of the files listed on there. I found these errors in the boot log:
Oct 4 12:18:02 brad nvidia-config-xfree86: execvp: No such file or directory
Oct 4 12:18:02 brad nvidia: Enabling nvidia driver failed
And I found this in the X.Org log:
(EE) Failed to load /usr/X11R6/lib/modules/extensions/nvidia/libglx.so
I couldn't find any of these files:
/usr/X11R6/lib/modules/extensions/libglx.so.x.y.z
/usr/X11R6/lib/modules/extensions/libglx.so -> libglx.so.x.y.z
/usr/lib/libGLcore.*

Do I need to go back and get the old rpms, and remove them maybe? Is there some documents on the libna site, cuz I havn't seen any.

LordMorgul
2004-10-05, 06:34 PM CDT
In the examples the .x.y.z are NOT literal characters but should be replaced with version numbers. Here is an example of the files you should find installed by the RPMs from livna.


-> rpm -ql nvidia-glx | grep lib
/usr/X11R6/lib/libXvMCNVIDIA.a
/usr/X11R6/lib/libXvMCNVIDIA.so.1.0.6111
/usr/X11R6/lib/modules/drivers/nvidia_drv.o
/usr/X11R6/lib/modules/extensions/nvidia
/usr/X11R6/lib/modules/extensions/nvidia/libglx.so
/usr/X11R6/lib/modules/extensions/nvidia/libglx.so.1.0.6111
/usr/lib/nvidia
/usr/lib/nvidia/libGL.so.1.0.6111
/usr/lib/nvidia/libGLcore.so.1.0.6111
/usr/lib/nvidia/libnvidia-tls.so.1.0.6111
/usr/lib/nvidia/tls
/usr/lib/nvidia/tls/libGL.so.1
/usr/lib/nvidia/tls/libnvidia-tls.so.1.0.6111

Note the 1.0.6111 is the version number corresponding to the nVIDIA driver you're using, it could be 1.0.6106 for example.

The libs are linked as follows:

-> ls -alFR /usr/lib/nvidia
/usr/lib/nvidia:
total 7840
drwxr-xr-x 3 root root 4096 Oct 4 04:40 ./
drwxr-xr-x 130 root root 69632 Oct 5 04:48 ../
lrwxrwxrwx 1 root root 21 Sep 28 01:31 libGLcore.so -> libGLcore.so.1.0.6111*
lrwxrwxrwx 1 root root 21 Sep 28 01:31 libGLcore.so.1 -> libGLcore.so.1.0.6111*
-rwxr-xr-x 1 root root 7428616 Sep 7 07:07 libGLcore.so.1.0.6111*
lrwxrwxrwx 1 root root 17 Sep 28 01:31 libGL.so -> libGL.so.1.0.6111*
lrwxrwxrwx 1 root root 17 Sep 28 01:31 libGL.so.1 -> libGL.so.1.0.6111*
-rwxr-xr-x 1 root root 450792 Sep 7 07:07 libGL.so.1.0.6111*
lrwxrwxrwx 1 root root 25 Sep 28 01:31 libnvidia-tls.so.1 -> libnvidia-tls.so.1.0.6111*
-rwxr-xr-x 1 root root 2108 Sep 7 07:07 libnvidia-tls.so.1.0.6111*
drwxr-xr-x 2 root root 80 Oct 4 04:40 tls/

/usr/lib/nvidia/tls:
total 20
drwxr-xr-x 2 root root 80 Oct 4 04:40 ./
drwxr-xr-x 3 root root 4096 Oct 4 04:40 ../
lrwxrwxrwx 1 root root 11 Sep 28 13:04 libGL.so.1 -> ../libGL.so*
lrwxrwxrwx 1 root root 25 Sep 28 01:31 libnvidia-tls.so.1 -> libnvidia-tls.so.1.0.6111*
-rwxr-xr-x 1 root root 2736 Sep 7 07:07 libnvidia-tls.so.1.0.6111*

Bradlis7
2004-10-05, 07:02 PM CDT
[brad@brad brad]$ ls -alFR /usr/lib/nvidia
/usr/lib/nvidia:
total 7440
drwxr-xr-x 3 root root 4096 Oct 4 13:27 ./
drwxr-xr-x 127 root root 69632 Oct 5 13:40 ../
lrwxrwxrwx 1 root root 21 Apr 10 18:41 libGLcore.so.1 -> libGLcore.so.1.0.5336
-rwxr-xr-x 1 root root 7091860 Sep 7 09:07 libGLcore.so.1.0.6111*
-rwxr-xr-x 1 root root 420976 Sep 7 09:07 libGL.so.1.0.6111*
-rwxr-xr-x 1 root root 2108 Sep 7 09:07 libnvidia-tls.so.1.0.6111*
drwxr-xr-x 2 root root 4096 Oct 4 13:27 tls/

/usr/lib/nvidia/tls:
total 12
drwxr-xr-x 2 root root 4096 Oct 4 13:27 ./
drwxr-xr-x 3 root root 4096 Oct 4 13:27 ../
lrwxrwxrwx 1 root root 21 Apr 10 18:41 libGLcore.so.1 -> libGLcore.so.1.0.5336
lrwxrwxrwx 1 root root 20 Oct 4 13:27 libGL.so.1 -> ../libGL.so.1.0.6111*
-rwxr-xr-x 1 root root 1836 Sep 7 09:07 libnvidia-tls.so.1.0.6111*
I got those results, but all links to libGLcore things have a red background. I guess that means that libGLcore doesn't exist. Anyone know how to fix this?

i686
2004-10-05, 07:47 PM CDT
Thanks..!

Drivers work well for me.. :)

i686