PDA

View Full Version : How to Install Nvidia Drivers Fedora 20 (Not RPMFusion style)



Gluzzer
8th January 2014, 08:11 PM
Since I could not find this all in one place during my use of googlefoo I am posting this here to help others hopefully.

Step 1: Download the correct driver for your Nvidia Graphics Card from Nvidia.com

You can use the following command to find out what card you have.

lspci | grep -i VGA

Step 2: Remove Nouveau.


sudo yum remove xorg-x11-drv-nouveau*

Step 3: Remove Nouveau from grub.


sudo vim /etc/default/grub
Remove "rhgb" from the file.

Step 4: Update Grub


sudo grub2-mkconfig -o /boot/grub2/grub.cfg

Step 5: Reboot your machine.

Step 6: When you are at the login screen or your window manager has loaded go to one of your available tty's. Press CTRL+ALT+F2. Login with your username and password or as root.

Step 7: Stop the xserver.


sudo systemctl stop lightdm.service

Step 8: Make Nvidia Driver executable. Navigate the where ever you downloaded your nvidia driver to. I just let firefox default to Downloads for this.


cd /home/(user name)/Downloads
sudo chmod +x Nvidia*

Step 9: Run the Nvidia Installer. Also during the step that the installer asks you about DKMS make sure that you answer yes. If you select No this will cause issues when the kernel is updates.(Make sure you are still in the directory with your nvidia installer from last step)


sudo ./Nvidia*

Step 10: Follow through the installer and install the 32 bit libs if you would like them.




Once the machine has restarted and you have logged in you should now see the nvidia control panel in your options.

If i missed anything or it doesn't work for you post below and I will try to help. However I am kind of a noob when it comes to linux.

leigh123linux
8th January 2014, 08:28 PM
Step 2: Remove the Nouveau Kernel Driver.


sudo yum remove xorg-x11-drv-nouveau*LOL , nouveau.ko is in the kernel :doh:



Step 7: Stop the xserver

sudo service lightdm stopThe service command was obsoleted around F17, use


systemctl stop lightdm.service
Step 10: Follow through the installer and install the 32 bit libs if you would like them.I doubt the 32bit libs will work properly as they require other 32bit packages



Step 9: Run the Nvidia Installer. (Make sure you are still in the directory with your nvidia installer from last step)

sudo ./Nvidia*This will break every time theres a kernel update, use dkms instead


sudo yum install dkms "kernel-devel-uname-r == $(uname -r)"
sudo ./Nvidia*
Registering the NVIDIA Kernel Module with DKMS

The installer will check for the presence of DKMS on your system. If DKMS is found, you will be given the option of registering the kernel module with DKMS, and using the DKMS infrastructure to build and install the kernel module. On most systems with DKMS, DKMS will take care of automatically rebuilding registered kernel modules when installing a different Linux kernel.
If nvidia-installer is unable to install the kernel module through DKMS, the installation will be aborted and no kernel module will be installed. If this happens, installation should be attempted again, without the DKMS option.
Note that versions of nvidia-installer shipped with drivers before release 304 do not interact with DKMS. If you choose to register the NVIDIA kernel module with DKMS, please ensure that the module is removed from the DKMS database before using a non-DKMS aware version of nvidia-installer to install an older driver; otherwise, module source files may be deleted without first unregistering the module, potentially leaving the DKMS database in an inconsistent state. Running nvidia-uninstall before installing a driver using an older installer will invoke the correct dkms remove command to clean up the installation.
Due to the lack of secure storage for private keys that can be utilized by automated processes such as DKMS, it is not possible to use DKMS in conjunction with the module signing support built into nvidia-installer.
http://uk.download.nvidia.com/XFree86/Linux-x86/319.12/README/installdriver.html#RegisteringTheNda02d

Gluzzer
8th January 2014, 08:42 PM
As I said I am a noob to linux. Also thank you for correcting things that i did not know.

However to note the latest nvidia drivers will include the registering of the DKMS during the install, which is why I did not make mention of it.

