Nvidia proprietary drivers and RHEL6

January 20th, 2011 | Tags: , , , ,

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 :-)

VN:F [1.9.20_1166]
Rating: 8.6/10 (7 votes cast)
Nvidia proprietary drivers and RHEL6, 8.6 out of 10 based on 7 ratings
  1. Jerome Devost
    March 23rd, 2011 at 20:24
    Reply | Quote | #1

    Simple and clear! Thanks!

    Just missing “chmod +x NVIDIA-Linux-x86-260.19.29.run” after “init 3″.

  2. sophana
    April 5th, 2011 at 09:42
    Reply | Quote | #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

  3. Daniel Rodrigue
    April 7th, 2011 at 00:35
    Reply | Quote | #3

    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).

  4. April 7th, 2011 at 14:05
    Reply | Quote | #4

    Thanks Daniel.

    You are right… I added reboot command after update.

    Regards

    PetrR

  5. May 20th, 2011 at 16:22
    Reply | Quote | #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

  6. Shepard Siegel
    May 20th, 2011 at 16:29
    Reply | Quote | #6

    (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

  7. TheFunnyOne
    September 12th, 2011 at 18:22
    Reply | Quote | #7

    Thanks Daniel. Worked perfectly!

  8. Rubin
    September 15th, 2011 at 18:37
    Reply | Quote | #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?

  9. Nathan
    October 6th, 2011 at 16:44
    Reply | Quote | #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!

  10. Damien
    October 22nd, 2011 at 23:03

    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

  11. Al
    November 11th, 2011 at 16:58

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

  12. December 21st, 2011 at 01:56

    @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.

  13. Daniel
    June 10th, 2012 at 07:14

    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?