I have a Geforce GTX Titan X GPU machine. When it was 15.10, CUDA 7.5 and NVIDIA display driver 352.63 things were fine. Recently I wanted to install caffe2 that requires a CUDA 8.0. So I upgraded Ubuntu from 15.10 to 16.04 as CUDA 8.0 is available for 16.04. I installed CUDA 8.0 and the default display driver comes with it as well. After installation, the screen had gone black. Later installed CUDA 9.0 and the result was the same. Keeping CUDA 9.0, I installed various NVIDIA drivers from 361 to 375 to 384 to the recent 390. Nothing worked for me. I followed blacklisting nouveau, 'nomodeset' in grub, completely removing the older NVIDIA drivers and so on. But I couldn't able to figure out a solution to overcome the problem. Can anyone help me to figure out a solution given the above specification?. Please note that I followed all other Stack Exchange solutions for a black screen/log in problems however the GPU and Ubuntu version are different and those solutions didn't work for me.

1 Answer 1


1)Install fresh Ubuntu OS (16.04). Check if you have a NVIDIA graphics card

lspci | grep VGA

2)Run the following commands in a terminal

sudo apt-get update
sudo apt-get install  build-essential
sudo apt-get install g++ build-essential
sudo apt-get install linux-headers-$(uname -r)

3)Add the repository containing nvidia latest drivers

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update

4)Open System Settings > Softwares & Updates > Additional Drivers. Select the latest nvidia-driver that you can see instead of the nouveau driver that is selected by default. Click on apply changes and wait for the process to finish (Or)

sudo ubuntu-drivers devices
sudo ubuntu-drivers autoinstall 

5)Reboot Verify the nvidia driver is selected in the above Additional Drivers location (or) run the following and check if driver is nvidia

sudo lshw -c video | grep configuration

6)Run the following command to create the file

sudo vim /etc/modprobe.d/blacklist-nouveau.conf

In the editor add the following lines:

blacklist nouveau
options nouveau modeset=0

7)Run the following command

sudo update-initramfs -u

8) Download Cuda runfile installer from https://developer.nvidia.com/cuda-downloads This currently has cuda 9.1. Older versions are also available in the site. 9)Reboot 10)Run the following commands

sudo chmod 755 <Path-to-cuda-runfile>
sudo sh <Path-to-cuda-runfile>

The installer will prompt for the following: EULA Acceptance - accept *CUDA driver installation - no (Important that you do not install driver here) Install CUDA toolkit - yes at default path Create Symbolic link - yes Install CUDA samples - yes at default path 11)Reboot and login 12)Edit the ~/.bashrc file and add the following at the end

export CUDA_HOME=/usr/local/cuda
export PATH=$PATH:${CUDA_HOME}/bin

13)Open a new terminal and run the following command to verify nvcc compiler

nvcc --version

OPTIONAL - Build and test cuda samples 14) Run the following

cd ~/NVIDIA_CUDA_*_Samples
cd 1_Utilities/deviceQuery
sudo ./deviceQuery

The above app should output PASS

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.