http://us.download.nvidia.com/XFree86/L ... river.html
I need cuda in a work environment and prefer getting it directly from nvidia as a .run file. The cuda install includes the graphics driver, and the correct one for the given version of cuda. I also prefer the confidence of getting it directly from nvidia based on my specific graphics card (quadro vs geforce vs tesla and so on) and know that i am getting the latest version from the source.
The problem with manually installing like this even if it was just the graphics driver is that (1) you have to drop to runlevel 3 {multi-user.target} to do the install then go to runlevel 5 {graphical.target}. Not really hard but extra work nonetheless...
good software makes the computer do the work for you. And (2) whenever you have a kernel update the nvidia graphics driver (because it's a kernel module) is lost and will result in a failed boot going to runlevel 5 {graphical.target}.
The solution I have found is to install
DKMS and make sure that is installed prior to installing the nvidia .run file at runlevel 3, and you will see a mention of "dkms" during the nvidia graphics driver install. Then later on when a kernel update happens, the graphics driver is preserved and everything's happy thanks to dkms.
The hard manual way without dkms is to
systemctl set-default multi-user.target and always boot to a non graphical runlevel 3. This will guarantee a successful boot and a system that is accessible, this way when a kernel update happens without dkms and the nvidia kernel module is lost the system will boot to a usable state... because after the kernel update you will forget to manually reinstall the nvidia driver and only realize it when the graphical login screen is thrashed- then you have to reboot and prevent going to runlevel 5 to reinstall nvidia.
Couple other requirements are you have the kernel source rpm installed (which is almost always there anyway) otherwise the nvidia.run file will fail to build the nvidia kernel module. And you have to deal with grub2 and disable nouveau but at least this is a one time thing.
With DKMS basically you install nvidia one time and can forget about it for all subsequent linux kernel updates via yum, which is what most people will care about. And then if you choose to update nvidia you just do what you did previously- runlevel 3 and execute the .run file and make sure dkms catches it.
Code: Select all
# edit /etc/default/grub
# i think any of the 3 is sufficient to disable nouveau
GRUB_CMDLINE_LINUX = rhgb verbose modprobe.blacklist=nouveau rd.driver.blacklist=nouveau nouveau.modeset=0"
grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg {or wherever grub.cfg resides}
# need to do this prior to rebooting to runlevel 3 {multi-user.target} to manually install nvidia .run graphics driver
# i prefer verbose rather than quiet.
that's what i know and have experienced with nvidia and centos/rhel 7.6 on home pc and work servers.