Rolling back Linux 5.0 on 18.04 after installing HWE

When I found out the latest point release for 18.04 contained the 5.0 kernel, I got overzealous and installed it on my machine according to this article's instructions:

sudo apt install --install-recommends linux-generic-hwe-18.04 xserver-xorg-hwe-18.04

However, ever since then, I've had a couple of problems such as audio not working ( I have to run sudo alsa force-reload nearly every boot ) and suspend has stopped working reliably.

Thus, I would like to roll back to the previous kernel.

My question is - can I just run the above command only with remove? or should I enable the grub menu and alter the default boot parameters? - or perhaps something completely different...?


Solution 1:

OP Edit:

In my case, I needed a few more steps. You might not need to do this bit. When I went to uninstall the offending kernel(s) - I was not able to because I was currently booted into it - thus, apt/dpkg threw an error during removal. If you run into that, this is the remedy:

First, edit /etc/default/grub from

GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0

to:

#GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=5

and naturally, run sudo update-grub afterward.

This way, you can boot into the older, working kernel, and the one you are currently on will uninstall without any fuss.

/end OP Edit


Yes, you may just run:

sudo apt remove linux-generic-hwe-18.04

to remove the HWE kernel, under the assumption that you haven't removed the linux-generic metapackage. If you did remove it, run the following command to install it back:

sudo apt install linux-generic

You would also want to remove the HWE images and headers that might have been left behind. To do this run the following commands to list all images and headers, respectively:

dpkg --list | grep linux-image
dpkg --list | grep linux-headers

If there are any HWE images and headers remove them using:

sudo apt remove <image|header>

OP Note: I did not have to do this step.

Since you have also installed the HWE xorg, you may have to revert it to the non-HWE one. To do this run:

sudo apt install xserver-xorg-core xserver-xorg

If you get a dependency error, just install the dependencies too.