How to install the NVIDIA drivers on Fedora 28 Linux

The NVIDIA Driver is a software necessary for your NVIDIA Graphics GPU to function with better performance. It exchanges information between your Linux operating system, in this case Fedora 28 Linux, and the hardware in question, in this case the NVIDIA Graphics GPU.

In this guide you will learn how to install NVIDIA Drivers on Fedora 28 Linux. First, we will be disabling the default nouveau opensource NVIDIA Drivers and then install the official NVIDIA Driver by using the Linux terminal command.

To install Nvidia driver on other Linux distributions, follow our Nvidia Linux Driver guide.

In this NVIDIA Drivers installation guide you will learn:

  • How to identify your NVIDIA graphic card model.
  • Where to download the NVIDIA driver package for Fedora 28.
  • How to install prerequisites for a successful Nvidia Driver compilation and installation.
  • How to disable nouveau Driver on Fedora 28.
  • How to successfully install NVIDIA Drivers on the Fedora 28 operating system.
Installed Nvidia drivers on Fedora 28 Linux GNOME desktop

Installed Nvidia drivers on Fedora 28 Linux GNOME desktop running graphic card benchmark.

Software Requirements and Conventions Used

Software Requirements and Linux Command Line Conventions
Criteria Requirements
Operating System Fedora 28 Linux or higher
Software Existing Desktop installation such as GNOME, KDE etc.
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ – requires given linux commands to be executed as a regular non-privileged user

How to install the official NVIDIA drivers on Fedora 28 Linux step by step instructions

  1. Open up terminal and identify your Nvidia graphic card model by executing:


    $ lspci -vnn | grep VGA
    01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP106 [GeForce GTX 1060 6GB] [10de:1c03] (rev a1) (prog-if 00 [VGA controller])
    
  2. Download the Nvidia driver package from nvidia.com using search criteria based on your Nvidia card model and your Linux operating system.Alternatively, if you know what you are doing you can download the driver directly from the Nvidia Linux driver list. Once ready you should end up with a file similar to the one shown below:
    $ ls NVIDIA-Linux-x86_64-*
    NVIDIA-Linux-x86_64-410.73.run
    
  3. Install all prerequisites for a successful Nvidia driver compilation and installation.
    $ sudo dnf groupinstall "Development Tools"
    $ sudo dnf install dkms "kernel-devel-uname-r == $(uname -r)"
    

    The dkms package is optional. However, this package will ensure continuous Nvidia kernel module compilation and installation in the event of a new kernel update.

  4. Disable nouveau driver by changing the configuration /etc/default/grub file. Add the nouveau.modeset=0 into the line starting with GRUB_CMDLINE_LINUX. Below you can find an example of grub configuration file reflecting the previously suggested change:
    GRUB_TIMEOUT=5
    GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
    GRUB_DEFAULT=saved
    GRUB_DISABLE_SUBMENU=true
    GRUB_TERMINAL_OUTPUT="console"
    GRUB_CMDLINE_LINUX="resume=UUID=df614470-884d-4992-a13c-1665fb0a230e rhgb quiet nouveau.modeset=0"
    GRUB_DISABLE_RECOVERY="true"
    

    The above line 6 ensures that the nouveau driver is disabled the next time you boot your Fedora 28 Linux system. Once ready execute the following command to apply the new GRUB configuration change.

    Based on your boot method select one of the following:

    BIOS:
    $ sudo grub2-mkconfig -o /boot/grub2/grub.cfg
    EFI:
    $ sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
    


  5. Reboot your Fedora 28 Linux System.
  6. The Nvidia drivers must be installed while Xorg server is stopped. Switch to text mode by:
    $ sudo  systemctl isolate multi-user.target
    
  7. Install the Nvidia driver by executing the following command:
    $ sudo bash NVIDIA-Linux-x86_64-*
    

    When prompted answer YES to installation of NVIDIA’s 32-bit compatibility libraries, overwrite existing libglvnd files and automatic update of your X configuration file.

  8. Reboot your system one more time.
    $ sudo reboot
  9. All done. The Nvidia driver should now be installed on your Fedora 28 Linux system. Reboot your system now, login and run nvidia-settings to further configure your Nvidia graphic card settings.