# nVidia Driver Installation for Dummies

## Endor

Well I've been serching the forum for help with my nVidia Geforce 5900xt video card drivers, and although there are tons of people talking about the drivers I can't seem to find clear instructions on how to get this video card working.  I apologize if my noobitude has caused me to repeat a topic.

Here's what I've got so far:

Kernel Configuration Menu:

<*> VESA VGA Graphics Support

(*)vesafb-tng

(1280x1024@80) Default resolution New!

<*>nvidia Framebuffer Support

[*] Enable DDC Support

Kernel boot options in GRUB:

vga=0x307 video=vesafb:1280x1024@80

I also emerged nvidia-kernel and nvidia-glx.  I think I'm supposed to edit some config file for X11 but I can't find it.  I searched for a file called xf86config but to no avail.

So where did I go wrong?

----------

## asiB4

check this linky out...

http://www.gentoo.org/doc/en/xorg-config.xml

Chad

----------

## NTT

Youre thinking too much.   :Wink: 

You normally dont need to do anything in the kernel.

Just download the nvidia driver from the nvidia website. Its a .bin file.

Become root (su).

Make it executable (chmod 700 your nvidia driver file).

Run it (./nvidia-bla-bla-bla).

Follow the instructions on the screen, as your are running Gentoo, it will compile the driver for you.

Try "modprobe nvidia" to see if the module loads in your kernel. If you dont get an error message, all is ok.

If, afterwards you need to change the XF86Config, or Xorg.conf (remember that Linux has a case sensitive filesystem, so "XF86Config" is NOT the same file as "xf86config") - you'll find it under /etc/X11 (in fact, all configuration files live under /etc - the directory is there especially for system configuration...)

----------

## bjd

 *Quote:*   

> Kernel Configuration Menu: 
> 
> <*> VESA VGA Graphics Support 
> 
> (*)vesafb-tng 
> ...

 

That is to set up the framebuffer, which is separate to the nvidia drivers (used for the X server). The framebuffer will only give you a high res console while booting and pertty things like splash screen on booting. The "nvidia framebuffer support" has been known to casue issues with the Nvidia drivers, so best to remove that and recompile the kernel.

 *Quote:*   

> Kernel boot options in GRUB: 
> 
> vga=0x307 video=vesafb:1280x1024@80 
> 
> 

 

This again is only used to set the framebuffer resolution. The vga=0x307 is redundant as its not used with vesafb-tng. My advice would be to remove this for the time being, and the framebuffer support in the kernel (ie all the options in the above quote) until you have X setup and working.

 *Quote:*   

> 
> 
> I also emerged nvidia-kernel and nvidia-glx. I think I'm supposed to edit some config file for X11 but I can't find it. I searched for a file called xf86config but to no avail. 
> 
> 

 

OK, emerging nvidia-kernel and -glx has the nvidia drivers installed  :Smile:  The config you're looking for is /etc/X11/xorg.conf, this is assuming you emerged xorg-x11 as your X-server. It won't exist until you create it, there is an autosetup program supplied with X that i cant remeber the name of (xorgconfig?) which will guess most of it from probing hardware. Alternatively, there should be a /etc/X11/xorg.conf.example, which you can copy to xorg.conf and modify as appropriate. 

The Gento Nvidia guide covers what changes to make in xorg.conf.

 *Quote:*   

> 
> 
> Just download the nvidia driver from the nvidia website. Its a .bin file. 
> 
> Become root (su).
> ...

 

Why do this when portage handles this for you?

----------

## NTT

 *bjd wrote:*   

> Why do this when portage handles this for you?

 

Because for me, I use a certain version of the driver that works best. The version in portage freezes my PC (some no brand GeForce4 card).

----------

## PaulBredbury

 *NTT wrote:*   

> The version in portage freezes my PC.

 

There are several versions in Portage. Are you saying that the Gentoo ebuild is faulty, or you haven't run:

```
equery list -p -o -e nvidia-kernel
```

----------

## NTT

No i havent run that command, or looked any further if I could get any of the versions in portage besides the "default" to work, as imho its much easier just to download them form the nvidia website., and have the added advantage of avoiding the nice surprise of portage "updating" my nvidia kernel module, and freezing my PC.  :Wink: 

Portage is a nice system, and no doublt the best package management tool I've used on any Linux distribution, but sometimes I prefer not to use it, and just install files myself.

----------

## Endor

Ok so I'll remove the vga=0x307 from grub.conf and I'll leave video=vesafb:1280x1024-256@80 as my boot option.  I just realized that I left something out from my original post.  Is the color depth required and did I represent it correctly in this post?

Now let me make sure I get the kernel configuration correct.  I'll omit <*>nvidia Framebuffer Support and [*] Enable DDC Support  in the kernel config (make menuconfig).  So that only these are selected:

<*> VESA VGA Graphics Support

(*)vesafb-tng

(1280x1024@80) Default resolution New! 

Right?

----------

## jonnevers

 *NTT wrote:*   

