Xorg "No screens found" error when booting, after CUDA rpm installation

I’m using CUDA 5.5 in RHEL 6.3. Previously, everything worked just fine: the system booted to X windows and I could use CUDA. Recently I tried re-installing the NVidia driver and CUDA 5.5 using the rpm. Since then, I have not been able to boot into X windows. Xorg.5.log shows the following:

[ 50.071] (EE) NVIDIA(0): Failed to assign any connected display devices to X screen 0.
[ 50.071] (EE) NVIDIA(0): Set AllowEmptyInitialConfiguration if you want the server
[ 50.071] (EE) NVIDIA(0): to start anyway
[ 50.355] (EE) NVIDIA(0): Failing initialization of X screen 0
[ 50.355] (II) UnloadModule: “nvidia”
[ 50.355] (II) Unloading nvidia
[ 50.355] (II) UnloadModule: “wfb”
[ 50.355] (II) Unloading wfb
[ 50.355] (II) UnloadModule: “fb”
[ 50.355] (II) Unloading fb
[ 50.355] (EE) Screen(s) found, but none have a usable configuration.
[ 50.355]
Fatal server error:
[ 50.355] no screens found
[ 50.355]
Please consult the Red Hat, Inc. support
at https://www.redhat.com/apps/support/
for help.
[ 50.355] Please also check the log file at “/var/log/Xorg.5.log” for additional information.
[ 50.355]

I’ve also tried the following:

  • Uninstalled all NVidia rpms (xorg-x11-drv-nvidia*, nvidia*, cuda-*), then installed CUDA 5.5 from .run file (like my original installation which used to work).
  • Installed CUDA 6.0 RC version of the driver from CUDA .run file.
  • Installed the latest version of the driver (331.49) using the .run file.

The result is the same in every case, with the same errors in Xorg.5.log.

I made sure in every case that there was an xorg.conf file, running nvidia-xconfig if needed. The nouveau driver is not loaded (verified with lsmod). I tried the “uppermem 524288”, “vmalloc=256MB”, and “nomodeset” options in grub.conf, but these did not help.

My system has a GTX 680 (the display GPU) and a GTX 580.

Apparently the CUDA/driver rpms did something to my system that is preventing it from starting X.

Does anyone know how I can get this system to go into X windows again?

I finally got this system to work again. I think what fixed it was reinstalling the CUDA 5.5 driver from the .run file, rebooting to runlevel 3, and then reinstalling CUDA 5.5 driver a second time.

I believe the root cause was that I forgot to uninstall CUDA using nvidia-uninstall before installing CUDA using the rpm.

On a side note, I was able to restore the GL libraries to their original (non-CUDA) state using:

sudo yum reinstall mesa-libGL-devel-7.11 mesa-libGLU-7.11 mesa-libGL-7.11 mesa-libGLU-devel-7.11 mesa-dri-drivers-7.11

Then I manually had to fix the /usr/lib64/libGL.so.1 symlink. After that, I installed the NVidia driver again. This GL library recovery might have been necessary for the system to start working again, but I’m not sure: it wasn’t until I did the reinstall-reboot-reinstall that I was able to boot into X windows with the NVidia driver.

The moral of the story is, before installing the driver from rpm files, be sure to remove the existing NVidia driver (if it’s installed), using nvidia-uninstall. The CUDA release notes state this, but it’s easy to forget and not obvious how to recover the system if you do forget.