LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   LinuxQuestions.org Member Success Stories (https://www.linuxquestions.org/questions/linuxquestions-org-member-success-stories-23/)
-   -   complete Idiot's guide to Nvidia drivers (https://www.linuxquestions.org/questions/linuxquestions-org-member-success-stories-23/complete-idiots-guide-to-nvidia-drivers-50126/)

Fingel 03-16-2003 02:37 PM

complete Idiot's guide to Nvidia drivers
 
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:

[User@localhost User]$

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:
NVIDIA_kernel-1.0-4191.src.rpm
NVIDIA_GLX-1.0-4191.i386.rpm
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

Section "Module"

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

Load "glx"

You also should remove the lines that read
Load "dri"
Load "GLcore"
if you have them, some people don't.
Now find the line that looks something like:

Section "Device"
Identifier "Videocard0"
Driver "nv"
VendorName "Videocard vendor"
BoardName "NVIDIA GeForce 4 (generic)"
EndSection

Replace the line Driver "nv" or Driver "vesa" with

Driver "nvidia"

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 :

id:5:initdefault:

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

su root

and then your password. In anycase, make sure the promt looks something like :

[root@localhost root]#
which means you are in root's home
it may look like:

[root@localhost User]#
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:

wrote: /usr/src/redhat/RPMS/i386/NVIDIA_kernel-1.0-4191.rpm

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,

cd /usr/src/redhat/RPMS/

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:

reboot

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

startx

If X starts you have reason to celebrate!!! Go back to your /etc/inittab file and change

id:3:initdefault:

back to:

id:5:initdefault:

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: hmblinuxkid@punkass.com
Post any mistakes you have found, I'm not perfect!

digsy 03-25-2003 01:45 AM

Thank you very much Fingel for posting this!!!
I could install a driver thanks to you!
I can't believe nobody replied to this yet, or am I the only idiot here? ;)

heavyarmor4ever 03-25-2003 10:20 PM

nVidia
 
Thanks Fingel!! Linux rules. This was a big help
Later

macewan 03-26-2003 06:42 PM

awesome! thanks for posting that.

Fingel 03-27-2003 11:59 PM

No prob guys, I'm glad it was a help.

dragonfly 06-12-2003 05:08 AM

emegency
 
Dear:
I'm grateful that you open my urgent email.My trouble is: after I finished installing the Linux,it could boot well with Window Me.But one day,we I power up my computer,the boot just failed unwarningly.It just give me a black screen with GRUB configuration which I didn't know how to operate.Then every time I restarted the computer,it just gave me the same black screen with the same damn GRUB,my Linux and Window Me couldn't boot normally .I simply didn't know what had I done wrong.So I reinstalled Window XP Pro.Luckily It worked,but my Linux missing.I used to run PartitionMagic 8.0 to exam if my ext3 partition had corrupted,but it remained ok,which convinced me that there must be something wrong with the bootloader.It might be that after my installing the WinXP the WinXP's bootloader had overlapped the GRUB or LILO,so no matter I'm right or not ,Please show me the right way out.YOU ARE MY ONLY SAVIOR !!!!!THANX.


Yours
dragonfly

fsbooks 06-12-2003 06:59 AM

dragonfly ...

obviously if you are posting your problem in a thread entitled "complete Idiot's guide to Nvidia drivers" you have a problem putting things in the right place.

Sorry, forgive the flame. Try again in a new thread.

JoC 06-12-2003 07:49 AM

thanks for the bible Fingel!

i am sure it will reduce the ammount of people asking the quetion of HOW DO I INSTALL MY NVIDA DRIVERS

lol

thanks again

The SIN Raven 06-14-2003 09:22 AM

Soooo many thanks Fingel...
The newbie here it's getting so adicted to THE OPERETION SYSTEM that Linux is....
I'd install the drivers with sucess...
Man games in Linux rock mi world...
Again thanks broo, and keep up the good work...
Best: The SIN Raven

xoros 06-15-2003 09:12 AM

nice post !! thanks that helps alot !

Just thought this may help too..

Nvidia does not provide rpms anymore i guess.
here is the link to the nvidia's install instructions:

ftp://download.nvidia.com/XFree86/Li...363/README.txt

here is the link to download the drivers

http://www.nvidia.com/view.asp?IO=linux

willcox 07-08-2003 06:51 PM

Fingel, should I say angel?
Everything was working fine, but my problem was that I upgraded from RH8 to 9. Logically, my server’s kernel have changed.
Well, by these times, I'm able to run my server only in text mode, cause "no screens found"..Fatal error 10 etc. etc. I ran ./NVchooser.sh... my kernel needs this driver: NVIDIA_kernel-1.0-4191.src.rpm...
I'm a MD (high newbie obviously!) don't have enough time to study all the commands needed to download & install this file in text mode...of course; I know that for you could be a "piece of cake" but I wish I could find something like I found in this place: "Complete idiot's guide to Nvidia drivers" wrote by Fingel (are you m/f?)..... BUT (PLEASE!) IN TEXT MODE...or tell me about some place to find this info...thx! at least for read this. willcox@linuxmail.org

alba 07-09-2003 08:43 AM

very nice, i'll do this now :)

scottwest2 07-10-2003 01:30 PM

thanks for the help

MBtronics 07-12-2003 07:23 AM

Nice guide, but could it be that Red Hat Linux 9 doesn't support the latest nVidia drivers?

Fingel 09-17-2003 09:55 PM

Yeah new distros should use the new nvidia installer. If your using an old distro that needs the old RPMs this should still apply.


All times are GMT -5. The time now is 07:57 PM.