Avoiding HWE Kernel (22.04)

Jeffrey Walton noloader at gmail.com
Sat Apr 20 18:02:07 UTC 2024


On Sat, Apr 20, 2024 at 1:54 PM Felix Natter via ubuntu-users <
ubuntu-users at lists.ubuntu.com> wrote:

> hello Jeffrey,
>
> thanks for the quick reply, answers inline.
>
> Jeffrey Walton <noloader at gmail.com> writes:
> > To run the regular kernel, and not the HWE kernel:
> >
> > 1. export hwe_ver=22.04
> > 2. remove the packages linux-headers-generic-hwe-${hwe_ver}
> linux-image-generic-hwe-${hwe_ver}
> > 3. install the packages linux-image-generic linux-headers-generic
>
> Thanks, do I need to do anything with regard to the NVIDIA
> (535-)drivers?
>
> purge right? I first installed the normal kernels, then removed the hwe
> kernels (seems safer to me?).
>
> Purging the HWE packages did not trigger initrd stuff
> (this is on a vanilla Ubuntu22.04.4 VM!):
>
> Found linux image: /boot/vmlinuz-6.5.0-28-generic
> Found initrd image: /boot/initrd.img-6.5.0-28-generic
> Found linux image: /boot/vmlinuz-6.5.0-18-generic
> Found initrd image: /boot/initrd.img-6.5.0-18-generic
> Found linux image: /boot/vmlinuz-5.15.0-105-generic
> Found initrd image: /boot/initrd.img-5.15.0-105-generic
>

Apt won't remove stuff you have manually installed. But if you use apt-mark
to mark them as auto, then Apt will automatically remove them when the time
comes.

Manually remove the 6.5.0-28 kernels.


> -> I guess this means that the HWE kernel was not used.
> But where do these 6.5.0-*-generic kernels come from when they are not
> HWE kernels? What am I missing?
>
> If these are HWE kernels: how do I deinstall all of them (they have
> higher priority in the grub menu)?
>
> To do it the other way around (switch from stable to hwe kernel):
> simply the inverse?
>
> 1. export hwe_ver=22.04
> 2. sudo apt install linux-headers-generic-hwe-${hwe_ver}
> linux-image-generic-hwe-${hwe_ver}
> 3. sudo apt remove linux-image-generic linux-headers-generic
>
> > You can perform the remove and install at the same time, and then reboot.
> >
> > I also perform the following so Apt treats the kernel as automatically
> installed. It eases management of upgrades and automatic removals.
> >
> > 4. apt-mark auto linux-image-* linux-modules-*
>
> Could you please explain how this helps? Will this cause old kernels to
> be automatically removed (I usually like to keep them around)?
>

Apt won't remove stuff you have manually installed. But if you use apt-mark
to mark them as auto, then Apt will automatically remove them when the time
comes.

Jeff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20240420/70d1a176/attachment-0001.html>


More information about the ubuntu-users mailing list