Installing Nvidia Drivers on RHEL or CentOS 7

Most users of Nvidia graphics cards prefer to use the drivers provided by Nvidia. These more fully support the capabilities of the card when compared to the nouveau driver that is included with the distribution. These are the steps to install the Nvidia driver and disable the nouveau driver.

  • yum -y update
  • yum -y groupinstall “GNOME Desktop” “Development Tools”
  • yum -y install kernel-devel
  • Edit /etc/default/grub. Add “rd.driver.blacklist=nouveau nouveau.modeset=0” to “GRUB_CMDLINE_LINUX”
  • grub2-mkconfig -o /boot/grub2/grub.cfg
  • List available kernels: awk -F\’ ‘$1==”menuentry ” {print $2}’ /etc/grub2.cfg
  • Use grub2-set-default to set the updated kernel to the default. The kernels are enumerated starting at 0
  • Reboot
  • Download the appropriate Nvidia driver for your card
  • Switch from graphical to text mode: systemctl isolate multi-user.target
  • Run the Nvidia driver installer
  • Remove the nouveau driver: yum remove xorg-x11-drv-nouveau
  • Backup old the old initramfs: mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)-nouveau.img
  • Create new initramfs: dracut /boot/initramfs-$(uname -r).img $(uname -r)
  • Reboot
Share Button

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.