Tuesday, April 10, 2012

HowTo: Install NVIDIA drivers on CentOS 6.2 / SL 6.2

By default, RHEL clones such as CentOS 6.2 and SL 6.2 assign the nouveau X11 driver to NVIDIA graphics card. nouveau is a fine driver, miles away from the old nv; however if you want 3D performance (or a compiz powered desktop) you'll need to turn to NVIDIA and its closed source drivers.

CentOS official repositories don't contain packages for NVIDIA closed source driver so one needs to add a third party repository that has the driver available, such as the ELRepo repository.

Adding the ELRepo consists of importing the public GPG key and installing the repository:
# rpm --import http://elrepo.org/RPM-GPG-KEY-elrepo.org 
# rpm -Uvh http://elrepo.org/elrepo-release-6-4.el6.elrepo.noarch.rpm 
Having added the repository we can finally install the driver (yum pulls nvidia-x11-drv as a dependency) and reboot:
# yum install kmod-nvidia
# reboot
Know Issues
By installing NVIDIA closed source drivers, the plymouth graphical boot will no longer be available. In other worlds, the pretty CentOS and SL logos on a black background will be replaced by a bottom horizontal progress bar.

4 comments:

toracat said...

If you'd like to get the plymouth stuff, follow the instructions on:

http://elrepo.org/tiki/kmod-nvidia

Section "Plymouth graphical boot no longer available on EL6"

tangram said...

Hi!

Thanks for the input. I'll be updating the post on a new future on how to re-enable plymouth including how probe for graphics card supported modes.

If I have the time I'll also explain how to remove NVIDIA closed sources drivers and re-enable nouveau drivers.

Best regards.

aurfalien said...

Hi,

After installing kmod-nvidia and upon reboot, I get some errors in my messages file;

kernel: NVRM: The NVIDIA GeForce4 MX 4000 GPU installed in this system is
kernel: NVRM: supported through the NVIDIA 96.43.xx Legacy drivers. Please
kernel: NVRM: visit http://www.nvidia.com/object/unix.html for more
kernel: NVRM: information. The 295.40 NVIDIA driver will ignore
kernel: NVRM: this GPU. Continuing probe...
kernel: NVRM: No NVIDIA graphics adapter found!
gdm-binary[2013]: WARNING: GdmDisplay: display lasted 0.548291 seconds
gdm-binary[2013]: WARNING: GdmLocalDisplayFactory: maximum number of X display failures reached: check X server log for errors

And in Xorg.0.log;

[ 37.145] (EE) NVIDIA: Failed to load the NVIDIA kernel module. Please check your
[ 37.145] (EE) NVIDIA: system's kernel log for additional error messages.
[ 37.145] (II) UnloadModule: "nvidia"
[ 37.145] (II) Unloading nvidia
[ 37.145] (EE) Failed to load module "nvidia" (module-specific error, 0)
[ 37.145] (EE) No drivers available.
[ 37.145]
Fatal server error:
[ 37.145] no screens found
[ 37.145]

I am using a GeForce vs a Quadro.

Any ideas?

Thanks in adance.

tangram said...

Hi aurfalien!

kmod-nvidia driver is the current release and supports NVIDIA GeForce 6 series GPUs onwards.

The kmod-nvidia-96xx driver supports GeForce 2 to GeForce 4 series GPUs which appears to be your case.

You can check you graphics card by running lspci | grep VGA.

So if you've imported the GPG and added the repository, just run yum install kmod-nvidia-96xx as root.

Regards.