as far s the 32 bit libs, i do know that some people do install both the 64 and 32 bit libs on there systems hence the option was mentioned.

also thank you for pointing out that service command has been deprecated. I will update the post to bring it more in line with correct practices.

glennzo
8th January 2014, 10:46 PM
Moved to Guides and Solutions.

unassassinable
21st June 2014, 09:22 AM
L

Step 10: Follow through the installer and install the 32 bit libs if you would like them.

I doubt the 32bit libs will work properly as they require other 32bit packages




If you don't install the 32 bit libs, Steam will fail to load with the error, "You are missing the following 32-bit libraries, and Steam may not run: libGL.so.1". Make sure to install the 32 bit libs if you play on Steam!:p

leigh123linux
21st June 2014, 10:36 AM
If you don't install the 32 bit libs, Steam will fail to load with the error, "You are missing the following 32-bit libraries, and Steam may not run: libGL.so.1". Make sure to install the 32 bit libs if you play on Steam!:p

I believe this would install all the required 32bit libs


sudo yum install $(repoquery -q --requires xorg-x11-drv-nvidia-libs.i686|awk '{print $1}') -x xorg-x11-drv-nvidia\*

dehaseth
19th October 2014, 02:28 AM
Thanks for the guide to install the NVIDIA driver.

Unfortunately it is not working for me and I cannot determine why. I have a Lenovo W540 laptop with the Nvidia Quadro K2100M. This is not listed in the supported video hardware list for RPMFusion so I am trying the NVIDIA linux driver. I am using version 340.46 of the 64-bit driver.

The kernel is 3.11.10-301.fc20.x86_64. This is the standard installation kernel. If updates are done newer kernels cause the system to crash, or at best only a command prompt interface is available. All GUI stops.

(Of course Lenovo supplied Windows 7 Pro with this box and then everything works just fine, but I have no use for a Windows system.)

I have followed the instructions meticuously with the exception of #7; stop the Xserver. I used kdm.service instead of lightdm.service as I am running KDE as the DM. After I stop it I check with


systemctl -a | grep kdm.service

and it tells me it is loaded, but inactive dead.

On step 9 I install dkms as indicated. No errors. When I run the NVIDIA run script it tells me


Error: The Nouveau kernel driver is currently in use by your system.

I cannot seem to get rid of the Nouveau kernel entry. I have tried going to init state 3 just to be sure, but the same error persists. What am I missing?

In the past I have always used the RPMFusion drivers on othe laptops, but apparently this is not an option for the Quadro K2100M.

glennzo
19th October 2014, 08:55 AM
Have you perused this thread (http://www.forums.fedoraforum.org/showthread.php?t=280750) for tips? Maybe you need to execute step 3 there.

Dutchy
19th October 2014, 01:26 PM
Step 3 and 4 do not make sense.
First you manually change grub.cfg which isn't recommended, then you regenerate it which means the rghb option will be back so practically nothing has changed.

dehaseth
19th October 2014, 04:02 PM
Thanks to glennzo and Duchy.

I am not very familiar with either command, but it seems to me the docs for grub2-mkconfig use /etc/default/grub to generate a new /boot/grub2/grub.cfg.

Step 3 in the F18-F20 nvidia installation guide appears to move the old kernel image to a kernel image that is appended with "nouveau" and then generates a new kernel over the old kernel name with the new driver. Doesn't the new driver have to be installed to make this work? I have been unable to install the new nvidia driver because nouveau is present.

I tried to delete the nouveau driver from the kernel by adding omit_drivers=+"nouveau" to /etc/dracut.conf. The existing kernel image was moved to a nouveau.img file as in step 3 suggested above. The the following was run:

dracut /boot/initramfs-$(uname -r)
which produced a new kernel image. The absence of the nouveau driver was confirmed with lsinitrd.

Upon reboot init 3 was used to kill kdm.service and the NVIDIA file was run. It still came back the nouveau is running yet it is not in the kernel driver modules. :confused: