Tuesday, October 6, 2015

Running CUDA 7 on Ubuntu 14.04: blank screen after CUDA install: Solved

Update: CUDA 8 is awesome; and seems more stable.
--

Installation of CUDA on Ubuntu 14 has resulted in blank screen. After fixing those issues, the GUI login screen shows up, but login would not work. After multiple attempts to fix, either CUDA works or X works.

Trying to use Nouveau driver for GUI and Nvidia driver for CUDA, lead me to a blog [1]. It worked for me and thanks Chen.

Chen suggests to blacklist Nouveau (which CUDA installer does as well), remove and purge nvidia drivers, install CUDA. During this part, install Nvidia driver, but NOT the OpenGL driver.

And everything works. Thanks, Chen.



To fix Ubuntu's blank Screen

If Ubuntu boots to blank screen [2]:
  1. Goto command line: ctrl + alt + f1.
  2. Stop lightdm: sudo service lightdm stop
  3. Disable gpu-manager by backing up /etc/init/gpu-manger.conf and commenting its contents.
  4. Switch to prime mode by installing and using sudo prime-select nvidia
  5. Get the correct busid for nvidia: lspci | grep NVIDIA
  6. Update /etc/X11/xorg.conf with the correct busid. "PCI:01:00.0"
  7. Perform sudo chattr +i /etc/X11/xorg.conf
  8. Start lightdm: sudo service lightdm start

Reference:
[1] Chen, https://chuanwen.wordpress.com/2015/07/19/run-cuda-on-ubuntu-14-04-2/
[2] http://vxlabs.com/2015/02/05/solving-the-ubuntu-14-04-nvidia-346-nvidia-prime-black-screen-issue/