20 November 2010

Install NVidia Driver On Fedora 14

I currently have Fedora 14 running on my ancient laptop primary PC and whilst the nouveau video driver is probably good I do find one major problem with it on this laptop. Unfortunately with the nouveau driver the fan on the graphics card runs constantly which is just noisy and annoying. I have used i8k tools (in conjunction with gkrellm) in the past to control this but I've had my share of problems with it causing the fan to cut on and off sporadically and so I just find the best solution is to use the proprietary NVidia driver. Unfortunately getting them on Fedora isn't as easy as it should be, but it isn't to hard if you know what your doing.


I use vi to edit config files but if your not familiar with vi just substitute it with nano and you should be on your way.

Installing The Driver
Download the latest drivers from NVidia. The current version for my card is NVIDIA-Linux-x86-173.14.28-pkg1.run (but this should work fine for any version of the drivers you need). Make sure you know the full path where you are saving them, for this example I will use:
/home/username/Downloads/NVIDIA-Linux-x86-173.14.28-pkg1.run

Log in as root because you'll need it for the rest of these instruction:
# su

Blacklist the nouveau driver by adding the following lines to the end on the blacklist config file (I'm not sure this step is necessary, if someone tries without it and it works let me know...I've just been doing it ever since I worked out how to install the drivers a few Fedoras ago and I'm not sure it's still relevant):
# vi /etc/modprobe.d/blacklist.conf

+ # Blacklist Nouveau
+ blacklist nouveau

Add the following kernel boot option: nouveau.modeset=0
# vi /boot/grub/menu.lst

--- /boot/grub/menu.lst.bkp    2010-11-01 00:00:00.000000000 +0000
+++ /boot/grub/menu.lst    2010-11-01 00:00:00.000000000 +0000
@@ -13,7 +13,7 @@
 title Fedora (2.6.35.6-45.fc14.i686)
     root (hd0,1)
-    kernel /vmlinuz-2.6.35.6-45.fc14.i686 ro root=/dev/mapper/VolGroup-lv_root rd_LVM_LV=VolGroup/lv_root rd_LVM_LV=VolGroup/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us rhgb quiet
+    kernel /vmlinuz-2.6.35.6-45.fc14.i686 ro root=/dev/mapper/VolGroup-lv_root rd_LVM_LV=VolGroup/lv_root rd_LVM_LV=VolGroup/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us rhgb quiet nouveau.modeset=0
     initrd /initramfs-2.6.35.6-45.fc14.i686.img

I have found that in Fedora 14 changing to runlevel 3 can create problems. We should just be able to:
# init 3
and have the system kill the x server, but I have found that it can lock-up and if it does make it the xserver seems to still be running at some level and the NVidia driver complains during install. So the easiest way to get around this is to start the system in runlevel 3 (temporarily) and then swap back once we have the driver installed. To do this change the default startup runlevel in inittab from 5 to 3:
# vi /etc/inittab

- id:5:initdefault:
+ id:3:initdefault:

Reboot the PC:
# reboot

When you reboot you should have a console login. Login and then su as root again.

Make the driver install runnable:
# chmod +x /home/username/Downloads/NVIDIA-Linux-x86-173.14.28-pkg1.run

Run the install package:
# /home/username/Downloads/NVIDIA-Linux-x86-173.14.28-pkg1.run

Change the default startup runlevel from 3 back to 5.
# vi /etc/inittab
- id:3:initdefault:
+ id:5:initdefault:

Now you can either reboot or manually set the runlevel to 5:
# reboot
or
# init 5


I have also found that with the nVidia driver the ppi (dpi) gets set strangely (but maybe that's just me):
# xdpyinfo | grep resolution 
resolution:    129x126 dots per inch 

What I want is a ppi (dpi) of 96. To fix this I had to add an option to my xorg.conf.
# vi /etc/X11/xorg.conf 

--- /etc/X11/xorg.conf.bkp    2010-11-01 00:00:00.000000000 +0000
+++ /etc/X11/xorg.conf    2010-11-01 00:00:00.000000000 +0000
@@ -42,8 +42,9 @@ EndSection
 Section "Device"
     Identifier     "Device0"
     Driver         "nvidia"
     VendorName     "NVIDIA Corporation"
+    Option "DPI" "96 x 96"
 EndSection
 
 Section "Screen"
     Identifier     "Screen0"

4 comments:

  1. Gustavo Linarelli21/12/10 2:56 PM

    thank you it works for me :)

    ReplyDelete
  2. Merci!
    That have worked perfectly for me as well.

    ReplyDelete
  3. Nice. One comment about runlevel on reboot: if you do not have timeout=0 in your /boot/grub/menu.lst file you have an opportunity to edit the grub boot line. you can Add the words

    linux 3

    to the end of the line and have it boot straight into runlevel 3.

    Just seems better to me for a temporary change.

    ReplyDelete