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.

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

Hi Manfred,
I have installed kernel version 5.4 as you directed. then I booted kernel version 5.4 and it was successful. My Ubuntu GUI Desktop works. So what is next? Shall I keep updating my Ubuntu and try to see if new kernels work? What if kernel version 5.4 disappears from advanced Ubuntu boot options? Shall I repeat command from your last post to recover it?
Peter

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

In each Ubuntu LTS release there are two paths for the kernel:
1. The "original" version that was current when the Ubuntu release was published and
2. The HWE kernel, being upgraded to a higher version whenever a non-LTS release is published.

For Ubuntu focal 20.04 (the release that you are running) the status is a follows:
The "original" kernel version is 5.4.0-*
The HWE kernel version started with 5.8.0-* (with groovy in October 2020), switched to 5.11.0-* (with hirsute starting in spring 2021) and will probably soon be providing a 5.13.0-* kernel (short after the publication of impish).
see also https://ubuntu.com/kernel/lifecycle

My suggestion is that you now stay on the 5.4.0-* family of the kernel. This version still receives updates (whilst 5.8 doesn't any more, and for 5.11 this will also end soon).
It might make sense to uninstall all kernel packages with version 5.8 and 5.11 because they are not working.

For listing the packages that might be candidate for removal, what is the output of the following commands:

dpkg -l | grep -v '^ii'
dpkg -l | grep '5.8.0'
dpkg -l | grep '5.11.0'

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

Hi Manfred,
Thanks for exhaustive explanation. But I would like to return to my last question. What shall I do if kernel version 5.4 disappears from advanced Ubuntu boot options? Ubuntu advanced boot options lists only 3 kernels (last ones?) Can I do anything that kernel version 5.4 stays in Ubuntu advanced boot options?
Peter

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

My last comment already goes into that direction. If you uninstall the 5.8 and 5.11 versions of the kernel (which do not work), then the 5.4 kernels are the highest numbers and will stay on your system - not only in the advanced options, but even the default kernel will be the highest one among the 5.4.0-* versions.

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

Ok, I will try to remove some 5.8 and 5.11 kernels on weekend.
Peter

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

Hi Manfred,

I am in problem. I tried to remove some kernels as you advised but I am not successful. I used the following advice to remove kernels: https://askubuntu.com/questions/1338398/how-do-i-remove-newest-kernel
I wanted to remove first kernel 5.11.0-37. So I executed the following command:
sudo apt-get purge linux-image-5.11.0-37-generic
It looked that kernel 5.11.0-37 was removed. But also 5.11.0-38 was added. That is OK.
Then I executed
sudo apt-get purge linux-headers-5.11.0-37-generic
Unfortunately this command for some reason reinstalled back kernel 5.11.0-37
So can you please give some detailed commands how can I remove unwanted kernels.
Below is output of command "dpkg -l | grep linux-image" form my computer:
dpkg -l | grep linux-image

ii linux-image-5.11.0-27-generic 5.11.0-27.29~20.04.1 amd64 Signed kernel image generic
ic linux-image-5.11.0-37-generic 5.11.0-37.41~20.04.2 amd64 Signed kernel image generic
ii linux-image-5.11.0-38-generic 5.11.0-38.42~20.04.1 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
ii linux-image-5.4.0-88-generic 5.4.0-88.99 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 5.4.0.88.92 amd64 Generic Linux kernel image
ii linux-image-generic-hwe-20.04 5.11.0.38.42~20.04.17 amd64 Generic Linux kernel image
ii linux-image-unsigned-5.11.0-37-generic 5.11.0-37.41~20.04.2 amd64 Linux kernel image for version 5.11.0 on 64 bit x86 SMP

Is there a way to remove by wholesale all kernels 5.8 and 5.11? Do I need to remove the headers? The command to remove the headers re installs unwanted kernels back.
Peter

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

I suggest to start with a clean-up action.

dpkg --list | grep "^rc" | cut -d " " -f 3 | xargs sudo dpkg --purge

This will remove all remainders of the packages in status "rc" (=already removed, but configuration files left)

Then re-do an inventory of the installed kernel and header packages

dpkg --list | grep ' linux-'

Remark: the header packages in a version that you do not have the kernel installed are useless. There is no need to uninstall them, but i recommend doing that for consistency reasons.

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

Hi Manfred,
I have executed the command:
dpkg --list | grep "^rc" | cut -d " " -f 3 | xargs sudo dpkg --purge
And then I executed next command:
dpkg --list | grep ' linux-'
And below is output of this command:
dpkg --list | 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 5.4.0.88.92 amd64 Complete Generic Linux kernel and headers
ii linux-generic-hwe-20.04 5.11.0.38.42~20.04.17 amd64 Complete Generic Linux kernel and headers
ii linux-headers-5.11.0-38-generic 5.11.0-38.42~20.04.1 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.4.0-88 5.4.0-88.99 all Header files related to Linux kernel version 5.4.0
ii linux-headers-5.4.0-88-generic 5.4.0-88.99 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 5.4.0.88.92 amd64 Generic Linux kernel headers
ii linux-headers-generic-hwe-20.04 5.11.0.38.42~20.04.17 amd64 Generic Linux kernel headers
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.11-headers-5.11.0-38 5.11.0-38.42~20.04.1 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-27-generic 5.11.0-27.29~20.04.1 amd64 Signed kernel image generic
ic linux-image-5.11.0-37-generic 5.11.0-37.41~20.04.2 amd64 Signed kernel image generic
ii linux-image-5.11.0-38-generic 5.11.0-38.42~20.04.1 amd64 Signed kernel image generic
ii linux-image-5.4.0-88-generic 5.4.0-88.99 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 5.4.0.88.92 amd64 Generic Linux kernel image
ii linux-image-generic-hwe-20.04 5.11.0.38.42~20.04.17 amd64 Generic Linux kernel image
ii linux-image-unsigned-5.11.0-37-generic 5.11.0-37.41~20.04.2 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
ii linux-modules-5.11.0-38-generic 5.11.0-38.42~20.04.1 amd64 Linux kernel extra modules for version 5.11.0 on 64 bit x86 SMP
ii linux-modules-5.4.0-88-generic 5.4.0-88.99 amd64 Linux kernel extra modules for version 5.4.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
ic 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
ii linux-modules-extra-5.11.0-38-generic 5.11.0-38.42~20.04.1 amd64 Linux kernel extra modules for version 5.11.0 on 64 bit x86 SMP
ii linux-modules-extra-5.4.0-88-generic 5.4.0-88.99 amd64 Linux kernel extra modules for version 5.4.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

What is next?
Regards
Peter

Revision history for this message
Manfred Hampl (m-hampl) said (last edit ):
#19

Let me split this into five separate commands.
Each of these has to be copied at once, even if spanning more than a single line.

sudo apt purge linux-headers-5.8.0-63-generic linux-hwe-5.8-headers-5.8.0-63 linux-image-5.8.0-63-generic linux-modules-5.8.0-63-generic linux-modules-extra-5.8.0-63-generic

sudo apt purge linux-generic-hwe-20.04 linux-headers-generic-hwe-20.04 linux-image-generic-hwe-20.04

sudo apt purge linux-image-5.11.0-27-generic linux-modules-5.11.0-27-generic

sudo apt purge linux-hwe-5.11-headers-5.11.0-37 linux-image-5.11.0-37-generic linux-image-unsigned-5.11.0-37-generic linux-modules-5.11.0-37-generic linux-modules-extra-5.11.0-37-generic

sudo apt purge linux-headers-5.11.0-38-generic linux-hwe-5.11-headers-5.11.0-38 linux-image-5.11.0-38-generic linux-modules-5.11.0-38-generic linux-modules-extra-5.11.0-38-generic

If something goes wrong with these commands, then you may end up with a system that does not boot any more. But don't be afraid, there are tests to verify whether everything looks fine:

The command "ls -l /boot" should still list files that have "vmlinuz" and "initramfs" in their name.

After the uninstall action issue the commands
sudo apt update
sudo apt full-upgrade

This should now install another 5.4.0-89 version of the kernel, and during the installation you should see an output of update-grub that tells about "version 5.4.0-88 found" and "version 5.4.0-89 found".

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

Hi Manfred,
Everything went Ok. I have now two kernel 5.4.0-89 and 5.4.0-89 in my Ubuntu Advanced boot options.
So I understand I will now update only kernel 5.4 not 5.8 and 5.11? Is my understanding is correct?
Can I update my Ubuntu using GUI app or do I need to use some specific scripts?
I tried to run Ubuntu Update GUI app and this app offered me to remove linux headers version 5.4.0-58, so it looks like that I can use it. Regards

Peter

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

Yes, you understanding is correct. Whatever way you use for updates, it should offer new updates for the 5.4 kernel if available, and should not start installing the 5.8 or 5.11 or other versions.
And yes, there was a version of the 5.4.0-58 kernel headers still installed that you do not need any more and that can be removed.

If you now boot without selecting any specific option, then the system should boot the 5.4.0-89 kernel. So there should not be a need for using advanced options any more.

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.