The following instructions guide you through the installation of NVIDIA’s graphics drivers on Fedora Linux. At the time of this writing, the latest driver version was 310.32. Should be needless to say, but all information provided comes with no warranty whatsoever. Instructions for other version or system configurations may differ.
As first step, go to the NVIDIA web site and download the NVIDIA binary drivers for your graphics card. The drivers are available at http://www.geforce.com/drivers. The driver package comes as a self-extracting setup binary. After downloading, ensure it is executable:
$ sudo chmod 755 NVIDIA-Linux-x86_64-310.32
Most likely you need to install gcc for the NVIDIA drivers. gcc is necessary to compile a small stub so that the drivers can be loaded by your current Linux kernel. Do not worry, once you have gcc, the driver installation takes care of the rest. If you are lucky you may be able to proceed without installing gcc and return later if installation fails.
$ sudo yum install gcc
Next, ensure that you are running the latest version of the Linux kernel. Issue the following command inside a terminal window.
$ sudo yum update kernel\* selinux-policy\*
Once you have downloaded the latest kernel, you want to restart your system to ensure it is running.
Chances are your current setup is usinf the nouveau graphics drivers. The easiest way to check is by invoking the NVIDIA setup. Only downside, this setup needs to be invoked without the X server running (i.e., best from the console). Swith to a console (Ctrl-Alt-F2), login and switch to a runlevel without X by issuing (remember if you restart your system and want to run the NVIDIA setup again, you need to repeat these steps):
$ sudo init 3
You may have to login again, switch again to the directory where you downloaded the NVIDIA drivers to and issue:
$ sudo ./NVIDIA-Linux-x86_64-310.32.run
If the setup tells you that you are using the nouveau drivers, confirm you want to deactivate them. However, Fedora already enables them as part of the initial ramdisk, and hence they need to be deactivated when the system starts. There are two options to accomplish this.
- Manually at each startup- When your system starts, at the grub prompt, select the kernel you want to use and type e to change the boot settings for this kernel. Scroll to the line containing the kernel command line options (starting with linux /vmlinuz-…) and append the following entry. This has to be repeated whenever your system boots, even after the NVIDIA drivers have been installed.
- Permanently disable the nouveau driver. Edit your grub configuration file (/boot/grub2/grub.cfg) locate the entry starting your kernel and add the same kernel command line option as above.
Start the installation of the drivers:
$ sudo ./NVIDIA-Linux-x86_64-310.32.run
If the above fails due to missing kernel sources, you need to install the kernel-devel package by issuing (most likely, one could include them upfront in the above yum update command – haven’t checked):
$ sudo yum install kernel-devel
If the above fails, you need to fix the setup scrip of the NVIDIA drivers (this happened to me the first time, I think I had a different kernel running, the second time I ran through my HOWTO this wasn’t necessary). Unpack them as indicated below.
$ sudo ./NVIDIA-Linux-x86_64-310.32.run -x $ sudo vi NVIDIA-Linux-x86_64-310.32/kernel/conftest.sh
Now change lines 1705ff as indicated below.
# if [ -n "$PATCHLEVEL" -a $PATCHLEVEL -ge 6 \ # -a -n "$SUBLEVEL" -a $SUBLEVEL -le 5 ]; then SELECTED_MAKEFILE=Makefile.kbuild RET=0 # fi
Now, change into the NVIDIA-Linux-x86_64-310.32 directory and invoke the extracted installer as follows:
$ sudo ./nvidia-installer
Now everything should be installed and once you restart your system for a very last time (don’t forget to disable the nouveau drivers if you have chosen option one above), you should be using the NVIDIA drivers.
Now you can enjoy the NVIDIA drivers.