Cannot Start GUI with latest kernel

Asked by Peter Sosin

 I have problem with my Ubuntu. I have updated Ubuntu around 01/09/2021. After this update I restarted my PC and booted Ubuntu. I reached Ubuntu Graphic Login to Desktop, but I noticed that Login screen is only on one monitor ( I work with 2 monitors and before both monitors were used) and resolution is not right (black border around all edges of monitor). I entered my password but I was not able to get to Ubuntu Desktop. After entering password there was black screen with some flashes and after few seconds I returned to Graphic Ubuntu Login Screen. I repeated login operation few times, the behavior is always the same. I managed to shutdown PC from Graphic Ubuntu Login Screen. I started my PC/Ubuntu once again but selected advanced boot options. In this screen there were show 3 last linux kernels. Last one 5.11.0-27 (which does not work I confirmed this later) and the one before the last 5.8.0-63. I selected this. It did work and I managed to login to Ubuntu desktop no problems. I decided to wait few weeks and today 09/10/2021 I have booted 5.8.0-63 and I updated my Ubuntu hoping that problem was noticed and solved. After update I rebooted PC/Ubuntu and the problem still persist. I rebooted with advanced boot options. I have notice that latest kernel is 5.11.0-37, next is 5.11.0-27 and both don't work (both behave the same) and third one 5.8.0-63 - this one works.
  I am not very experienced with Linux, but my gut filling is that problem is with Nividia Video Driver. What is workaround for this problem ?
Peter

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
Manfred Hampl (m-hampl) said :
#1

For diagnostic purposes please provide the output that you receive for the following commands:

uname -a
lsb_release -crid
sudo lshw -C display
ls /boot
dpkg -l | grep ' linux-'

Revision history for this message
Peter Sosin (peter-sosin) said :
#2

