(Note added on 5/31/2010: As of x86_64 F13, the i686 libraries are no longer required in step 9. The x86_64 libs are sufficient. I have tried it with and without i686 and could not detect any difference.)
Before F12, it was easy to install the nvidia driver using the "run" method posted at http://www.nvidia.org. Now it is no longer straightforward. After a lot of trial and error, I got the run method to work on a Compaq Presario notebook with a 7000M nvidia GPU. The following method works for both factory and custom kernels, or if you have multiple kernels, e.g., a factory and a custom kernel. I have both the factory kernel and a custom kernel, and driver works fine on both. I am using 64-bit F15. For 32-bit, omit x86_64. All commands except 15 are run as root.
(Note: As Dies points out below, you can also use the akmod method for custom kernels. The so-called "run" method is universal, however, and usually just requires two steps (telinit and sh). You don't even have to reboot..)
(It goes without saying that if you are installing Fedora several months after it has been released, the packages on the installation media will be several months out of date with respect to the repository. Therefore, before even proceeding to step 1, you should execute "yum update" and reboot.)
1. Download the driver from http://www.nvidia.org.
2. $ setsebool -P allow_execstack on
This is now the default setting in F15, so it is ok to skip step 2. Also, skip step 2 if not using SElinux.
3. $ yum remove xorg-x11-drv-nouveau
4. $ echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf
5. $ yum --enablerepo=rp*g remove kmod-nvidia xorg-x11-drv-nvidia-libs.{i686,x86_64}
If you had previously installed kmod-nvidia, it has to be removed, otherwise there is a conflict. Skip if you didn't.
6. $ cd /boot
7. $ mv initramfs-$(uname -r).img initramfs-$(uname -r).img.backup
8. $ dracut initramfs-$(uname -r).img $(uname -r)
9. $ yum install gcc kernel-devel-$(uname -r) mesa-libGL-devel.{i686,x86_64} mesa-libGLU
10. reboot into run level 3 as follows:
From the GRUB boot screen, press "e" (for edit). Highlight the kernel line and press "e" again. Move the cursor to the end of the kernel line and enter "3" without the quotes.
Press enter to accept the changes. Press "b" (for boot). This will boot the kernel into level 3.
11. $ sh NVIDIA-Linux-x86_64-190.42-pkg2.run
Towards the end, the nvidia script will ask if you want it to modify xorg.conf. Answer "yes".
If you have multiple kernels, including custom, all you have to do once the current setup is finished is to boot
into each of the other kernels in turn following step 10, and re-run step 11 with a "-K" switch at the end.
(Note added on 4/22/2011: In recent versions of Fedora, it is safe to skip step 12. I tried commenting these lines out in F15, F14 and it worked. It is possible that a certain version of the X server at that time could not find those modules for x86_64 and needed to be explicitly told where to find them. Such bugs have been fixed in more recent version of Fedora. Try skipping step 12.)
12. $ cd /etc/X11 && vi xorg.conf
Add the following lines to the "Files" section:
ModulePath "/usr/lib64/xorg/modules/extensions/nvidia"
ModulePath "/usr/lib64/xorg/modules/drivers"
ModulePath "/usr/lib64/xorg/modules"
13. $ cd /boot/grub && vi grub.conf
Add "rhgb vga=791 quiet" without the quotes to the kernel line.
Replace 791 with 794 if you want 1280x1024 instead of 1024x768.
F16 uses GRUB2 by default. Add the above string to the GRUB_CMDLINE_LINUX variable in /etc/default/grub. Then update the configuration using grub2-mkconfig -o /boot/grub2/grub.cfg.
14. reboot
15. $ glxinfo | grep -i opengl
It should not give errors.
(Note added on 12/15/2011: For anyone curious about a bootup message in newer kernels that the nvidia module "taints" the kernel, this is not an error, or a sign of potential problems. It is a licensing issue. Nvidia releases its "run" driver under a non-GPL license. Nouveau is GPL.)



Reply With Quote

