Avoiding HWE Kernel (22.04)

Felix Natter fnatter at gmx.net
Sat Apr 20 18:34:42 UTC 2024


hello Jeffrey,

many thanks for your help!
Answers inline.

Jeffrey Walton <noloader at gmail.com> writes:
> 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
>
> Manually remove the 6.5.0-28 kernels.

Ok, yes sure. One question remaining:

What are these kernels when they are not HWE kernels
(I understand that the normal ubuntu 22.04 kernels are 5.15.x)?

>  -> 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.

Ok, thank you! I shall apply this rule to *all* linux kernels / modules
packages?

Felix
-- 
Felix Natter





More information about the ubuntu-users mailing list