How to install the NVIDIA drivers on CentOS 8 - LinuxConfig.org

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 https://linuxconfig.org/how-to-install-the-nvidia-drivers-on-centos-8

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.

Thanks

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.

Hi,

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?

Hello Everyone!
I have the same problem as Giacomo_D.
NVIDIA 440.82 + 4.18.0-147.8.1.el8_1.x86_64 but always a black screen after login.
Did anyone found a solution to this?
Remove rhgb from grub didn’t help, systemctl restart systemd-logind worked only for a while.
Thanks in advance

Should be pointed out that (as near as I can tell) the drivers do not work with GNOME Wayland. You need to be using a different windowing system to install the drivers.

I actually got it to work for a couple of hours, but a CENTOS update broke it. And it no longer works. I’ve been crawling all over the internet for several days to find a solution and have found no one who has made the NVIDIA drivers function with GNOME Wayland.

If anyone finds otherwise, I’d love the link!

When it asked me this question
“Would you like to run the nvidia-xconfig utility to automatically update your X configuration file so that the NVIDIA X driver will be used when you restart X? Any pre-existing X configuration file will be backed up.”

I said yes & then when given the prompt I wrote:
reboot

then another CentOS on the grub was created & it doesn’t boot

can you please help?

Simply remove /etc/X11/xorg.conf file created by NVIDIA and reboot. If you could not get into console reboot and choose recovery after CTRL+ALT+F2.

So I have tried to follow your instructions and have hit an issue.

I have gotten to the point where I restart and I am at a command prompt and I then log into root. But when i run the Nvidia drivers I get the error on the image below.

Now I am stuck in the command line and can’t get the GUI back, I have tried - systemct1 enable multi-user.target and it says command not found.

How do I get the GUI back?