Ubuntu – Ubuntu ugrade 17.10 to 18.04 nvidia black screen

17.1018.04nvidia

I just upgraded my machine from 17.10 to 18.04, however now when the computer boots up, logging in just shows a black screen, completely unusable.

In the login screen the ctrl+alt+f1 doesn't bring up a terminal, making it virtually impossible to manipulate the system.

My machine consists of an Ryzen 1600, 16gb of RAM and an nvidia gtx 1060.

Is there any recourse without having to re-install everything?

Best Answer

This bug has tormented me for a full week now, and I still had not managed to fix it after countless installs on 3 different systems. In the end I followed the tip from Terrance with some tweaks and it seemed to work for me. I decided to clean up my approach and provide it here as a full answer.

The problem seems to be with the binary nvidia binary driver version 390 which is default.

To fix the problem, simply install the next version 396. You can do this in Ubuntu 18.04LTS (Bionic Beaver) follow the steps below:

Run the following command to install a repository dedicated to the latest graphics driver versions:

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

You have to press ENTER at the prompt.

Then run the following command to update your repo locally with new ppa:

sudo apt update

Finally run the following command to install version 396 of the graphics driver:

sudo apt install nvidia-driver-396

At this stage you may be good to go, and simply go to the step with the reboot below. However, I also had to make a small change.

Run the following command to open for editing

sudo nano /usr/share/X11/xorg.conf.d/nvidia-drm-outputclass-ubuntu.conf

In that file, comment out the line that says Option "PrimaryGPU" "yes" and save/close the file with <CTRL + O> and <CTRL + X> keyboard combos.

At this stage you may also be fine, however I needed another tweak before I got it working.

Run the following command to edit your sources file>

sudo nano /etc/apt/sources.list

At the bottom of the file add a line on its own:

deb http://us.archive.ubuntu.com/ubuntu/ bionic-proposed multiverse main universe restricted

Save/close the file with <CTRL + O> and <CTRL + X> keyboard combos.

Run the following command to update your local repo agian after adding the new source. WARNING: This will add proposed versions of software to your system, which may be less stable.

sudo apt update
sudo apt upgrade
sudo apt dist-upgrade

Run the following command to install some needed packages that may be missing:

sudo apt install libglvnd0 xserver-xorg-core libgl1-mesa-glx

Once this completes, it is time for a reboot.

After the reboot, you can run the command nvidia-smi to see what was installed:

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 396.24                 Driver Version: 396.24                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 760     Off  | 00000000:02:00.0 N/A |                  N/A |
| 49%   51C    P0    N/A /  N/A |    262MiB /  1998MiB |     N/A      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0                    Not Supported                                       |
+-----------------------------------------------------------------------------+
Related Question