Fedora 28/27/26 nVidia Drivers Install Guide

Nvidia LogoThis is guide, howto install nVidia proprietary drivers on Fedora 28/27/26/25/24/23/22/21 and disable Nouveau driver. This guide works with GeForce 6/7/8/9/200/300/400/500/600/700/800/900/10 series cards.

  • GeForce 600/700/800/900/10 series cards works with 390.xx and 396.xx nVidia drivers
  • GeForce 400/500 series cards works with 390.xx nVidia drivers
  • GeForce 8/9/200/300 series cards works with 340.xx nVidia drivers
  • GeForce 6/7 series cards works with 304.xx nVidia drivers

This is totally different guide than my earlier guides, like Fedora 20 nVidia driver install. This guide uses nVidia drivers directly from nVidia site and dkms to help on kernel updates. Have to say that I have had and heard strange problems with different repos (like RPMFusion) nVidia drivers. So that’s why I decided go back to old school (and bit ugly) method and install nVidia drivers “manually”. I have tested this guide with 304.xx (patched), 340.xx (patched), 390.xx, 396.xx drivers/cards.

With DKMS, you can just update your kernel and your nVidia drivers are compiled automatically. If you want to upgrade nVidia drivers, then you have to download new installer package from nVidia site.

Let me know, if you have some problems?

Or if you succeed, you could post output of following commands:

nvidia-installer -v |grep version

uname -a

lspci |grep -E "VGA|3D"

Backup first important files before you start installation. And this is of course at your own risk, because graphic cards, components and monitors are different and some combinations might cause totally unexpected results.

1. Before nVidia drivers installation

1.1 Check is your nVidia card supported

lspci |grep -E "VGA|3D"

## Example outputs ##
01:00.0 VGA compatible controller: NVIDIA Corporation GF119 [GeForce GT 610] (rev a1)

List of Supported NVIDIA GPU Products, if your card found before 340.xx section, then use 396.xx, or 390.xx drivers and if between 340.xx and 304.xx sections, then use 340.xx drivers and if after 304.xx section, then use 304.xx drivers.

If you see multiple VGA controllers, then check next step and sometimes you might see example Intel VGA controller which have nothing to do with Optimus, normally you can go to BIOS and simply disable it.

1.2 NVIDIA Optimus Technology

If your lspci |grep -E “VGA|3D” output looks like following:

00:02.0 VGA compatible controller: Intel Corporation 2n Generation Core Processor Family Integrated Graphics Controller (rev 09)
01:00.0 VGA compatible controller: nVidia Corporation GF106 [GeForce GT 555M SDDR3] (rev a1)

Or

00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
01:00.0 3D controller: NVIDIA Corporation GK107M [GeForce GT 750M] (rev a1)

Or you know that your computer have NVIDIA Optimus Technology, and it is impossible to turn Intel Graphics / NVIDIA Optimus off in the BIOS then this guide might not work for you and it’s not tested. You should check Bumblebee Project.

1.3 Disable UEFI Secure Boot or Check Howto Sign NVIDIA Kernel Module

If you have UEFI Secure Boot enabled, then you have to disable Secure Boot or sign your NVIDIA kernel module.

2. Install nVidia proprietary drivers on Fedora 28/27/26/25/24/23/22/21 and disable the nouveau driver

2.1 Download nVidia Installer Package

Go to http://www.nvidia.com/Download/Find.aspx?lang=en-us and find latest version of installer package. When you use browser this is normally downloaded /home/<username>/Downloads/NVIDIA-Linux-xxxx.run location.

Tested versions:

Fedora 28 Fedora 27 Fedora 26 Fedora 25/24/23/22/21
396.54 (August 21, 2018) 396.54 (August 21, 2018) 396.54 (August 21, 2018) 396.54 (August 21, 2018)
390.87 (August 28, 2018) 390.87 (August 28, 2018) 390.87 (August 28, 2018) 390.87 (August 28, 2018)
340.107 (June 6, 2018) 340.107 (June 6, 2018) 340.107 (June 6, 2018) 340.107 (June 6, 2018)
304.137 (September 19, 2017) 304.137 (September 19, 2017) 304.137 (September 19, 2017)

Note Fedora 28/27/26 users: 396.54 and 390.87 are only version which works without patch with kernel 4.17. Currently you can also use patched 340.107 with Fedora 28/27/26 kernel 4.17.

Note 340.107 users: 340.107 on Fedora 28/27/26/25 Kernel 4.17/4.16/4.15/4.14/4.13/4.12/4.11 needs a patched version (Download NVIDIA-Linux-x86_64-340.107 + Kernel 4.17/4.16/4.15/4.14/4.13/4.12/4.11 patched version).

Note 304.137 users: 304.137 on Fedora 27/26 (old kernel 4.15) and 25/24/23 – installs and boot, but doesn’t work with Gnome 3.26/3.24/3.22/3.20/3.18. Other DEs/WMs should work normally. Kernel 4.15/4.14 needs a patched version (Download NVIDIA-Linux-x86_64-304.137 with Kernel 4.14+ patch)

2.2 Make nVidia installer executable

chmod +x /path/to/NVIDIA-Linux-*.run

2.3 Change root user

su -
## OR ##
sudo -i

2.4 Make sure that you system is up-to-date and you are running latest kernel

