20 January, 2011

Nvidia proprietary drivers and RHEL6

Sometimes you need to run Nvidia proprietary drivers in various linux distributions.
I was able to run it on standard RHEL 6.0 installed as "Desktop" with the following commands:

Update the system and install the necessary packages
yum update
yum install gcc kernel-devel
reboot

Blacklist the nouveau driver
sed -i '/root=/s|$| rdblacklist=nouveau vga=791|' /boot/grub/grub.conf
echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf

Change the initrd image:
mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname  -r)-nouveau.img
dracut /boot/initramfs-$(uname -r).img $(uname -r)

Remove the nouveau driver and reboot:
yum remove xorg-x11-drv-nouveau
reboot

Stop the X server and run the Nvidia installation process from command line:
init 3
chmod +x NVIDIA-Linux-x86-260.19.29.run
 ./NVIDIA-Linux-x86-260.19.29.run

Enjoy :-)

13 comments :

  1. Jerome Devost23/3/11 21:24

    Simple and clear! Thanks!

    Just missing "chmod +x NVIDIA-Linux-x86-260.19.29.run" after "init 3".

    ReplyDelete
  2. Thanks!
    I though that only the modprobe.d blacklist would be enough.
    I didn't know we had to redo the init ramdisk and add a kernel option...

    I installed nvidia graphics from the atrpms repository

    ReplyDelete
  3. Daniel Rodrigue7/4/11 02:35

    Suggestion: if "yum update" updates your kernel, you must reboot before executing the rest. The reason is "uname -r" will give you the wrong version and your .img file will be wrong, and you won't be able to boot again (and btw, keeping a copy of the old "nouveau.img" was a smart move to recover that mistake).

    ReplyDelete
  4. Thanks Daniel.

    You are right... I added reboot command after update.

    Regards

    PetrR

    ReplyDelete
  5. Thanks Daniel. The recent RHEL6 bump to 2.6.32-135.0.15 made our old process insufficient; and your instructions allowed us to install NVIDIA 275.09 w/o issue.
    -Shep

    ReplyDelete
  6. Shepard Siegel20/5/11 18:29

    (oops) Thanks Petr! The recent RHEL6.1 bump to 2.6.32-135.0.15 made our old process insufficient; and your instructions allowed us to install NVIDIA 275.09 w/o issue.
    -Shep

    ReplyDelete
  7. TheFunnyOne12/9/11 20:22

    Thanks Daniel. Worked perfectly!

    ReplyDelete
  8. Thanks for these steps! They saved the day for me. But now I've got another problem as a result. When I try to play a video like a .avi file, I get only audio. I made sure to install all the necessary codecs as mentioned here:
    http://wiki.centos.org/TipsAndTricks/MultimediaOnCentOS
    But no go.

    I'm using CentOS 6. The problem is not specific to .avi files, I've tried other formats and it's the same. This started only after I installed the Nvidia driver. Any ideas? Also, removing the 'xorg-x11-drv-nouveau' package seemed to remove the 'xorg-x11-drivers' package as well. Could that have anything to do with it?

    ReplyDelete
  9. Thank you so much Petr! I had followed another guide for my initial installation of the NVIDIA drivers on RHEL6 and all was well until a kernel update, at which point X wouldn't start. I followed your guide and it worked like a charm. One thing I'll say for anyone else having this issue: since I had removed the Nouveau drivers, after the kernel update X couldn't start. The NVIDIA installer modifies the kernel, so I had to load the new kernel with init 3 enabled, and reinstall the NVIDIA drivers. This reinstall was critical for me, nothing else seemed to work and X would fail to start. Now I am sitting here typing in a browser with the new kernel enabled. :-)

    Thanks again!

    ReplyDelete
  10. Hello,
    Thanks for the doc :) Unfortunately for me, I have applied it on Scientific Linux 6.1 and after the reboot it appears that nvidia drivers are not loaded. When I launch "Nvidia X Server Settings", I receive "You don't appear to be using the Nvidia Xdriver" => run nvidia-config as root. After I run it, X server does not start no more until I remove the created xorg.conf

    Thanks in advance for your help

    Kind regards

    Damien

    ReplyDelete
  11. Petr,
    Fantastic instructions. Worked like a charm on my RHEL6.1 box. Many thanks for sharing.

    ReplyDelete
  12. @Damien
    I've installed on RHEL 6.1 and got issues that I was not able to fix using the info on this post (it helped me a lot though). I got the final fix here http://forums.nvidia.com/index.php?showtopic=162114 , I can now go to run level 5 but I still get the Nvidia X Server settings (GUI) to complain with the same error message you get. You might want to check my post on the topic on my blog.

    ReplyDelete
  13. Hey, I tried this tutorial on my new RHEL 6 install but it did not work (I'm guessing because I used EFI boot instead of BIOS); do you know how to install the driver for an EFI boot system?

    ReplyDelete

Note: only a member of this blog may post a comment.