> No i havent run that command, or looked any further if I could get any of the versions in portage besides the "default" to work, as imho its much easier just to download them form the nvidia website., and have the added advantage of avoiding the nice surprise of portage "updating" my nvidia kernel module, and freezing my PC. 
> 
> Portage is a nice system, and no doublt the best package management tool I've used on any Linux distribution, but sometimes I prefer not to use it, and just install files myself.

 

for the OP: disable the nvidia framebuffer support in the kernel it is NOT what you want. use the vesa(or preferably vesa-tng) and modify your gurb.conf as specified above. I know it sez nvidia specific framebuffer but disable it and forget about that option all togeither.

as for the nvidia drivers in portage. if you are using the stable ARCH versions which is the 6xxx series there is no doubt you'll experience problems with a 2.6.x kernel. You should alsways use the latest available nvidia-kernel and nvidia-glx packages in portage. This means the UNSTABLE arch (~x86 or ~am64 for example). Right now these are the 8xxx series and work well. In fact they are the exact binary drivers you download from their website anyway just stuck into an ebuild to be put in your system correctly.

I agree there are instances where it is simply easier to not use portage but seriously the nvidia binary drivers are not one of those instances.

----------

## NTT

Or, to make it very clear; none of the "framebuffer support" options in the kernel have anything to do with the nvidia driver for X. Enable them, disable them, do what you want, but they have nothing to do with the nvidia X driver. I have the whole "Support for frame buffer devices" in the kernel off. Not even as a module, just not selected. Its there just to get another resolution text console, not for Xorg/XFree. If you leave it unselected, you'll get a default plain textmode.

By the way, I use the 7174 nvidia driver after some trial and error (freeze  :Wink:  ) some months ago, which has worked good for me since that time. I dont do very much with 3d, sometimes in the weekend I start up enemy territory, but thats about it, so I dont see any reason to ever try another version too.  :Smile: 

----------

## jonnevers

 *NTT wrote:*   

>  so I dont see any reason to ever try another version too. 

 

famous last words. and not great advice to be propogating. imo.

- Jon

----------

## NTT

 *jonnevers wrote:*   

>  *NTT wrote:*    so I dont see any reason to ever try another version too.  
> 
> famous last words. and not great advice to be propogating. imo.

 

May I ask why not? Why upgrade a driver thats working excellent, when a new one would have nothing else/new to offer? After all, its only a driver, and one that works well too.

----------

## BitJam

 *NTT wrote:*   

> No i havent run that command, or looked any further if I could get any of the versions in portage besides the "default" to work, as imho its much easier just to download them form the nvidia website., and have the added advantage of avoiding the nice surprise of portage "updating" my nvidia kernel module, and freezing my PC. 
> 
> Portage is a nice system, and no doublt the best package management tool I've used on any Linux distribution, but sometimes I prefer not to use it, and just install files myself.

 

NTT, you have chosen the path of pain.

Your approach was valid some years ago before the advent of the /etc/portage/* files.  Here are the lines I needed to add in order to have portage respect my choice of Nvidia driver (7174): 

```
==> /etc/portage/package.keywords <==

media-video/nvidia-kernel ~x86

media-video/nvidia-glx ~x86

app-admin/eselect ~x86

app-admin/eselect-opengl ~x86

==> /etc/portage/package.mask <==

>=media-video/nvidia-kernel-1.0.7667

>=media-video/nvidia-glx-1.0.7667
```

IMO, it is much better to customize portage to fit my system rather than customize my system (via non-portage installs) to fit portage.

Once you learn how to use the /etc/portage/* files and how to use a portage overlay (usually /usr/local/portage), it is pretty easy to make portage respect your own selections of which versions of what to install and even your own custom software patches.

Years ago, portage was flawed because after time "emerge -uD world" was bound to become broken due to customization.  AFAIK, that has been fixed now and it is straightforward to keep "emerge -uD world" doing what you want.  Also, using the /etc/portage/* files and an overlay keeps all the selections and customizations well documented, which makes my life much easier in the long run.

Finally, by using the portage system as it was designed to be used instead of doing an end-run around it, I at least give the devs a fighting chance at making everything on my system work together properly.   They are usually quite responsive when I file bug reports.  But as soon as you starting doing things like installing Nvidia without using portage, they really can't help you anymore.

----------

## makomk

 *NTT wrote:*   

> Or, to make it very clear; none of the "framebuffer support" options in the kernel have anything to do with the nvidia driver for X. Enable them, disable them, do what you want, but they have nothing to do with the nvidia X driver. I have the whole "Support for frame buffer devices" in the kernel off. Not even as a module, just not selected. Its there just to get another resolution text console, not for Xorg/XFree. If you leave it unselected, you'll get a default plain textmode.

 

Not entirely true. If you enable the "nvidia" or "rivafb" framebuffers, it typically stops the NVidia driver for X from working (the kernel module fails to find any cards, since they've been claimed by the framebuffer code). Other than that, either vesafb, vesafb-tng, or no framebuffer support at all should work fine.

----------