If you have exclude=xorg-x11* row in your /etc/dnf/dnf.conf, then you can remove it now and update xorg too.

## Fedora 28/27/26/25/24/23/22 ##
dnf update

## Fedora 21 ##
yum update

After update reboot your system and boot using latest kernel:


reboot

2.5 Install needed dependencies

## Fedora 28/27/26/25/24/23/22 ##
dnf install kernel-devel kernel-headers gcc dkms acpid libglvnd-glx libglvnd-opengl libglvnd-devel pkgconfig

## Fedora 21 ##
yum install kernel-devel kernel-headers gcc dkms acpid

2.6 Disable nouveau

2.6.1 Create or edit /etc/modprobe.d/blacklist.conf

Append ‘blacklist nouveau’

echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf

2.6.2 Edit /etc/sysconfig/grub

Append ‘rd.driver.blacklist=nouveau’ to end of ‘GRUB_CMDLINE_LINUX=”…”‘

## Example row ##
GRUB_CMDLINE_LINUX="rd.lvm.lv=fedora/swap rd.lvm.lv=fedora/root rhgb quiet rd.driver.blacklist=nouveau"

2.6.3 Update grub2 conf

## BIOS ##
grub2-mkconfig -o /boot/grub2/grub.cfg

## UEFI ##
grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

2.6.4 Remove xorg-x11-drv-nouveua

## Fedora 28/27/26/25/24/23/22 ##
dnf remove xorg-x11-drv-nouveau

## Fedora 21 ##
yum remove xorg-x11-drv-nouveau

If you have following row on /etc/dnf/dnf.conf file, then you can remove it:

exclude=xorg-x11*

2.6.5 Generate initramfs

## Backup old initramfs nouveau image ##
mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)-nouveau.img
 
## Create new initramfs image ##
dracut /boot/initramfs-$(uname -r).img $(uname -r)

2.7 Reboot to runlevel 3

Note: You don’t have Desktop/GUI on runlevel 3. Make sure that you have some access to end of guide. (Print it, use lynx/links/w3m, save it to text file).

systemctl set-default multi-user.target

reboot

2.8 Install nVidia proprietary drivers for GeForce 6/7 & GeForce 8/9/200/300 & GeForce 400/500/600/700/800/900/10 series cards

2.8.1 Log in as root user

Or alternatively change root user (you shouldn’t have nouveua and xorg loaded)

su -
## OR ##
sudo -i

2.8.2 Run NVIDIA Binary

Following command executes driver install routine. Use full file name command if you have multiple binaries on same directory.

./NVIDIA-Linux-*.run

## OR full path / full file name ##

/path/to/NVIDIA-Linux-x86_64-396.51.run

./NVIDIA-Linux-x86_64-390.77.run

/path/to/NVIDIA-Linux-x86_64-340.107-patched.run

/home/<username>/Downdloads/NVIDIA-Linux-x86_64-304.137-patched.run

2.8.3 nVidia Installer Register the Kernel Source Modules with DKMS

nVidia Installer dkms

2.8.4 nVidia Installer 32-bit Compatibility Libraries

nVidia Installer 32-bit Compatibility Libraries

2.8.5 nVidia Installer Installing Drivers and Building kernel module

nVidia Installer Installing Files

nVidia Installer Building Kernel Module

nVidia Installer Installing Kernel Module

Note: If you get libglvnd error, then abort installation and try this. Also “Install and overwrite existing files” works, but fixing this error is more clean way to install NVIDIA Drivers.

2.8.6 nVidia Installer Automatic Xorg Config and Backup

nVidia Installer Automatic Xorg Config and Backup

2.8.7 nVidia Drivers Installation Complete

nVidia Drivers Installation Complete

2.9 All Is Done and Then Reboot Back to Runlevel 5

systemctl set-default graphical.target

reboot

2.10 VDPAU/VAAPI support

To enable video acceleration support for your player (Note: you need Geforce 8 or later).

## Fedora 28/27/26/25/24/23/22 ##
dnf install vdpauinfo libva-vdpau-driver libva-utils

## Fedora 21 ##
yum install vdpauinfo libva-vdpau-driver libva-utils

3. Some Screenshots Using Different Cards and Drivers

3.1 nVidia 396.45 drivers on Fedora 28 Gnome 3.28.2 with Kernel 4.17.7

nVidia 396.45 Running on Fedora 28 Kernel 4.17.7 Gnome 3.28.2

3.2 nVidia 390.77 drivers on Fedora 28 Gnome 3.28.2 with Kernel 4.17.7

nVidia 390.77 Running on Fedora 28 Kernel 4.17.7 Gnome 3.28.2

3.3 nVidia 340.107 drivers on Fedora 28 Gnome 3.28.2 with Kernel 4.17.7

nVidia 340.107 Running on Fedora 28 Kernel 4.17.7 Gnome 3.28.2

3.4 nVidia 304.137 drivers on Fedora 27 LXDE with Kernel 4.13

nVidia 304.137 drivers on Fedora 27 LXDE with Kernel 4.13

Let me know, if you have problems?

Or if you succeed, you could post output of following commands:

nvidia-installer -v |grep version

uname -a

lspci |grep -E "VGA|3D"

1,944 comments on “Fedora 28/27/26 nVidia Drivers Install Guide

Leave a Reply to Robert Wolf Cancel 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.

Close