How to install NVIDIA driver (proprietary) and uninstall Nouveau driver (open source) in Linux server

  • Start your Linux server in text mode. GUI mode will give an error while uninstalling the Nouveau driver or installing the NVIDIA driver.
  • Remove Nouveau driver: Open /etc/default/grub in text editor [vi] and add the following option to GRUB_CMDLINE_LINUX


  • On root shell, execute the following command to build the /boot/grub2/grub.cfg as follows:

grub2-mkconfig -o /boot/grub2/grub.cfg [BIOS servers] grub2-mkconfig -o /boot/efi/EFI/seimaxim/grub.cfg [UEFI servers]

  • Reboot Linux server.
  • Install NVIDIA driver: Download NVIDIA driver from the NVIDIA website. Use YUM to install the following dependencies.

yum install gcc make kernel-headers kernel-devel acpid libglvnd-devel pkgconfig libglvnd-glx libglvnd-opengl

  • Build initramfs: Backup current initramfs.

mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)-nouveau.img

  • Install new initramfs.

dracut /boot/initramfs-$(uname -r).img $(uname -r)

At this point, a server reboot is required. After the server comes up, check if the NVIDIA driver module is loaded.

Leave a Reply