Please see output of requested commands (this is for last working kernel 5.8.0-63:
uname -a
Linux PetersUbuntu 5.8.0-63-generic #71~20.04.1-Ubuntu SMP Thu Jul 15 17:46:08 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal
sudo lshw -C display
[sudo] password for peter:
  *-display
       description: VGA compatible controller
       product: GT218 [GeForce 210]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:01:00.0
       version: a2
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
       configuration: driver=nvidia latency=0
       resources: irq:34 memory:f6000000-f6ffffff memory:e0000000-efffffff memory:f0000000-f1ffffff ioport:e000(size=128) memory:c0000-dffff
ls /boot
config-5.11.0-27-generic memtest86+_multiboot.bin
config-5.11.0-37-generic System.map-5.11.0-27-generic
config-5.8.0-63-generic System.map-5.11.0-37-generic
grub System.map-5.8.0-63-generic
initrd.img vmlinuz
initrd.img-5.11.0-37-generic vmlinuz-5.11.0-27-generic
initrd.img-5.8.0-63-generic vmlinuz-5.11.0-37-generic
initrd.img.old vmlinuz-5.8.0-63-generic
memtest86+.bin vmlinuz.old
memtest86+.elf
dpkg -l | grep ' linux-'
ii linux-base 4.5ubuntu3.6 all Linux image base package
ii linux-firmware 1.187.17 all Firmware for Linux kernel drivers
ii linux-generic-hwe-20.04 5.11.0.37.41~20.04.16 amd64 Complete Generic Linux kernel and headers
ii linux-headers-5.11.0-37-generic 5.11.0-37.41~20.04.2 amd64 Linux kernel headers for version 5.11.0 on 64 bit x86 SMP
ii linux-headers-5.4.0-58 5.4.0-58.64 all Header files related to Linux kernel version 5.4.0
ii linux-headers-5.4.0-58-generic 5.4.0-58.64 amd64 Linux kernel headers for version 5.4.0 on 64 bit x86 SMP
ii linux-headers-5.8.0-63-generic 5.8.0-63.71~20.04.1 amd64 Linux kernel headers for version 5.8.0 on 64 bit x86 SMP
ii linux-headers-generic-hwe-20.04 5.11.0.37.41~20.04.16 amd64 Generic Linux kernel headers
ii linux-hwe-5.11-headers-5.11.0-27 5.11.0-27.29~20.04.1 all Header files related to Linux kernel version 5.11.0
ii linux-hwe-5.11-headers-5.11.0-37 5.11.0-37.41~20.04.2 all Header files related to Linux kernel version 5.11.0
ii linux-hwe-5.8-headers-5.8.0-63 5.8.0-63.71~20.04.1 all Header files related to Linux kernel version 5.8.0
ii linux-image-5.11.0-37-generic 5.11.0-37.41~20.04.2 amd64 Signed kernel image generic
rc linux-image-5.4.0-26-generic 5.4.0-26.30 amd64 Signed kernel image generic
rc linux-image-5.4.0-29-generic 5.4.0-29.33 amd64 Signed kernel image generic
rc linux-image-5.4.0-31-generic 5.4.0-31.35 amd64 Signed kernel image generic
rc linux-image-5.4.0-33-generic 5.4.0-33.37 amd64 Signed kernel image generic
rc linux-image-5.4.0-40-generic 5.4.0-40.44 amd64 Signed kernel image generic
rc linux-image-5.4.0-45-generic 5.4.0-45.49 amd64 Signed kernel image generic
rc linux-image-5.4.0-48-generic 5.4.0-48.52 amd64 Signed kernel image generic
rc linux-image-5.4.0-52-generic 5.4.0-52.57 amd64 Signed kernel image generic
rc linux-image-5.4.0-56-generic 5.4.0-56.62 amd64 Signed kernel image generic
rc linux-image-5.4.0-58-generic 5.4.0-58.64 amd64 Signed kernel image generic
rc linux-image-5.8.0-41-generic 5.8.0-41.46~20.04.1 amd64 Signed kernel image generic
rc linux-image-5.8.0-44-generic 5.8.0-44.50~20.04.1 amd64 Signed kernel image generic
rc linux-image-5.8.0-48-generic 5.8.0-48.54~20.04.1 amd64 Signed kernel image generic
rc linux-image-5.8.0-50-generic 5.8.0-50.56~20.04.1 amd64 Signed kernel image generic
rc linux-image-5.8.0-53-generic 5.8.0-53.60~20.04.1 amd64 Signed kernel image generic
rc linux-image-5.8.0-59-generic 5.8.0-59.66~20.04.1 amd64 Signed kernel image generic
ii linux-image-5.8.0-63-generic 5.8.0-63.71~20.04.1 amd64 Signed kernel image generic
ii linux-image-generic-hwe-20.04 5.11.0.37.41~20.04.16 amd64 Generic Linux kernel image
ii linux-image-unsigned-5.11.0-27-generic 5.11.0-27.29~20.04.1 amd64 Linux kernel image for version 5.11.0 on 64 bit x86 SMP
ii linux-libc-dev:amd64 5.4.0-88.99 amd64 Linux Kernel Headers for development
ii linux-modules-5.11.0-27-generic 5.11.0-27.29~20.04.1 amd64 Linux kernel extra modules for version 5.11.0 on 64 bit x86 SMP
ii linux-modules-5.11.0-37-generic 5.11.0-37.41~20.04.2 amd64 Linux kernel extra modules for version 5.11.0 on 64 bit x86 SMP
rc linux-modules-5.4.0-26-generic 5.4.0-26.30 amd64 Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc linux-modules-5.4.0-29-generic 5.4.0-29.33 amd64 Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc linux-modules-5.4.0-31-generic 5.4.0-31.35 amd64 Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc linux-modules-5.4.0-33-generic 5.4.0-33.37 amd64 Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc linux-modules-5.4.0-40-generic 5.4.0-40.44 amd64 Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc linux-modules-5.4.0-45-generic 5.4.0-45.49 amd64 Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc linux-modules-5.4.0-48-generic 5.4.0-48.52 amd64 Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc linux-modules-5.4.0-52-generic 5.4.0-52.57 amd64 Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc linux-modules-5.4.0-56-generic 5.4.0-56.62 amd64 Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc linux-modules-5.4.0-58-generic 5.4.0-58.64 amd64 Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc linux-modules-5.8.0-41-generic 5.8.0-41.46~20.04.1 amd64 Linux kernel extra modules for version 5.8.0 on 64 bit x86 SMP
rc linux-modules-5.8.0-44-generic 5.8.0-44.50~20.04.1 amd64 Linux kernel extra modules for version 5.8.0 on 64 bit x86 SMP
rc linux-modules-5.8.0-48-generic 5.8.0-48.54~20.04.1 amd64 Linux kernel extra modules for version 5.8.0 on 64 bit x86 SMP
rc linux-modules-5.8.0-50-generic 5.8.0-50.56~20.04.1 amd64 Linux kernel extra modules for version 5.8.0 on 64 bit x86 SMP
rc linux-modules-5.8.0-53-generic 5.8.0-53.60~20.04.1 amd64 Linux kernel extra modules for version 5.8.0 on 64 bit x86 SMP
rc linux-modules-5.8.0-59-generic 5.8.0-59.66~20.04.1 amd64 Linux kernel extra modules for version 5.8.0 on 64 bit x86 SMP
ii linux-modules-5.8.0-63-generic 5.8.0-63.71~20.04.1 amd64 Linux kernel extra modules for version 5.8.0 on 64 bit x86 SMP
ii linux-modules-extra-5.11.0-37-generic 5.11.0-37.41~20.04.2 amd64 Linux kernel extra modules for version 5.11.0 on 64 bit x86 SMP
rc linux-modules-extra-5.4.0-26-generic 5.4.0-26.30 amd64 Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc linux-modules-extra-5.4.0-29-generic 5.4.0-29.33 amd64 Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc linux-modules-extra-5.4.0-31-generic 5.4.0-31.35 amd64 Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc linux-modules-extra-5.4.0-33-generic 5.4.0-33.37 amd64 Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc linux-modules-extra-5.4.0-40-generic 5.4.0-40.44 amd64 Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc linux-modules-extra-5.4.0-45-generic 5.4.0-45.49 amd64 Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc linux-modules-extra-5.4.0-48-generic 5.4.0-48.52 amd64 Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc linux-modules-extra-5.4.0-52-generic 5.4.0-52.57 amd64 Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc linux-modules-extra-5.4.0-56-generic 5.4.0-56.62 amd64 Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc linux-modules-extra-5.4.0-58-generic 5.4.0-58.64 amd64 Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc linux-modules-extra-5.8.0-41-generic 5.8.0-41.46~20.04.1 amd64 Linux kernel extra modules for version 5.8.0 on 64 bit x86 SMP
rc linux-modules-extra-5.8.0-44-generic 5.8.0-44.50~20.04.1 amd64 Linux kernel extra modules for version 5.8.0 on 64 bit x86 SMP
rc linux-modules-extra-5.8.0-48-generic 5.8.0-48.54~20.04.1 amd64 Linux kernel extra modules for version 5.8.0 on 64 bit x86 SMP
rc linux-modules-extra-5.8.0-50-generic 5.8.0-50.56~20.04.1 amd64 Linux kernel extra modules for version 5.8.0 on 64 bit x86 SMP
rc linux-modules-extra-5.8.0-53-generic 5.8.0-53.60~20.04.1 amd64 Linux kernel extra modules for version 5.8.0 on 64 bit x86 SMP
rc linux-modules-extra-5.8.0-59-generic 5.8.0-59.66~20.04.1 amd64 Linux kernel extra modules for version 5.8.0 on 64 bit x86 SMP
ii linux-modules-extra-5.8.0-63-generic 5.8.0-63.71~20.04.1 amd64 Linux kernel extra modules for version 5.8.0 on 64 bit x86 SMP
ii linux-sound-base 1.0.25+dfsg-0ubuntu5 all base package for ALSA and OSS sound systems

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

What is the output of

dpkg -l | grep -i nvidia

Revision history for this message
Peter Sosin (peter-sosin) said :
#4

Output of
dpkg -l | grep -i nvidia
ii libcuda1-340 340.108-0ubuntu5.20.04.2 amd64 NVIDIA CUDA runtime library
ii mate-optimus 19.10.4-0ubuntu1 all MATE Desktop applet for controlling NVIDIA Optimus graphics cards
ii nvidia-340 340.108-0ubuntu5.20.04.2 amd64 NVIDIA binary driver - version 340.108
ii nvidia-opencl-icd-340 340.108-0ubuntu5.20.04.2 amd64 NVIDIA OpenCL ICD
ii nvidia-prime 0.8.15.3~0.20.04.1 all Tools to enable NVIDIA's Prime
ii nvidia-settings 470.57.01-0ubuntu0.20.04.2 amd64 Tool for configuring the NVIDIA graphics driver
ii screen-resolution-extra 0.18build1 all Extension for the nvidia-settings control panel

###
Please note that this command outputs are obtained after loging into Ubuntu GUI (so 5.8.0-63 kernal) and using Ubuntu GUI terminal. These output are not from falling kernel (5.11.0-37) because I cannot start Ubuntu GUI.
Peter

Revision history for this message
Peter Sosin (peter-sosin) said :
#5

Hi Manfred,
Can you help?

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

I am sorry, but I have no clue why your system behaves like this. Your output does not reveal anything unusual or wrong.

Some ideas for further tests and possible workarounds:

1. When you boot a 5.11 kernel and see the login screen, you should be able to switch to a virtual terminal by pressing ctrl-alt-F1 (or -F2 etc.) There you can login by typing username and password. Does this work? Here you can look at system logs; maybe it is possible to find the cause of your problems in one of them. (You can end this mode by entering "sudo reboot")

2. To make sure that the software installation is correct, you may reinstall all kernel and nvidia packages (e.g. by using a virtual terminal as described in item 1.)

3. The 5.8 family of the kernel is obsolete and has been superseded by the 5.11 series. So staying on 5.8 is more or less a dead end. I expect that soon the 5.13 series will be rolled out for focal and in turn will supersede the 5.11 kernel series; maybe your system will work again with these kernels.
If not, then you probably should rollback to the 5.4 series of the kernel.

Revision history for this message
Peter Sosin (peter-sosin) said :
#7

Hi Manfred
1. I have managed to start virtual terminal (text based termina)l by pressing ctrl-alt-F2 and I managed to login. But I don't how to look into system logs - where to look for the files and what for look inside files.
2. I dont know how to reinstall kernel and nividia packages. Can you be more specific and verbose.
3. How can I switch permanently to kernel 5.8 bypassing 5.11? can you explain?

Finally I thought that problem is 5.11 is using some unproven nividia driver. Is it possible to use latest or 5.11 kernel but with driver from 5.8 that work?
I initially reported this problem with ubuntu-bug as bug. I have got response from some guy from ubuntu that this is not bug and I should use this website. He also suggested, I quote: "Have you tried using the GA kernel?" and gave this link
https://wiki.ubuntu.com/Kernel/LTSEnablementStack
But I am not good enough with Linux to try. I need more guidance... Any suggestions
Peter

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

"2. I dont know how to reinstall kernel and nividia packages. Can you be more specific and verbose."

Log in to the virtual terminal in the 5.11 kernel and issue the commands (for both of them copy the complete command, even if it spans several lines)

sudo apt install --reinstall linux-headers-5.11.0-37-generic linux-hwe-5.11-headers-5.11.0-37 linux-image-5.11.0-37-generic linux-modules-5.11.0-37-generic linux-modules-extra-5.11.0-37-generic

sudo apt install --reinstall libcuda1-340 nvidia-340 nvidia-opencl-icd-340

Then try rebooting normally and check whether the system works again.

"3. How can I switch permanently to kernel 5.8 bypassing 5.11? can you explain?"
Going back to the 5.8 version of the kernel is not recommended, because 5.8 is obsolete on focal. If necessary, then you should go back to the 5.4 version of the kernel.

Revision history for this message
Peter Sosin (peter-sosin) said :
#9

Manfred,
I had to wait for weekend to have spare time to try your proposal.
I run first command (reinstall of kernel I guess) - success.
I run second command (reinstall of nvidia driver) it finished with some error at the end of command execution (complain about version number missing). Anyway I rebooted - kernel 5.11.0-37 behaves as before. I tried kernel 5.8.0-63 and now the same failure, the same behavior as kernel 5.11.0-37. So now I cannot boot GUI at all. Any suggestion? I am thinking about removing nvidia driver and installing Nouveau driver. Maybe this will help. Can you give me commands to do this (removing nvidia driver and installing Nouveau driver).
Peter

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

It could be helpful to see the full error message from the failed nvidia install attempt.

I suggest that you try installing the 5.4 version of the kernel:

sudo apt install linux-generic

This should give you the chance to select a 5.4.0-* version of the kernel when booting. Does that one work?

Switching from the nvidia to the nouveau driver is done by installing xserver-xorg-video-nouveau and uninstalling the nvidia packages.

Can you help with this problem?

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

To post a message you must log in.