How to install the NVIDIA drivers on CentOS 8 -

The NVIDIA Driver is a program needed for your NVIDIA Graphics GPU to function with better performance. It communicates between your Linux operating system, in this case CentOS 8, and your hardware, the NVIDIA Graphics GPU. The NVIDIA drivers can be installed by using the bash command after stopping the GUI and disabling the nouveau driver by modifying the GRUB boot menu.
This is a companion discussion topic for the original entry at

Very easy tutorial, but…
at every reboot I have to run

systemctl restart systemd-logind

Cause GDM server does not start and go on black screen.


I am running Centos 8 on a lenovo Thinkpad Carbon Extreme
I followed the instructions provided here and made sure I used the nvidia drivers for the card in my laptop and the external monitors started working! I am excited :slight_smile: Problem is now my laptop screen no longer works.
I would appreciate any suggestions.


You have to remove Red Hat Graphical boot from you grub configuration.
“vi /etc/default/grub” search for line “GRUB_CMDLINE_LINUX=” and remove rhgb at the end before “quiet”.

Then run grub2-mkconfig and reboot.

Just an add for people who run UEFI and Secure boot you can follow theses steps to sign Nvidia module.

Else nice post, thanks !

ERROR: Unable to find the kernel source tree for the currently running kernel
I’m still getting this even after the following guide how to fix that :frowning Tested on two difernt computers and no luck. Got stuck with nvidia drivers on centos. any idea?