You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Red Hat based systems ship with a nvidia-compatible graphics kernel module (nouveau).  However, in some situations the 3rd party proprietary graphics kernel module from nvidia is needed instead.  This 3rd party kernel module is not supplied or supported by Red Hat.  With each new kernel, a 3rd party kernel module (like the proprietary nvidia one) needs to be rebuilt.  This process can be tedious and confusing (eg, why did my graphical login break after a reboot?).  There is a facility named "DKMS" which stands for Dynamic Kernel Module Support.  This enables the automatic rebuild of 3rd party kernel modules at the time of the new kernel installation.  This is done via hooks which are present in the kernel post-install RPM scriplet.  This document describes how to install the nvidia kernel module with DKMS support, so a manual rebuild of the nvidia kernel module is no longer required for every new kernel.

 

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):

01:00.0 VGA compatible controller: NVIDIA Corporation GP107GL [Quadro P600] (rev a1)

A google search for 'nvidia linux' finds the nvidia linux download page:
https://www.nvidia.com/object/unix.html


Under the "64 bit" section at the top of that page, select  "Latest Long Lived Branch Version".
It currently looks like this:
Linux x86_64/AMD64/EM64T
Latest Long Lived Branch Version: 410.78

After selecting the latest long lived branch above, then select the "Supported products" tab, and search for the model name/number from step 1 above.  From the example in step 1, I found "Quadro P600" in the list of supported products.  If you cannot find your model number, you may have to look in the legacy versions (go back to step 3 above).

Click download.  The current link (NON-legacy) from above is (as of 2018-Dec-7):
http://us.download.nvidia.com/XFree86/Linux-x86_64/410.78/NVIDIA-Linux-x86_64-410.78.run

And the current LEGACY driver as of 2018-Dec-10 is (for older graphics cards)
http://us.download.nvidia.com/XFree86/Linux-x86_64/390.87/NVIDIA-Linux-x86_64-390.87.run

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

# mkdir /scswork/ksa
# cd /scswork/ksa
# 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)

# yum install dkms

Installing dkms should also install the required kernel-devel RPM (if it's not already installed).
The kernel-devel RPM is needed to build the nvidia kernel module.

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

Stop the currently running X server by changing to run level 3.  This is required by the nvidia installer.
This will kick off anyone who is logged in at the video console.

# init 3

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

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

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

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

 

The installer will build any required kernel modules.  This could take quite a while (several minutes to 10s of minutes).

Next, reboot.  This is optional -- but recommended for verification that everything works after a reboot.

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.

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

 

 

References:

DKMS
https://en.wikipedia.org/wiki/Dynamic_Kernel_Module_Support

Kernel Module Weak Updates
https://trapsink.com/wiki/Kernel_Module_Weak_Updates

  • No labels