Ubuntu ugrade 17.10 to 18.04 nvidia black screen
Solution 1
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 |
+-----------------------------------------------------------------------------+
Solution 2
After trying lots of fixes, drivers and others, simply adding a new parameter (pci=nomsi) in grub boot options worked for me.
At startup, when grub starts, press E to edit the boot options, find the linux line, and after "quiet nosplash", add pci=nomsi, i.e:
linux /boot/vmlinuz-linux root=UUID=978e3e81-8048-4ae1-8a06-aa727458e8ff ro quiet nosplash pci=nomsi
If this works, edit permanently the grub options to start always with pci=nomsi
Related videos on Youtube
cudiaco
Updated on September 18, 2022Comments
-
cudiaco over 1 year
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?
-
Terrance almost 6 yearsDoes any of the Ctrl+Alt+F2 thru F6 work at all?
-
cudiaco almost 6 yearsI cycled through ctrl+alt+ f1-f12, none of them worked. I did manage to enter recovery mode by holding shift after the bios screen, got to a terminal and purged the nvidia drivers. I am now able to get back to my desktop (using nouveau), but re-installing the drivers from scratch reproduces the issue.
-
Terrance almost 6 yearsTry this installation: askubuntu.com/a/1030901/231142 The video driver is the last half of the answer.
-
cudiaco almost 6 yearsFWIW when I re-installed the drivers the first time around it was from the Ubuntu software center, which I believe pulls from the same repo.
-
Terrance almost 6 yearsOne way to check before you install it then is to run
apt-cache showpkg <nvidia-package-name>
and that will tell you what repo it came from. -
cudiaco almost 6 yearsthe PPA is being installed from the official ubuntu repo. Sadly it's the same issue following the steps that you have provided :c
-
Terrance almost 6 yearsLook in your
/etc/X11
folder and see if there are anyxorg.conf.XXXXXXXX
files? Might be that you need to move one of those back. I have had that issue where upgrades and installs back up thexorg.conf
to one of those and then my graphics are all messed up. -
cudiaco almost 6 yearsDoesn't seem to be anything in there with that file pattern.
-
Terrance almost 6 yearsUnfortunately, I am out of ideas for the video issue. With upgrades it can be nearly next to impossible to figure out if something went wrong. I didn't perform the my upgrade from 17.10, mine was 16.04 to 18.04 and I totally regretted the upgrade. It messed up my video drivers badly and I couldn't fix it due to dependency issues that could not be corrected. I ended up clean installing Ubuntu. Come to think of it, I don't think I have actually ever performed an upgrade of Ubuntu without having to go back and clean install. Sorry I am not much more help beyond this. Maybe someone knows.
-
cudiaco almost 6 yearsI appreciate the help, thanks for giving it a shot @Terrance.
-
cudiaco almost 6 yearsAfter one more attempt at installing the drivers, I got back to the black screen, rebooted and was completely unable to access the recovery mode. Needless to say this upgrade completely destroyed my installation. I gave up and installed Windows :-/
-
-
HotFudgeSunday over 5 yearsLots of different threads out there about this bug, some very confusing. But you've got it. I only had to update the driver. I don't have the "nvidia-drm-outputclass-ubuntu.conf" file. Still, my card is a secondary card, as in I have an onboard GPU which was the only thing working. I had the nVidia set as primary on my BIOS settings (my board is UEFI), but I couldn't boot with it. So to switch from Win to Linux I had to keep changing the cards in BIOS. Painful. Thanks!