Versions Compared

Key

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

Automatic build and install of the Nvidia kernel module/driver using Dynamic Kernel Module Support (DKMS).

Red Hat based systems ship with an nvidia-compatible graphics kernel module, and user space X11 driver) called nouveau.  Keeping this default configuration is recommended because nouveau is supported by Red Hat and is provided with each new kernel update.

...

As of 2018-Dec, this process has only been tested on RHEL 6.  I believe the process should be very similar on CentOS 7 (or RHEL 7), but I haven't tested it myself yet. 


...

1. Find the nvidia graphics (video) model number.

...

$ cd /var/tmp
$ curl -sLO 'http://us.download.nvidia.com/XFree86/Linux-x86_64/410.78/NVIDIA-Linux-x86_64-410.78.run'

 


You can view the help info (optional) with this command (use -A to view "Advanced help options).  But just view the help options, don't run the installer yet.

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

...

ksa@ksa-linux01 $ w
USER   TTY    FROM    LOGIN@   IDLE   JCPU   PCPU WHAT
ksa tty1   :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 /bin/sh ./NVIDIA-Linux-x86_64-[version].run --accept-license --dkms --run-nvidia-xconfig --no-questions

...

Code Block
languagebash
cat /etc/kernel/postinst.d/notify 
#!/bin/sh

cat <<EOF | mail -r unix-admin@slac.stanford.edu -s "$1 installed on `hostname`" ksa@slac.stanford.edu
New kernel was installed on `hostname` at `date`.

$1
$2
EOF

 

References:

...


Log file of automatic nvidia build:

DKMS logs are saved here:

Code Block
languagebash
$ ls -l /var/lib/dkms/nvidia/
total 4
drwxr-xr-x 5 root bin 4096 Jan 17 02:22 410.78
lrwxrwxrwx 1 root bin   40 Jan 17 02:22 kernel-2.6.32-754.10.1.el6.x86_64-x86_64 -> 410.78/2.6.32-754.10.1.el6.x86_64/x86_64
lrwxrwxrwx 1 root bin   39 Dec  7 15:45 kernel-2.6.32-754.3.5.el6.x86_64-x86_64 -> 410.78/2.6.32-754.3.5.el6.x86_64/x86_64
lrwxrwxrwx 1 root bin   39 Dec  7 15:51 kernel-2.6.32-754.9.1.el6.x86_64-x86_64 -> 410.78/2.6.32-754.9.1.el6.x86_64/x86_64

And here is the log for the automatic dkms build of the nvidia driver which was triggered by the install of the kernel-2.6.32-754.10.1.el6.x86_64 RPM:

Code Block
languagebash
$ ls -l /var/lib/dkms/nvidia/410.78/2.6.32-754.10.1.el6.x86_64/x86_64
total 8
drwxr-xr-x 2 root bin 4096 Jan 17 02:22 log
drwxr-xr-x 2 root bin 4096 Jan 17 02:22 module



...

References:

DKMS

...