Disable Secure Boot and SELinux
Disabling Secure Boot and SELinux may not be necessary for every
setup.
SELINUX line to:
Ensure the GPUs are Installed
Ensure that the lspci command is installed (which lists the PCI devices connected to the server):Nvidia, then the GPU is not properly
installed. Otherwise, you should see the make and model of the GPU devices that
are installed.
Disable Nouveau
Blacklist Nouveau in Modprobe
The nouveau driver is an alternative to the Nvidia drivers generally installed on the server. It does not work with CUDA and must be disabled. The first step is to edit the file at /etc/modprobe.d/blacklist-nouveau.conf. Something like:Update Grub to Blacklist Nouveau
-
On RHEL 6
Backup your grub config:
Edit your grub config and add
rdblacklist=nouveauto the end of any lines starting withkernel. For example: -
On RHEL 7
Backup your grub config templates:
Then, update your grub config template at /etc/sysconfig/grub. Add
rd.driver.blacklist=grub.nouveauto theGRUB_CMDLINE_LINUXvariable. For example, change:to:Then, rebuild your grub config:
Regenerate the Initramfs Image
Backup the old initramfs image, generate a new initramfs image, disable any graphical logins and reboot the server:Exiting X
The Nvidia driver will not allow you to install a new driver while X is open, so if X is enabled, it must first be exited. The simplest way to exit X is to switch to a TTY console using Ctrl-Alt-F1, login, and run:-
On RHEL 6
Disable the graphical login and reboot as follows (adjust for the login
manager that is running):
-
On RHEL 7
Disable the graphical login as follows (adjust for the login manager that is
running):
Ensure the Nouveau Driver is Disabled
After the reboot has completed, check to ensure that the nouveau driver has been disabled:Prerequisites
Several prerequisites should be installed before installing the Nvidia drivers.-
Install the EPEL repo:
-
Upgrade the kernel and restart the machine:
-
Install the dependencies:
Install Drivers Only
To accommodate GL-accelerated rendering, OpenGL and GL Vendor
Neutral Dispatch (GLVND) are now required and should be installed
with the Nvidia drivers. OpenGL is an installation option in the
*.run type of drivers. In other types of the
drivers, OpenGL is enabled by default in most modern versions
(dated 2016 and later). GLVND can be installed using the
installer menus or via the --glvnd-glx-client command line
flag.*.run executables
provided by Nvidia.
To download only the drivers, navigate to http://www.nvidia.com/object/unix.html
and click the Latest Long Lived Branch version under the appropriate
CPU architecture. On the ensuing page, click Download and then click
Agree and Download on the page that follows.
The Unix drivers found in the link above are also compatible with all
Nvidia Tesla models.
lspci command
should give you that information:
Troubleshoot the Nvidia Installer
One common issue with installing the Nvidia driver is that it will fail out because the Nvidia driver taints the kernel. The issue is that the driver is not signed and the default install does not attempt to sign it, but the kernel is expecting a signed driver. If you encounter this error, you should re-run the install in expert mode:kernel-devel version and the
system kernel version don’t match up, the Nvidia driver install will not
proceed after accepting the license. To fix this issue:
Other Reference Material
Nvidia has a large readme online at:x86 for version 375.26, the readme is online at:
Test the Nvidia Installation
After the Nvidia drivers are installed, you can test the installation by running the command:Multiple Driver Failure
If an error is returned, stating:1 or the version of the
Nvidia driver that you installed, for example .375.21.
Restart X Server
Enable X
If you disabled the X Server to install your Nvidia driver, enable it now. First, check which service is responsible for the X Server:lightdm service, for the case where
lightdm is responsible for the X Server . Adjust for the particular
service running on your server from the above command.
-
On RHEL 6:
-
On RHEL 7: