Installing NVidia Drivers on Redhat 6.4 and Removing Nouveau


Recently I’ve been working with the graph database, NEO4J. Much of the usefulness of graph software is in visualizing it. So, I decided to install Gephi on Redhat 6.4. Gephi installed on Redhat easily enough. But it did not display the most important thing, the graph window!  😦

Gephi With No Graph Section

Gephi With No Graph Section

Debugging Gephi:

The Gephi website says:  “Gephi uses an OpenGL 3D engine to speed up graph visualization. However a compatible graphic card is required.”

Here’s how you can add some debugging to Gephi.

export LIBGL_DEBUG=verbose
export MESA_DEBUG=1
export EGL_LOG_LEVEL=debug
cd /gephi/gephi/bin
./gephi &

or:

cd /gephi/gephi/bin
LIBGL_DEBUG=verbose ./gephi &

And what I got was:

Loading native libraries
libGL: OpenDriver: trying /usr/lib64/dri/nouveau_dri.so
libGL error: dlopen /usr/lib64/dri/nouveau_dri.so failed (/usr/lib64/dri/nouveau_dri.so: cannot open shared object file: No such file or directory)
libGL error: unable to load driver: nouveau_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: nouveau
libGL: OpenDriver: trying /usr/lib64/dri/swrast_dri.so
Current Version is 082

And thus began another long, deep decent into Linux internals. Again. 😦

Possible Solutions:

After reading dozens (hundreds?) of webpages, the possibilities to fix this could be grouped into:

1: Use yum to get the missing (Mesa and Nvidia) packages
2: Manually find all the missing (Mesa) RPMs and install them onto Redhat
3: Install the Fedora operating system, which should allow the (Mesa) RPMs to be downloaded.
4: Blacklist nouveau during the boot process
5: Find, download and install NVIDIA RPM files
6: Download and install NVIDIA .run file and configure X window.

Each of these areas took a lot of time to read many webpages, and do a LOT of analysis.

Solution That Worked:

In the end, for various reasons, I did the last option:   Download and install NVIDIA .run file and configure X window.  Here’s how I did it.

Notice that there is no file:
/etc/X11/xorg.conf

cd /usr/share/X11/config

cp  xfree86.cf   xfree86.cf2013july02
cp  xorg.cf  xorg.cf2013july02

cd /etc/modprobe.d/

create file: blacklist-nouveau.conf

add lines:
blacklist nouveau
options nouveau modeset=0

Although many websites suggested that blacklisting was a solution, even after creating the blacklist file, nouveau could be seen with lsmod.

cp blacklist.conf  blacklist.conf2013july02

edit blacklist.conf

Comment out:
#blacklist nvidiafb

cp /etc/inittab   /etc/inittab2013july02

edit /etc/inittab &

set   to:
id:3:initdefault:

———–

Change grub.conf

cp /boot/grub/grub.conf  /boot/grub/grub.conf2013july02

At the end of the lines starting with “kernel”, add:
rdblacklist=nouveau

——-

Reboot to init 3

dmesg | grep -i “nouveau”
– only found in the grub kernel line, good.

————

mkdir /tmp/nvidia

cp /download/nvidia/NVIDIA-Linux-x86_64-319.32.run  /tmp/nvidia

————

Go to init 3, and install the nvidia drivers.

cd /tmp/nvidia

sh NVIDIA-Linux-x86_64-319.32.run -q

Which:
builds kernel module
searches for conflicting x files
installs driver
runs /sbin/ldconfig
Completes.

“Please update XF86Config or xorg.conf”

—-

Then run:
/usr/bin/nvidia-xconfig

Unable to locate/open X configuration file
new X configuration file written to:
/etc/X11/xorg.conf

reboot to init 3.

init 5

GUI Works!

After installing the NVidia drivers, there was no RPM/package for NVidia. But there were many files. Including all the docs, there were around 228 files.

—–

Test Gephi:

as oracle:

cd /gephi/gephi/bin

LIBGL_DEBUG=verbose  ./gephi &

Gephi works!

Gephi Graph Window Works

Gephi Graph Window Works

Reset server to init 5.
cp    /etc/inittab2013july02  /etc/inittab

Configuring yum:

Get correct elrepo keys for yum, and install NVidia RPM.

from: http://oracle-noob.blogspot.com/2011/10/install-nvidia-drivers-on-centos-6.html

cd /etc/yum.repos.d

rpm –import http://elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh http://elrepo.org/elrepo-release-6-4.el6.elrepo.noarch.rpm
yum install kmod-nvidia

rpm -qa | grep -i “nvid”

kmod-nvidia-319.23-1.el6.elrepo.x86_64
nvidia-x11-drv-319.23-1.el6.elrepo.x86_64

More Analysis:

What you see above is just the summarized final solution.

Initially, Oracle did not have the correct .repo file to find any NVidia files. I only found the RPM file above after I’d started down the path of installing the Nvidia.run file.

yum list  nvidia*
Loaded plugins: aliases, changelog, downloadonly, kabi, presto, refresh-packagekit, security, tmprepo, verify, versionlock
Loading support for kernel ABI
Error: No matching Packages to list

Now with yum, I can find all the NVidia RPMs on the elrepo server, but not oracle’s (ol6_latest).

Perhaps things would just as well by installing the NVidia RPMs via yum. If anyone has success with it, please leave a comment.

Mesa:

I did a lot of investigation looking at the file: nouveau_dri.so

libGL error: dlopen /usr/lib64/dri/nouveau_dri.so failed (/usr/lib64/dri/nouveau_dri.so: cannot open shared object file: No such file or directory)

nouveau_dri.so was in the package mesa-dri-drivers-9.0.1-3.fc18.i686“.  So I tried to download and install the mesa packages manually.  But it turns out that there were a lot of packages and prerequisites to go this route.  I felt a simpler method was better.

Nouveau:

rpm -qa | grep -i “nouveau”
xorg-x11-drv-nouveau-1.0.1-3.el6.x86_64

Turns out that Nouveau was all over my server. It came up when I used lsmod. Closely tied in with radeon.

lsmod | grep -i “nouveau”
nouveau               876885  1
ttm                    80957  2 radeon,nouveau
drm_kms_helper         40087  2 radeon,nouveau
drm                   265638  4 radeon,nouveau,ttm,drm_kms_helper
i2c_algo_bit            5935  2 radeon,nouveau
i2c_core               31084  6 i2c_i801,radeon,nouveau,drm_kms_helper,drm,i2c_algo_bit
mxm_wmi                 1967  1 nouveau
video                  20674  1 nouveau
wmi                     6287  2 nouveau,mxm_wmi

Nouveau was also mentioned a lot in /var/log/Xorg.0.log.

Blacklisting nouveau did not make any difference. It just kept coming up like a virus. So much for that.

Freedesktop.org:

Turns out that the organization in charge of nouveau and mesa is Freedesktop.org.

I found these comments on their website:

“About bugs and problems:  Do not report build or compilation failures. Those failures are either your own mistake, or they will be noticed soon anyway. You should follow TroubleShooting, most likely you have an outdated libdrm or kernel. The developers are not interested to help you with installing the 3D drivers. Your fellow users on the other hand might.”

Hmm. Very interesting. So they build video drivers that don’t work with Redhat’s certified NVidia video cards (at least the 3d aspect). Then when they don’t install or work, they say don’t bug me, figure it out yourselves.

Do you say the same things to your company’s users after you build a system that doesn’t work? Or even install? I thought, no wonder the nouveau drivers are not working, with this kind of attitude, “support” and customer (dis)service.

Other Operating Systems:

Suse 12.2:
Gephi worked on Suse. But only if I logged in as root. It did not work as a non root user. No matter how I set the display environment variable, it always complained. Interestingly, when I booted Suse, I got strange screen graphics, unless I logged in as root.

Suse did use the file, /usr/lib/dri/nouveau_dri.so, and at least 7 Mesa packages.

