Configuring a NVIDIA graphics chip for CentOS and RHEL 5

Author(s)

Bill Giannikos (Home Page)

Introduction

This guide will help you configure the proprietary nvidia module under CentOS and Red Hat Enterprise Linux 5. For those that don't know, CentOS 5 and Red Hat Enterprise Linux 5 are basically the same thing just with a different name so this guide applies to both. I will not be covering the open source nv module included with Xorg because its configuration is normally handled automatically by most Linux distributions.

Licensing Issues

NVIDIA provide their own license for their driver. You will need to read and accept this license before proceeding. You can read this license here.

Notes

We will be using 'nano' as our text editor of choice but you can use whatever you wish.

While this guide is mainly focused to laptop users there isn't any difference for desktop users.

Prerequisites

You should run a full update for your installation to ensure you have all the latest packages installed.

Installing the NVIDIA driver

The nvidia driver is not included with CentOS/RHEL 5 so we will need to use a 3rd party repository. Here we will be using the ATrpms repository.

1. Load up a terminal window if you are in the graphic interface.

2. Switch to the root user by entering the command “su -” (without the quotes) and typing in your root password

3. Edit the file /etc/yum.conf. Using nano we type the command “nano -w /etc/yum.conf”

4. If you have already configured yum to use the ATrpms repository then append “*nvidia-graphics*” to the end of the “includepkgs” line and skip the next setup. Otherwise continue on.

5. Add the following to the bottom of this file:

[atrpms]
name=EL $releasever - $basearch - ATrpms
baseurl=http://dl.atrpms.net/el$releasever-$basearch/atrpms/stable
gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms
gpgcheck=1
enabled=1
exclude=*kmdl*i586*
includepkgs=*nvidia-graphics*

6. Save the file. In nano you press Ctrl-X, answer yes to the “Save modified buffer” question and then press enter on the file name to write.

7. If you have not previously setup ATrpms execute the following command:

rpm --import http://ATrpms.net/RPM-GPG-KEY.atrpms

8. Now execute the following command:

yum install nvidia-graphics169.07 nvidia-graphics169.07-kmdl-`uname -r`

9. Reboot your system and you will be using the nvidia driver.

Troubleshooting

Normally after installing the nvidia driver with the steps above your xorg.conf file should have automatically been updates to use the newer driver. If this did not happen or for some reason it has reverted then, as root, enter the following command:

nvidia-xconfig

This will switch you back to the nvidia driver.


Discussion

Matt, 2012/04/16 19:23

Step 7 should read:

rpm –import http://packages.atrpms.net/RPM-GPG-KEY.atrpms

jordy, 2011/11/12 07:39

I want to install nvidia-geforce 4800gs in centos 5.3(xen kernel). But at the time of executed the nvidia software the screen shows nvidia is not supported in xen kernel. Please help!!. My /var/log/nvidia-installer.log is below

nvidia-installer log file '/var/log/nvidia-installer.log'
creation time: Sat Nov 12 14:56:29 2011
installer version: 285.05.09

PATH:
/usr/lib/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/l
ocal/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

option status:

license pre-accepted               : false
update                             : false
force update                       : false
expert                             : false
uninstall                          : false
driver info                        : false
precompiled interfaces             : true
no ncurses color                   : false
query latest version               : false
no questions                       : false
silent                             : false
no recursion                       : false
no backup                          : false
kernel module only                 : false
sanity                             : false
add this kernel                    : false
no runlevel check                  : false
no network                         : false
no ABI note                        : false
no RPMs                            : false
no kernel module                   : false
force SELinux                      : default
no X server check                  : false
no cc version check                : false
run distro scripts                 : true
no nouveau check                   : false
run nvidia-xconfig                 : false
sigwinch work around               : true
force tls                          : (not specified)
X install prefix                   : (not specified)
X library install path             : (not specified)
X module install path              : (not specified)
OpenGL install prefix              : (not specified)
OpenGL install libdir              : (not specified)
utility install prefix             : (not specified)
utility install libdir             : (not specified)
installer prefix                   : (not specified)
doc install prefix                 : (not specified)
kernel name                        : (not specified)
kernel include path                : (not specified)
kernel source path                 : (not specified)
kernel output path                 : (not specified)
kernel install path                : (not specified)
precompiled kernel interfaces path : (not specified)
precompiled kernel interfaces url  : (not specified)
proc mount point                   : /proc
ui                                 : (not specified)
tmpdir                             : /tmp
ftp mirror                         : ftp://download.nvidia.com
RPM file list                      : (not specified)
selinux chcon type                 : (not specified)

