Installing Nvidia Drivers
By Austin Riba a.k.a "Fingel"
This guide is for people who have a distro that supports RPMs (Red Hat Mandrake etc.) If your distro does not support RPMs, see Mitch's excellent guide to installing from tar.gz at http://www.linuxquestions.org/questi...threadid=52021
Installing Nvidia drivers really isnt that hard, you just need to take it slow and know what you are doing. So read this first!
The first thing you need to do is go to Nvidia's website (actually the first thing would be to know what kind of video card you have, but I assume you do) and go to thier drivers selection page. Go do Graphics driver --> GeForce and TNT(if thats what you have, its all I know.)--> and there it will have a list of operating systems, 3 linux ones. Most people will have Linux IA32, and if you have Linux AMD64 or Linux IA64 you would probably know it. SO if you are unsure, I would go with IA32.
From there you will be presented with a long list of files to download, now, dont be discouraged, its not as menacing as it looks. Nvidia has supplied a nice little script called NVchooser that will help you choose which file to download.
Now this is not just a regular program that you download and double click to run. In fact, to download it you must right click on the link, and select "save link as" or something to that effect. Save it wherever you would like, most likely the home directory. Now that you have finished downloading NVchooser, navigate to the directory in which you downloaded it to. To change its permissions, (who can run it) you must right click it, select properties go to permissions and make sure that read write and execute are all selected for user(and group if you want). now you will be able to run it. Open up a terminal. When I did this, I didnt even know how to open a terminal so I will tell you how. In Red Hat, go to start menu, system tools, then terminal, other distros will probably have somthing to that effect. Now you have an open window with a promt that probably looks like this:
where User is your User name. By default, you will be in your home directory. If that is where you downloaded, you can type, "ls" to list all the files in your home directory. NVchooser should be in there. If you downloaded it somewhere else, like your destop, "cd" (change directory) to that directory. For example, if it was in your desktop directory, you would type:
[User@localhost User]$cd /home/user/Desktop
Now that you are in the same directory as NVchooser, you can actually execute it! Remember, Linux is case sensitive so type it exacly as you see it. To execute a shell script like NVchooser, you must put a ./ in front of it. For example:
[User@localhost User]$ ./NVchooser.sh
That will tell Linux to run it. You will see something like:
[User@localhost User]$ ./NVchooser.sh
Please download and install the following files:
For further installation directions, please see the README.
Those two files you see on your terminal are the ones you should download off Nvidia's website! Isn't that convienent? Most people with newer computers will be downloading NVIDIA_kernel-1.0-4191.src.rpm and NVIDIA_GLX-1.0-4191.i386.rpm. No matter which files you are downloading, put them into your home directory just to be easy. Now you have the drivers! hooray! You're not done yet, however. The next thing you must do is edit your XF86Config file.
***WARNING*** If you have downloaded the file called NVIDIA_kernel-1.0-4191.src.rpm (or anything with .src.rpm at the end) YOU MUST be sure you have your kernel source
installed. If you are in Red Hat, the kernel source comes in an RPM call kernel-source with your kernel version at the end. Go into your package managemnt system and make sure it is installed. There will be a section called kernel source, check that and thn install. If you are not in Red Hat, your kernel source will most likely be somewhere in the directory /usr/src See your distro's documentation on rebuilding your kernel's source***Warning***
The first thing you must do is switch over to root. So logout, and login as root. Then you are ready to proceed.For most people this file is located in /etc/X11 it is called XF86Config. You must change some things in this file. You dont need to be in the terminal for this, lucky for you. To edit the file, you must right click it and select "open with" and then choose what text editor you would like to use. Most people will either use "gedit" or "kwrite" for ease of use. Just clicking on the file will only display the contents. Once you have that open in a text editor. look for the section called
under that line there will be a whole bunch of indented lines that say things like Load "dbe" and Load "extmod" You must add a line that says
You also should remove the lines that read
if you have them, some people don't.
Now find the line that looks something like:
VendorName "Videocard vendor"
BoardName "NVIDIA GeForce 4 (generic)"
Replace the line Driver "nv" or Driver "vesa" with
Congratulations! You have finished modifying you config file. Just save it. If you see something like "could not save" again, you must be in root. Login as root and repeat the process over again.
Now we are in the homestretch, we are almost about to actaully install the drivers! For this next step, unfourtunatly, you cannot be in X Windows, You must exit to the command promt. That means you should either print or write the rest of this out.
To get to the command promt, first try pressing ctrl-alt-F1. If that dosnt work, try ctrl-alt-Backspace.( I realize that for some people ctrl-alt-Backspace restarts the X server, and if you press that after editing you XF86config file, X will freak out and say that it cant start. Make sure that you DONT run the config program. After that is should return you to the prompt. Sometimes it is easier to just edit /etc/inittab.) If niether work for you, read below:
***If ctrl-alt-F1 and ctrl-alt-backspace don't do anything or they just return you to the login screen, you must edit one more file. Navigate to /etc and look for the file called inittab. Open it in a text editor just like you did for you XF86 config file. Find the line that says :
change the 5 to 3 then restart your computer. You will then start back up in a command promt.***
Now that we are in a command promt make sure you are logged in as root. If you are unsure if you are, type
and then your password. In anycase, make sure the promt looks something like :
which means you are in root's home
it may look like:
which means that you are in User's home.
Assuming that you are not already in the directory in which the drivers a located, type
[root@localhost root]#cd /home/User
if you downloaded the drivers in User's home, where User is the name of the user account you downloaded them with. If you did not download them in the home dorectory, just ype "cd" and the direcotry in which they are located.
Now if you type "ls" you should see the 2 files on your screen. Here is where we install the drivers. If you downloaded NVIDIA_kernel-1.0-4191.src.rpm type:
rpmbuild --rebuild NVIDIA_kernel-1.0-4191.src.rpm
you will see a bunch of stuff go by on the screen. If it is a bunch of errors, you most likely dont have your kernel source installed, read above where I talked about that.
If everything has gone well, you should see a line that looks something like:
somewhere near the bottom. (the path may be different if you are not in Red Hat) In any case, cd to that directory. For example,
then type "ls" to look for the RPM. istall it by typing:
rpm -ivh NVIDIA_kernel-1.0-4191.rpm
If you downloaded a non src.rpm just a regular
rpm -ivh NVIDIA_kernel-1.0-4191.rpm
should do the trick. I have never done it that way, so correct me if I am wrong.
After installing the kernel rpm's you need to install the GLX package. When you typed "ls" you should have seen it there. For example, to install the GLX package you would type:
rpm -ivh NVIDIA_GLX-1.0-4191.i386.rpm
If you have done all of that without any errors, you should be very happy. Type:
to reboot your machine, and if when it starts back up again, you see the login screen you have been succcessful!
If you had edited you inittab file, after you restart your computer login as root at the prompt and then type
If X starts you have reason to celebrate!!! Go back to your /etc/inittab file and change
Then restart your computer again. now you should get the graphical login.
Hooray! Fire up tuxracer and enjoy your 3d Linux box. better yet, pick up a copy of Unreal Tournament fromt he greatest hits box and install it. Show your friends that you can play 3d games on Linux too!
Well that was exhausting. I hope you learned a little about how everything works.Was I helpful? Post any comments, suggestions or questions, or email me at: firstname.lastname@example.org
Post any mistakes you have found, I'm not perfect!