How to install Nvidia Drivers in Fedora 24

Nvidia Drivers

NVIDIA GeForce drivers are recognized as the industry leader Display Drivers in performance, visual quality, and stability and deliver premium technologies such as SLI, PhysX, 3D Vision, NVIDIA Surround, and PureVideo HD, to GeForce GPUs.

Nvidia has shifted to become a platform company focused on four markets — Gaming, Professional Visualization, Data Centers and Auto.

In this article we will known about How to install Nvidia Drivers in fedora 24.

First install the pre requisites kernel-devel and kernel-headers as follows

[[email protected] ~]# dnf install kernel-devel kernel-headers
Last metadata expiration check: 0:53:22 ago on Tue Jun 28 09:45:14 2016.
Dependencies resolved.
=========================================================================
 Package              Arch       Version            Repository     Size
=========================================================================
Installing:
 kernel-devel         x86_64     4.5.7-300.fc24     updates         10 M
 kernel-headers       x86_64     4.5.7-300.fc24     updates        1.0 M

Transaction Summary
=========================================================================
Install  2 Packages

Total download size: 11 M
Installed size: 42 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): kernel-headers-4.5.7-300.fc24.x86_64.rpm  84 kB/s | 1.0 MB   00:12
(2/2): kernel-devel-4.5.7-300.fc24.x86_64.rpm   191 kB/s |  10 MB   00:55
-------------------------------------------------------------------------
Total                                           202 kB/s |  11 MB   00:57
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Installing  : kernel-headers-4.5.7-300.fc24.x86_64                 1/2
  Installing  : kernel-devel-4.5.7-300.fc24.x86_64                   2/2
  Verifying   : kernel-devel-4.5.7-300.fc24.x86_64                   1/2
  Verifying   : kernel-headers-4.5.7-300.fc24.x86_64                 2/2

Installed:
  kernel-devel.x86_64 4.5.7-300.fc24    kernel-headers.x86_64 4.5.7-300.fc24

Complete!

Also install gcc, dkms and acpid by using following command as follows

[[email protected] ~]#dnf install gcc dkms acpid

Download the Nvidia drivers from their official site. Here i downloaded the file NVIDIA-Linux-x86_64-367.27.run

[[email protected] ~]# wget http://in.download.nvidia.com/XFree86/Linux-x86_64/367.27/NVIDIA-Linux-x86_64-367.27.run
--2016-06-28 10:19:16--  http://in.download.nvidia.com/XFree86/Linux-x86_64/367.27/NVIDIA-Linux-x86_64-367.27.run
Resolving in.download.nvidia.com (in.download.nvidia.com)... 117.239.240.42, 117.239.240.32
Connecting to in.download.nvidia.com (in.download.nvidia.com)|117.239.240.42|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 76945324 (73M) [application/octet-stream]
Saving to: ‘NVIDIA-Linux-x86_64-367.27.run’

NVIDIA-Linux-x86_64 100%[===================>]  73.38M  1.16MB/s    in 91s

2016-06-28 10:20:49 (825 KB/s) - ‘NVIDIA-Linux-x86_64-367.27.run’ saved [76945324/76945324]

change the permissions of NVIDIA-Linux-x86_64-367.27.run  to execute by using chmod command

[[email protected] ~]#chmod +x NVIDIA-Linux-x86_64-367.27.run 

Before going to install we will close the X-server and also blacklist the nouveau drivers as follows.

[[email protected] ~]#rm /etc/systemd/system/default.target
rm: remove symbolic link '/etc/systemd/system/default.target'? y
[[email protected] ~]#ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target

In the above commands we using the first command to delete the default run level and in the next command we changing the run level to multi user(which is equal to Run level 3 (Multi User with Text mode)).

Blacklist nouveau at Boot Time and Post Boot

For Black list nouveau drivers we will create a file disable-noveau.conf in /etc/modprobe.d/ directory as follows

[[email protected] ~]#echo 'blacklist nouveau' >> /etc/modprobe.d/disable-nouveau.conf
[[email protected] ~]#echo 'nouveau modeset=0' >> /etc/modprobe.d/disable-nouveau.conf

Now Edit the file /boot/grub2/grub.cfg and find the line similar to as follows

linux16 /vmlinuz-4.5.7-300.fc24.x86_64+debug root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/root rd.lvm.lv=fedora/swap rhgb quiet LANG=en_US.UTF-8

add the rdblacklist=nouveau before rhgb quiet as follows.

linux16 /vmlinuz-4.5.7-300.fc24.x86_64+debug root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/root rd.lvm.lv=fedora/swap rdblacklist=nouveau rhgb quiet LANG=en_US.UTF-8

Reboot the machine by using the reboot command to enter in Runlevel 3.

[[email protected] ~]#reboot

Now the system load in text user interface and prompt for credentials, login as a root user.

fedora 24 run level 3 screen

Now Install Nvidia drivers as follows

Fedora23-2016-06-28-11-16-10

Then the Nvidia Accelerated Graphics Driver for Linux license screen appears, Now select the option Accept

Nvidia installation screen

Select the yes option to register the kernel modules with DKMS.

Nvidia

Press Yes option to Install Nvidia’s 32 bit compatibility drivers

nvidia

nvidia

Now it will install Nvidia Drivers

Nvidia Installation

After the installation completes successfully change the default run level to Graphical user interface with multi user support(Run level 5) by as follows.

[[email protected] ~]#rm /etc/systemd/system/default.target
[[email protected] ~]#ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target

Now we can Directly get the graphical desktop, Now we should find in the “NVIDIA X Server Settings”.

nvidia-367

By Using this we can configure Dual screen and other custom X Server settings. Enjoy the Gaming  with more fun by using Nvidia Drivers.

  • andres vidal

    not working properly, after a few minutes gnome-shell fails, it is a Dell E6410 (nVidia NVS 3100m)

  • Rey Trasgo

    it likely doesn’t work since the last supported driver version for that card was 340.96 and this guide uses 367.27.

  • larrangeur

    Or you can try installing the negativo17 repo and install nvidia-driver

  • abc def

    I download thing thing and my Fedora 24 show me a nice BLACK SCREEN (no signal) after booting and I don’t know how uninstall it.

  • oldfellla

    My driver installation seams to work fine after reboot but when I get to the login screen I realize that the mouse doesn’t work. The pointer is there, it moves and it detects the unplug/re-plug but clicks don’t work; I can move focus around with the keyboard Tab/Enter but it doesn’t like my clicks… so for the moment I’m back with nouveau.
    Anybody knows what I am doing wrong?