Redhat 5.1, 32 bit:
– no nouveau
– NVidia drivers were installed using an Nvidia??.run.
– I did not bother trying gephi on this old system.

Redhat 5.5, 64 bit:
– no nouveau
– gephi worked perfectly fine!

I didn’t get around to trying Fedora.

Nvidia Installer:

Turns out that the NVidia installer is really good. Especially since they are character based! I’ve actually upgraded a few machines with them.

http://www.nvidia.com/object/unix.html

http://www.nvidia.com/Download/index.aspx?lang=en-us

Thoughts on Oracle Issue Redhat 6.4:

dmesg:
Linux version 2.6.32-358.11.1.el6.x86_64 (mockbuild@ca-build44.us.oracle.com) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC) ) #1 SMP Tue Jun 11 10:24:58 PDT 2013

It bothers me that Gephi worked fine with Redhat 5.5, but not on 6.4. And that I had to take so much time to fix it on 6.4. Why did they add all these packages (nouveau, mesa) to 6.4 that didn’t work?

When I got this 64 bit server, some video cards did not work with it. So before I bought the video card (NVIDIA Corporation G96 [Quadro FX 580), I researched to ensure that it was certified with Redhat 64 bit, and also worked on Windows 64 bit.

For the basic 2D stuff, the card worked fine. But it didn’t work with the 3D and it caused me a lot of grief.

NVidia is a market leader in video cards. Why are the NVidia packages not available via Oracle’s public-yum-ol6.repo? Especially when I’m using an Oracle certified video card?

Oracle 12 is getting big into Unstructured Data Management. The enterprise edition has an option for Oracle Spatial and Graph. What good is a graph, or spatial, if you can’t see it on your screen?

If anyone knows a way to turn off nouveau and mesa during Redhat installation, please leave a comment. After all this time, I’m not inclined to do even more research on it.

As I was searching for a solution, I came across an old blog post I’d done in 2004. It was, get this, complaining about how difficult it was to install NVidia drivers on Redhat!

Redhat 6.4 Network Disabled By Default!

In addition to the video drivers, I had a lot of trouble when I installed 6.4. The network just did not want to work. It did not make sense at all. Other operating systems  installed and the network worked fine. The staff at forums.oracle.com had no idea why it wouldn’t work, and had no clear solution.

Finally, after yet another reinstall of the operating system, I saw an icon in the bottom right corner. It was making a (counter?) clockwise motion. I clicked it, and I got a pop up menu. One of the options was: Enable Network!!!!

Turns out there is a small checkbox during installation to configure the network.  When I first installed, I assumed it was to set static or other configurations.  But it is actually to enable the network.  I don’t recall configuring networks during Redhat installations since Redhat 2.

Can you believe it?  All other operating systems in the world automatically configure the network during installation. Except Redhat! Who decided that? Go figure.

Useful Links:

NVidia:

http://www.nvidia.com/object/unix.html

http://www.nvidia.com/Download/index.aspx?lang=en-us

Linux x64 (AMD64/EM64T) Display Driver
http://www.nvidia.com/object/linux-display-amd64-319.32-driver.html
to download: NVIDIA-Linux-x86_64-319.32.run
22 megabytes

NVIDIA Accelerated Linux Graphics Driver README and Installation Guide
http://us.download.nvidia.com/XFree86/Linux-x86_64/319.32/README/index.html
– an entire book with 35 chapters and 10 appendices! No, I don’t want to read 35 chapters. I just want it to work!

Using YUM:

Install Nvidia drivers on CentOS 6 and RHEL 6
http://oracle-noob.blogspot.com/2011/10/install-nvidia-drivers-on-centos-6.html
– the site to get the correct RPM-GPG-KEY to work with yum, and get the Nvidia drivers

http://www.if-not-true-then-false.com/2011/fedora-15-nvidia-drivers-install-guide/
– lists and instructions of Nvidia packages you can install, if yum can find it.

Linux Dual Graphic Computer Monitors
http://www.yolinux.com/TUTORIALS/LinuxAndDualMonitors.html

Modify xorg.conf for better performance
http://tuxradar.com/content/modify-xorgconf-better-performance

Howto install nVidia using Yum
http://rpmfusion.org/Howto/nVidia

Nouveau:

HOW-TO: Unload nouveau and Install Nvidia Driver
http://www.pimp-my-rig.com/2012/01/unload-nouveau-install-nvidia-driver.html

Fedora:

http://www.fedorafaq.org/

Enterprise Linux or Fedora?
http://www.redhat.com/software/rhelorfedora/

Fedora 18 nVidia Drivers Install / Uninstall Guide
http://www.if-not-true-then-false.com/2013/fedora-18-nvidia-guide/

Fedora 18 Packages
https://admin.fedoraproject.org/pkgdb/collections/name/f18?packages_tgp_ordering=name&_csrf_token=6c7f963e6bf505712b0de888a11d62edfa156e70&packages_tgp_limit=100&packages_tgp_no=68

Mesa and nouveau_dri.so:

Fedora 18 64-bit and 32-bit 3D-Games
http://libpepflashplayer.soforums.fedoraforum.org/showthread.php?t=287699

RHEL6: NVIDIA driver fails to load because “Nouveau” driver is in use
http://www-947.ibm.com/support/entry/portal/docdisplay?lndocid=MIGR-5088143

Disable Nouveau driver in prep to install Nvidia driver
http://www.linuxquestions.org/questions/fedora-35/f15-disable-nouveau-driver-in-prep-to-install-nvidia-drvr-877107/

Redhat:
How to install Nvidia CUDA environment in RHEL 6
https://access.redhat.com/site/solutions/64300

How To Configure Using BlackList:

ATI and Nvidia Broken on RHEL 6
https://jehurst.wordpress.com/2010/05/03/ati-and-nvidia-broken-on-rhel-6/

Installing NVIDIA drivers on 64-bit RHEL 6
http://www.twodee.org/weblog/?p=1056

Installing nVidia driver under CentOS & Red Hat 6.0
http://www.spiderbird.com/2011/02/05/installing-nvidia-driver-under-centos-red-hat-6-0/

Nouveau kernel driver
http://www.linuxquestions.org/questions/ubuntu-63/nouveau-kernel-driver-825432/

Sources For RPMs:

http://rpm.pbone.net

http://rpmfind.net

Red Hat Enterprise Linux 6 > nvidia-graphics
http://packages.atrpms.net/dist/el6/nvidia-graphics/

Nouveau + Nvidia Driver Solution

https://www.linuxquestions.org/questions/fedora-35/fedora-12-nouveau-nvidia-driver-solution-771248/
“a word of WARNING  if you do use the atrpm repo for thee nvidia driver YOU ARE STUCK using ONLY THE ATRPM REPO . It is INCOMPATIBLE with rpmfusion this also means YOU MUST USE THE KERNEL FROM ATRPM Disable ALL other repo’s if you use atrpm.”

5 Responses to Installing NVidia Drivers on Redhat 6.4 and Removing Nouveau

  1. Ron Banks says:

    Here’s what I did on my CentOS 6.4 to make google earth work. I extracted the

    nouveau_dri.so driver from
    mesa-dri-drivers-8.0.5-1.el6.elrepo.i686.rpm

    rpm2cpio mesa*.rpm | cpio -idv

    and dropped in in /usr/lib/dri which isn’t included in mesa-dri-drivers-9.0-0.8.el6_4.3.i686 which my system has and google-earth works just fine now. Still getting the missing libstdc++.so.6 error but I got the earth to move ;-}

  2. Paul Fenton says:

    Worked perfectly, thank you for your hard work in putting this all together.

  3. Thank you so much. This is amazing and super helpful.

  4. rodgersnotes says:

    You’re welcome. Glad it’s useful.

  5. fometeo says:

    Thank you, it was helpful 🙂

Leave a comment