Using: nvidia-installer ncurses user interface
→ License accepted.
→ Installing NVIDIA driver version 285.05.09.
→ Performing CC sanity check with CC=“cc”.
→ Performing CC version check with CC=“cc”.
→ Kernel source path: '/lib/modules/2.6.18-128.el5xen/source'
→ Kernel output path: '/lib/modules/2.6.18-128.el5xen/build'
→ Performing rivafb check.
→ Performing nvidiafb check.
→ Performing Xen check.
ERROR: The kernel you are installing for is a Xen kernel!

     
     The NVIDIA driver does not currently work on Xen kernels. If 
     you are using a stock distribution kernel, please install 
     a variant of this kernel without Xen support; if this is a 
     custom kernel, please install a standard Linux kernel.  Then 
     try installing the NVIDIA kernel module again.

ERROR: Installation has failed. Please see the file

     '/var/log/nvidia-installer.log' for details.  You may find suggestions
     on fixing installation problems in the README available on the Linux
     driver download page at www.nvidia.com.
salah, 2011/10/11 12:25

salah]# yum install nvidia-graphics169.07 nvidia-graphics169.07-kmdl-`uname -r`
Loaded plugins: fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
* base: tux.rainside.sk
* extras: tux.rainside.sk
* updates: tux.rainside.sk
atrpms | 3.5 kB 00:00
base | 3.7 kB 00:00
extras | 3.0 kB 00:00
updates | 3.5 kB 00:00
Setting up Install Process
No package nvidia-graphics169.07 available.
No package nvidia-graphics169.07-kmdl-2.6.32-71.7.1.el6.i686 available.
Error: Nothing to do

Nick, 2011/07/29 03:14

Rishan,
Try importing the key from here and then installing.
rpm –import http://packages.atrpms.net/RPM-GPG-KEY.atrpms
Worked for me.
Cheers

shrishailyam gawali, 2011/02/01 04:06

i have install redhat 5.but it is not in graphical mode…can i install the drivers for it???

Rishan, 2011/01/17 02:48

[root@localhost ~]# rpm –import http://ATrpms.net/RPM-GPG-KEY.atrpms
error: http://ATrpms.net/RPM-GPG-KEY.atrpms: import read failed(-1).
warning: u 0x25f0610 ctrl 0x25f18f0 nrefs != 0 (ATrpms.net http)
[root@localhost ~]# yum install nvidia-graphics9755-kmdl-`uname -r`nvidia-graphics9755
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* addons: mirror.sanctuaryhost.com
* base: mirrors.versaweb.com
* extras: linux.mirrors.es.net
* updates: mirrors.easynews.com
Setting up Install Process
No package nvidia-graphics9755-kmdl-2.6.18-194.el5nvidia-graphics9755 available.
Nothing to do

Rajesh Roshan, 2010/04/04 15:27

my graphic mode is not supported in rhel 5 but supported in rhel3 what i do?

Alexander, 2010/02/28 15:13

Centos + Nvidia
http://frit.su/index.php/CentOS%2BNvidia

mithun, 2009/08/03 21:01

I followed these instructions step by step but they did not work. When I start x, I get a message that says the nvidia kernel module cannot be found. When I type in “modprobe nvidia”, I get the following:

FATAL: Module nvidia_185_18_31 not found.

Any help is appreciated.

linux geek, 2010/01/15 05:51

the install will install a non PAE aware kernel, in your grub startup, you probably have to pick the non PAE one.

Wow, 2009/03/07 18:32

nVidia drivers are for nvidia.com, fglrx is for amd.com, and intels usually come installed by default.. there is NO nvidia for “entel” -_- I don't think he should be using Linux at all.

kamlesh, 2009/02/06 13:25

Hai I want Nvidia For my entel 945GCNL .

Enter your comment. Wiki syntax is allowed:
If you can't read the letters on the image, download this .wav file to get them read to you.
 
configuring_a_nvidia_graphics_chip_for_centos_and_rhel_5.txt · Last modified: 2009/09/19 07:52 by billg
Contact Us Sister Sites Privacy Policy Terms of Use
Copyright © 2006-2013 Linwik.com and other authors