Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Find the nvidia graphics (video) model number.

#$ lspci | grep -i nvidia

An example of what the output looks like (this is just the graphics card line from the output):

...

An example of how to directly download one of the above using a command line:

# mkdir /scswork/ksa
#$ cd /scsworkvar/ksatmp
#$ curl -sLO 'http://us.download.nvidia.com/XFree86/Linux-x86_64/410.78/NVIDIA-Linux-x86_64-410.78.run

Install the DKMS rpm (this should be automatically available from the EPEL yum repository)

#$ sudo yum install dkms

Installing the dkms rpm should also prompt you to install the kernel-devel RPM (as a dependency).  If you already have the kernel-devel RPM installed, you won't get prompted.  The kernel-devel RPM is required for the nvidia kernel module to be built.  DKMS is not supplied or supported by Red Hat.  But packages available in EPEL usually work well with RHEL.

You can view the help info (optional) with this command (use -A to view "Advanced help options)

#$ /bin/sh ./NVIDIA-Linux-x86_64-[version].run --help
#$ /bin/sh ./NVIDIA-Linux-x86_64-[version].run -A

...

This is required by the nvidia installer.  This will kick off anyone who is logged in at the video console.  So check to see if anyone is logged in at ":0" which is the video console.  You can use the 'w' command for this.  Here is an example of someone logged in at the video console:

[root@lclsksa@ksa-fairleylinux01 ~]#$ w
USER    USER   TTY     TTY    FROM             FROM    LOGIN@   IDLE   JCPU   PCPU WHAT
dfairley tty1    ksa tty1   :0              0      Tue07   27:54m  0.00s  0.04s pam: gdm-password

 

If no one is logged in at ":0", or you get the OK to stop the graphical X server, then switch to runlevel 3:

#$ sudo init 3

Run the installer (this installs and builds without any questions):

#$ sudo /bin/sh ./NVIDIA-Linux-x86_64-[version].run --dkms --run-nvidia-xconfig --no-questions

...

If you prefer to have an interactive installation, so you can read and answer the questions during the install:

#$ sudo /bin/sh ./NVIDIA-Linux-x86_64-[version].run

 

Next

...

: reboot (or just switch back to run level 5)

...

A reboot is optional -- but recommended for verification that everything works after a reboot.

If you do not reboot, then switch back to run level 5 with this command:

#$ sudo reboot
or
$ sudo init 5

The "init 5" command will

...

restart the graphical login program, assuming the nvidia install/config was successful.


The following command will tell you which kernels have the nvidia module installed:

#$ find /lib/modules | grep nvidia.ko

After the reboot, this is how to verify the nvidia module is being used and the install was successful (look for gdm in the output from the last ps tree command below).

#$ lsmod | grep nvidia
#$ ps axuww | grep X
#$ ps axuwwf | less

There are also nvidia and X server log files which can be viewed.

$ less /var/log/nvidia-installer.log
$ less /var/log/Xorg.0.log

How does a kernel install trigger an nvidia rebuild using DKMS?

...

  1. https://nouveau.freedesktop.org/

Nvidia and linux

  1. Good background and explanation about nvidia and linux.  Ignore the distribution specific (gentoo) instructions which are not relevant.
    https://wiki.gentoo.org/wiki/NVidia/nvidia-drivers