Black screen after installing CUDA 10.1 in Ubuntu 18.04

Hi, I am trying to install the CUDA 10.1 on my desktop. The CPU is Intel 8700, and the graph card is RTX2060.

The Ubuntu works fine with the 418.43 driver from the official website.

The problem is that after installing CUDA using local/network .deb way, I got a totally black screen when I try to login after rebooting. And I cannot switch to tty terminals using Ctrl+ Alt + Fn at the login screen.

I have installed Ubuntu and CUDA several times. Can anyone give some suggestions?


Is your display attached to the motherboard graphics or is it attached to the RTX2060?

If it is attached to the motherboard graphics, the linux install guide covers what to do:

you want to not install the openGL libraries, which are messing up your intel graphics display driver.

The display is attached to the RTX2060, and the intel graphics drivers are not installed automatically and manually.

Ubuntu 18.04 comes in several different versions, such as 18.04.1 and 18.04.2

which are you using?

Anyway, I noticed you said this:

“The Ubuntu works fine with the 418.43 driver from the official website.”

I don’t know what “the official website” is. Are you referring to a NVIDIA web site?

If so, and you are happy with that driver, then when installing the .deb package, instead of doing:

sudo apt-get install cuda


sudo apt-get install cuda-toolkit

(or: sudo apt-get install cuda-toolkit-10-1)

This will install everything except the driver, and keep your 418.43 driver which you are happy with.

Thank you. I have noticed that the driver version rolled back to the 418.39 everytime I installed cuda, which may be the reason of the black screen.

My final solution is go back to Ubuntu 16.04.6. Which now works perfectly with CUDA.

The official .deb (local) works, but only after you install the graphics-drivers ppa version of nvidia-driver-418.

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-driver-418

Then reboot. You should not have a permanent black screen and you should be able to use nvidia-smi. Then just follow the download page instructions:

sudo dpkg -i cuda-repo-ubuntu1804-10-1-local-10.1.105-418.39_1.0-1_amd64.deb
sudo apt-key add /var/cuda-repo-10-1-local-10.1.105-418.39/
sudo apt-get update
sudo apt-get install cuda

You should be able to verify your CUDA installation by

cd /usr/local/cuda-10.1/samples
sudo make # This takes a long time

You should see something like

Comparing CUBLAS Matrix Multiply with CPU results: PASS

if it works.

To NVIDIA devs: the problem is that the official nvidia-driver-418 has a deep dependency on xserver-xorg-core which requires ubuntu-desktop and all other xorg packages (because they have the hwe suffix) to be removed. See this AskUbuntu thread: and this Reddit thread: