No GUI after Kubuntu 18.04 -> 18.10 Upgrade

Asked by xghost

Upgrading my (MSI GP72) laptop running Kubuntu 18.04 -> 18.10 (via `sudo do-release-upgrade`), the GUI doesn't show up. You hear the sound of the greeter coming up, but the login screen is never displayed.

I can login using the terminal and use the laptop normally locally or remotely (i.e. I can SSH into it). I've not found any (obvious) error messages in the following log files:

* /var/log/syslog
* /var/log/boot.log
* /var/log/kern.log
* /var/log/nvidia-installer.log

Checking systemctl status lightdm.service shows it's running. Restarting the service makes no difference. I removed/purged plasma-workspace, plasma-desktop, and nvidia-driver-390 packages (and then autoremoved unused packages), rebooted, and re-installed them, to no effect.

A couple of years ago, I was able to fix a similar issue for 16.04 (https://askubuntu.com/questions/838212/ubuntu-16-10-fails-to-boot-in-msi-gp72-laptop/), but I'm stuck on this one.

How can I fix this issue?

Thanks in advance.

PS: I've been using Ubuntu-based distros since 2006, and it's a shame that upgrading ALWAYS breaks something, usually on the display side. I would've hoped that this kind of recurring problem would've been addressed at some point in the last 10+ years... :/

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Do you use proprietary video drivers, please?

Revision history for this message
xghost (h-k-ghost) said :
#2

Yes, I do. That's why I mentioned the NVIDIA logs. I took a look at the following log files (among others):

    /var/log/nvidia-installer.log
    /var/log/gpu-manager.log: shows the nouveau driver not loaded and blacklisted
    /var/log/Xorg.0.log: only a line with No monitor specified for screen "nvidia". stands out to me

Checking systemctl status lightdm.service shows it's running. Restarting the service makes no difference. I removed/purged the plasma-workspace, plasma-desktop, and nvidia-driver-390 packages (and then sudo apt autoremove -y --purge unused packages), rebooted, and re-installed them, to no effect.

Output from a few commands that may be helpful:

$ ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd0000139Bsv00001462sd0000115Bbc03sc02i00
vendor : NVIDIA Corporation
model : GM107M [GeForce GTX 960M]
driver : nvidia-driver-390 - distro non-free recommended

$ dkms status
nvidia, 390.87, 4.15.0-36-generic, x86_64: installed
nvidia, 390.87, 4.18.0-10-generic, x86_64: installed
virtualbox, 5.2.18, 4.15.0-36-generic, x86_64: installed
virtualbox, 5.2.18, 4.18.0-10-generic, x86_64: installed

$ lsmod | grep nvidia
nvidia_uvm 786432 0
nvidia_drm 40960 1
nvidia_modeset 1110016 2 nvidia_drm
nvidia 14368768 61 nvidia_uvm,nvidia_modeset
drm_kms_helper 172032 2 nvidia_drm,i915
drm 458752 5 drm_kms_helper,nvidia_drm,i915
ipmi_msghandler 102400 2 ipmi_devintf,nvidia

After getting 198 lines back, this is the subset of lines that stood out to me the most; it looks as if it can't find nvidia driver files:

$ grep nvidia /var/log/syslog

Oct 21 14:36:22 red-dragon [485]: failed to execute '/usr/bin/nvidia-smi' '/usr/bin/nvidia-smi': No such file or directory
Oct 21 14:36:22 red-dragon systemd-udevd[456]: Process '/usr/bin/nvidia-smi' failed with exit code 2.
Oct 21 14:36:22 red-dragon ureadahead[826]: ureadahead:/usr/share/lightdm/lightdm.conf.d/90-nvidia.conf: No such file or directory
Oct 21 14:36:22 red-dragon ureadahead[826]: ureadahead:/usr/share/X11/xorg.conf.d/10-nvidia.conf: No such file or directory
Oct 21 14:36:22 red-dragon ureadahead[826]: ureadahead:/usr/lib/x86_64-linux-gnu/tls/libnvidia-tls.so.390.87: No such file or directory
Oct 21 14:36:22 red-dragon ureadahead[826]: ureadahead:/usr/lib/x86_64-linux-gnu/libnvidia-glcore.so.390.87: No such file or directory
Oct 21 14:36:22 red-dragon ureadahead[826]: ureadahead:/usr/lib/x86_64-linux-gnu/nvidia/xorg/nvidia_drv.so: No such file or directory
Oct 21 14:36:22 red-dragon ureadahead[826]: ureadahead:/usr/lib/x86_64-linux-gnu/nvidia/xorg/libglx.so.390.87: No such file or directory
Oct 21 14:36:22 red-dragon ureadahead[826]: ureadahead:/usr/share/nvidia/nvidia-application-profiles-390.87-rc: No such file or directory
Oct 21 14:36:22 red-dragon ureadahead[826]: ureadahead:/usr/lib/x86_64-linux-gnu/libGLX_nvidia.so.390.87: No such file or directory
Oct 21 14:36:22 red-dragon nvidia-persistenced: Verbose syslog connection opened
Oct 21 14:36:22 red-dragon nvidia-persistenced: Now running with user ID 126 and group ID 134
Oct 21 14:36:22 red-dragon nvidia-persistenced: Started (1101)
Oct 21 14:36:22 red-dragon nvidia-persistenced: Failed to open libnvidia-cfg.so.1: libnvidia-cfg.so.1: cannot open shared object file: No such file or directory

While it could be that the files are being found elsewhere (dkms and lsmod show the drivers loaded), the odd part is that it also complains about not being able to execute /usr/bin/nvidia-smi, yet the file exists and I can run it just fine from the shell.
driver : xserver-xorg-video-nouveau - distro free builtin

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

If you uninstall the Nvidia drivers and use the opensource nouveau driver is it OK?

What is the output of:

dpkg -l | grep -i Nvidia

Thanks

Revision history for this message
xghost (h-k-ghost) said :
#4

I've not tried using the nouveau driver in some time, because the OpenGL-based applications I've been working in the last couple of years won't run with it, among other things. Even if it were to work out, I'd simply be less stuck.

The command's output is as follows:

```
$ dpkg -l | grep nvidia
ii libcuda1-384 390.87-0ubuntu1 amd64 Transitional package for nvidia-headless-390
ii libnvidia-cfg1-390:amd64 390.87-0ubuntu1 amd64 NVIDIA binary OpenGL/GLX configuration library
ii libnvidia-common-390 390.87-0ubuntu1 all Shared files used by the NVIDIA libraries
ii libnvidia-compute-390:amd64 390.87-0ubuntu1 amd64 NVIDIA libcompute package
ii libnvidia-compute-390:i386 390.87-0ubuntu1 i386 NVIDIA libcompute package
ii libnvidia-decode-390:amd64 390.87-0ubuntu1 amd64 NVIDIA Video Decoding runtime libraries
ii libnvidia-decode-390:i386 390.87-0ubuntu1 i386 NVIDIA Video Decoding runtime libraries
ii libnvidia-encode-390:amd64 390.87-0ubuntu1 amd64 NVENC Video Encoding runtime library
ii libnvidia-encode-390:i386 390.87-0ubuntu1 i386 NVENC Video Encoding runtime library
ii libnvidia-fbc1-390:amd64 390.87-0ubuntu1 amd64 NVIDIA OpenGL-based Framebuffer Capture runtime library
ii libnvidia-fbc1-390:i386 390.87-0ubuntu1 i386 NVIDIA OpenGL-based Framebuffer Capture runtime library
ii libnvidia-gl-390:amd64 390.87-0ubuntu1 amd64 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii libnvidia-gl-390:i386 390.87-0ubuntu1 i386 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii libnvidia-ifr1-390:amd64 390.87-0ubuntu1 amd64 NVIDIA OpenGL-based Inband Frame Readback runtime library
ii libnvidia-ifr1-390:i386 390.87-0ubuntu1 i386 NVIDIA OpenGL-based Inband Frame Readback runtime library
ii nvidia-compute-utils-390 390.87-0ubuntu1 amd64 NVIDIA compute utilities
ii nvidia-dkms-390 390.87-0ubuntu1 amd64 NVIDIA DKMS package
ii nvidia-driver-390 390.87-0ubuntu1 amd64 NVIDIA driver metapackage
ii nvidia-headless-390 390.87-0ubuntu1 amd64 NVIDIA headless metapackage
ii nvidia-headless-no-dkms-390 390.87-0ubuntu1 amd64 NVIDIA headless metapackage - no DKMS
ii nvidia-kernel-common-390 390.87-0ubuntu1 amd64 Shared files used with the kernel module
ii nvidia-kernel-source-390 390.87-0ubuntu1 amd64 NVIDIA kernel source package
rc nvidia-opencl-icd-375 384.90-0ubuntu0.17.04.1 amd64 Transitional package for nvidia-opencl-icd-384
rc nvidia-opencl-icd-384 390.48-0ubuntu3 amd64 Transitional package for nvidia-headless-390
ii nvidia-prime 0.8.10 all Tools to enable NVIDIA's Prime
ii nvidia-settings 390.77-0ubuntu1 amd64 Tool for configuring the NVIDIA graphics driver
ii nvidia-utils-390 390.87-0ubuntu1 amd64 NVIDIA driver support binaries
ii xserver-xorg-video-nvidia-390 390.87-0ubuntu1 amd64 NVIDIA binary Xorg driver
```

PS: Sorry for the poor formatting. I'm checking to see if this supports markdown.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

sudo dpkg -P nvidia-opencl-icd-375 nvidia-opencl-icd-384
sudo apt-get --purge remove xserver-xorg-video-nvidia-390
sudo apt-get --purge remove nvidia-driver-390
sudo apt-get --purge autoremove
sudo apt-get clean
sudo reboot

Do you get the GUI OK?

Revision history for this message
xghost (h-k-ghost) said :
#6

No, I don't get the GUI.

After those commands, rebooting simply drops me on the terminal login. You don't even hear the GUI greeter in the background "behind" the black screen.

That said, it looks like those commands have left some stuff behind. For example:

$ lsmod | grep nvidia
nvidia_uvm 786432 0
nvidia_drm 40960 0
nvidia_modeset 1110016 1 nvidia_drm
nvidia 14368768 2 nvidia_uvm,nvidia_modeset
drm_kms_helper 172032 2 nvidia_drm,i915
drm 458752 4 drm_kms_helper,nvidia_drm,i915
ipmi_msghandler 102400 2 ipmi_devintf,nvidia

$ dpkg -l | grep nvidia
ii libcuda1-384 390.87-0ubuntu1 amd64 Transitional package for nvidia-headless-390
ii libnvidia-compute-390:amd64 390.87-0ubuntu1 amd64 NVIDIA libcompute package
ii nvidia-compute-utils-390 390.87-0ubuntu1 amd64 NVIDIA compute utilities
ii nvidia-dkms-390 390.87-0ubuntu1 amd64 NVIDIA DKMS package
ii nvidia-headless-390 390.87-0ubuntu1 amd64 NVIDIA headless metapackage
ii nvidia-headless-no-dkms-390 390.87-0ubuntu1 amd64 NVIDIA headless metapackage - no DKMS
ii nvidia-kernel-common-390 390.87-0ubuntu1 amd64 Shared files used with the kernel module
ii nvidia-kernel-source-390 390.87-0ubuntu1 amd64 NVIDIA kernel source package

Because of this, I went ahead and tried this to remove nvidia left-overs:

$ sudo apt remove --purge -y nvidia-\* && sudo apt autoremove -y --purge && sudo reboot

Now it gets hangs during boot and won't even get to the console, so I'm looking at the recovery options to try and get it to boot. If you're aware of boot options I could use to get the system to boot, I'd appreciate it. (I was already using pci=nomsi acpi_osi="Linux" due to issues specific to this laptop.)

Thanks for the help, btw.

Revision history for this message
xghost (h-k-ghost) said :
#7

So, I got the system back to a state where it boots. I re-installed the nvidia-driver-390 package (and its dependencies) after that and I'm now back to "square one" in this question, i.e.

1. No GUI;
2. Hear the greeter in the background "behind" the black screen

After more reading and trying more things, I'm still no closer to getting the GUI back.

If anyone has additional suggestions or requests for info, I'd be happy to provide them.

Thanks.

Revision history for this message
Manfred Hampl (m-hampl) said :
#8

Have you already tried uninstalling the NVidia driver packages and using the nouveau package?
(This as a temporary test to check whether the xorg environment is functioning at all.)

Revision history for this message
xghost (h-k-ghost) said :
#9

I have not tried that. I intended to look into that when I was uninstalling the nvidia packages as mentioned above. In addition, the steps that I'm coming across in searches normally focus on doing the opposite, i.e. removing nouveau and using the nvidia ones.

I intended to follow some of the steps backwards to re-enable nouveau, but even this was difficult b/c of differences and often a GUI dependency on tutorials.

Checking with the prime-switch, it shows nouveau as being blacklisted and not loaded, but checking the files under /etc/modprobe.d/ directory doesn't show any matches for nouveau being blacklisted in any of those files, as shown below:

    $ cd /etc/modprobe.d/
    $ for f in $(ls); do
    for> echo "Checking ${f}..."
    for> grep nouveau ${f}
    for> done
    Checking alsa-base.conf...
    Checking amd64-microcode-blacklist.conf...
    Checking blacklist-ath_pci.conf...
    Checking blacklist.conf...
    Checking blacklist-firewire.conf...
    Checking blacklist-framebuffer.conf...
    Checking blacklist-modem.conf...
    Checking blacklist-oss.conf...
    Checking blacklist-rare-network.conf...
    Checking dkms.conf...
    Checking intel-microcode-blacklist.conf...
    Checking iwlwifi.conf...
    Checking vmwgfx-fbdev.conf...

If you can share steps to replace nvidia drivers for nouveau, particularly on removing its blacklisted status so that they get loaded, I'd appreciate it. The nouveau drivers themselves appear to be installed:

    $ dpkg --list | grep nouveau
    ii libdrm-nouveau2:amd64 2.4.95-1 amd64 Userspace interface to nouveau-specific kernel DRM services -- runtime
    ii libdrm-nouveau2:i386 2.4.95-1 i386 Userspace interface to nouveau-specific kernel DRM services -- runtime
    ii xserver-xorg-video-nouveau 1:1.0.15-3 amd64 X.Org X server -- Nouveau display driver

But they're not getting loaded for being blacklisted:

$ sudo prime-switch # reading from /var/log/gpu-manager-switch.log; shortened for brevity
[...]
Is nvidia loaded? yes
Was nvidia unloaded? no
Is nvidia blacklisted? no
Is intel loaded? yes
Is radeon loaded? no
Is radeon blacklisted? no
Is amdgpu loaded? no
Is amdgpu blacklisted? no
Is amdgpu versioned? no
Is amdgpu pro stack? no
Is nouveau loaded? no
Is nouveau blacklisted? yes
Is nvidia kernel module available? yes
Is amdgpu kernel module available? no
[...]

Revision history for this message
Manfred Hampl (m-hampl) said :
#10

What is the output of

grep nouveau /etc/default/grub

Revision history for this message
xghost (h-k-ghost) said :
#11

There's no output; no matches for nouveau in the file.

Revision history for this message
xghost (h-k-ghost) said :
#12

Is everyone out of ideas? Do I need to turn this into an bug report or something? I'm starting to think that I should, since this problem appears to be non-trivial AND it was caused by the system upgrade process...

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#13

I suggest you report a bug. You do realise that Cosmic (Ubuntu 18.10) is only supported for 9 months whereas Bionic (Ubuntu 18.04) is LTS and supported for 5 years.

Why the upgrade at all?

Revision history for this message
xghost (h-k-ghost) said :
#14

> I suggest you report a bug.

Can this question/post be converted into a bug? I'd hate to spend the time basically repeating everything...

> You do realise that Cosmic (Ubuntu 18.10) is only supported for 9 months whereas Bionic (Ubuntu 18.04) is LTS and supported for 5 years.

I know.

> Why the upgrade at all?

Because I always like to be on the most recent version. Also, the bug exists regardless of whether I do or don't upgrade.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#15

That's cool. I'm always curious when people update off the LTS release to the next one

Revision history for this message
Manfred Hampl (m-hampl) said :
#16

see https://answers.launchpad.net/ubuntu/+question/675432
There are several buttons above the "Message:" box. One of them allows creating a bug report based on this question document.

Can you help with this problem?

Provide an answer of your own, or ask xghost for more information if necessary.

To post a message you must log in.