Update produces errors, kernel headers missing

Hello there,

I get some messages when updating my system (Manjaro Gnome, Thinkpad X230), which have to do with kernel modules and missing kernel headers, but I dont really know what to do about it. Would be gratefull for help to fix this.

Best regards

(153/154) upgrading yay                                                                                         [###################################################################] 100%
(154/154) upgrading zsh-completions                                                                             [###################################################################] 100%
:: Running post-transaction hooks...
( 1/31) Creating system user accounts...
Creating group 'gamemode' with GID 962.
Creating group 'rpcuser' with GID 34.
Creating user 'rpcuser' (RPC Service User) with UID 34 and GID 34.
( 2/31) Registering binary formats...
( 3/31) Updating journal message catalog...
( 4/31) Reloading system manager configuration...
( 5/31) Updating udev hardware database...
( 6/31) Applying kernel sysctl settings...
( 7/31) Creating temporary files...
( 8/31) Reloading device manager configuration...
( 9/31) Arming ConditionNeedsUpdate...
(10/31) Updating the MIME type database...
(11/31) Updating module dependencies...
(12/31) Install DKMS modules
==> ERROR: Missing 5.4.210-1-MANJARO kernel headers for module hid-xpadneo/0.9.r93.gcf392a7.
==> ERROR: Missing 5.10.136-1-MANJARO kernel headers for module tp_smapi-dkms/0.43.
==> ERROR: Missing 5.10.136-1-MANJARO kernel headers for module hid-xpadneo/0.9.r93.gcf392a7.
==> ERROR: Missing 5.4.210-1-MANJARO kernel headers for module tp_smapi-dkms/0.43.
(13/31) Restarting cronie for libc upgrade...
(14/31) Updating linux initcpios...
==> Building image from preset: /etc/mkinitcpio.d/linux510.preset: 'default'
  -> -k /boot/vmlinuz-5.10-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.10-x86_64.img
==> Starting build: 5.10.136-1-MANJARO
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [autodetect]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [filesystems]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-5.10-x86_64.img
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux510.preset: 'fallback'
  -> -k /boot/vmlinuz-5.10-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.10-x86_64-fallback.img -S autodetect
==> Starting build: 5.10.136-1-MANJARO
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: bfa
==> WARNING: Possibly missing firmware for module: qed
==> WARNING: Possibly missing firmware for module: qla2xxx
==> WARNING: Possibly missing firmware for module: qla1280
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [filesystems]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-5.10-x86_64-fallback.img
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux511-rt.preset: 'default'
  -> -k /boot/vmlinuz-5.11-rt-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.11-rt-x86_64.img
==> ERROR: '/lib/modules/5.11.4-1-rt11-MANJARO' is not a valid kernel module directory
==> Building image from preset: /etc/mkinitcpio.d/linux511-rt.preset: 'fallback'
  -> -k /boot/vmlinuz-5.11-rt-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.11-rt-x86_64-fallback.img -S autodetect
==> ERROR: '/lib/modules/5.11.4-1-rt11-MANJARO' is not a valid kernel module directory
==> Building image from preset: /etc/mkinitcpio.d/linux515-rt.preset: 'default'
  -> -k /boot/vmlinuz-5.15-rt-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.15-rt-x86_64.img
==> Starting build: 5.15.55-3-rt48-MANJARO
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [autodetect]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [filesystems]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-5.15-rt-x86_64.img
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux515-rt.preset: 'fallback'
  -> -k /boot/vmlinuz-5.15-rt-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.15-rt-x86_64-fallback.img -S autodetect
==> Starting build: 5.15.55-3-rt48-MANJARO
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: bfa
==> WARNING: Possibly missing firmware for module: qed
==> WARNING: Possibly missing firmware for module: qla2xxx
==> WARNING: Possibly missing firmware for module: qla1280
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [filesystems]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-5.15-rt-x86_64-fallback.img
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux54.preset: 'default'
  -> -k /boot/vmlinuz-5.4-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.4-x86_64.img
==> Starting build: 5.4.210-1-MANJARO
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [autodetect]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [filesystems]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-5.4-x86_64.img
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux54.preset: 'fallback'
  -> -k /boot/vmlinuz-5.4-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.4-x86_64-fallback.img -S autodetect
==> Starting build: 5.4.210-1-MANJARO
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: bfa
==> WARNING: Possibly missing firmware for module: qed
==> WARNING: Possibly missing firmware for module: qla2xxx
==> WARNING: Possibly missing firmware for module: qla1280
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [filesystems]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-5.4-x86_64-fallback.img
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux57.preset: 'default'
  -> -k /boot/vmlinuz-5.7-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.7-x86_64.img
==> ERROR: '/lib/modules/5.7.19-2-MANJARO' is not a valid kernel module directory
==> Building image from preset: /etc/mkinitcpio.d/linux57.preset: 'fallback'
  -> -k /boot/vmlinuz-5.7-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.7-x86_64-fallback.img -S autodetect
==> ERROR: '/lib/modules/5.7.19-2-MANJARO' is not a valid kernel module directory
==> Building image from preset: /etc/mkinitcpio.d/linux58.preset: 'default'
  -> -k /boot/vmlinuz-5.8-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.8-x86_64.img
==> ERROR: '/lib/modules/5.8.18-1-MANJARO' is not a valid kernel module directory
==> Building image from preset: /etc/mkinitcpio.d/linux58.preset: 'fallback'
  -> -k /boot/vmlinuz-5.8-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.8-x86_64-fallback.img -S autodetect
==> ERROR: '/lib/modules/5.8.18-1-MANJARO' is not a valid kernel module directory
error: command failed to execute correctly
(15/31) Updating Grub-Bootmenu
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.15-rt-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.15-rt-x86_64.img
Found initrd fallback image: /boot/initramfs-5.15-rt-x86_64-fallback.img
Found linux image: /boot/vmlinuz-5.11-rt-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.11-rt-x86_64.img
Found initrd fallback image: /boot/initramfs-5.11-rt-x86_64-fallback.img
Found linux image: /boot/vmlinuz-5.10-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.10-x86_64.img
Found initrd fallback image: /boot/initramfs-5.10-x86_64-fallback.img
Found linux image: /boot/vmlinuz-5.8-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.8-x86_64.img
Found initrd fallback image: /boot/initramfs-5.8-x86_64-fallback.img
Found linux image: /boot/vmlinuz-5.7-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.7-x86_64.img
Found initrd fallback image: /boot/initramfs-5.7-x86_64-fallback.img
Found linux image: /boot/vmlinuz-5.4-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.4-x86_64.img
Found initrd fallback image: /boot/initramfs-5.4-x86_64-fallback.img
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Windows 10 on /dev/sda1
Found memtest86+ image: /boot/memtest86+/memtest.bin
done
(16/31) Reloading system bus configuration...
(17/31) Updating system dconf databases...
(18/31) Warn about old perl modules
(19/31) Extracting Adw GTK4 theme from LibAdwaita...
(20/31) Copy Firefox Distribution Settings
(21/31) Updating fontconfig cache...
(22/31) Updating 32-bit fontconfig cache...
(23/31) Updating GIO module cache...
(24/31) Updating 32-bit GIO module cache...
(25/31) Compiling GSettings XML schema files...
(26/31) Updating icon theme caches...
(27/31) Restore Linux kernel modules

==> Warning:
	 -> Kernel has been updated. Modules of the current kernel
	 -> have been backed up so you can continue to use your
	 -> computer. However, the new kernel will only work
	 -> at next boot.
	
	
(28/31) Collection of usefull scripts for Manjaro Gnome

==> Printing support installed

==> We have switched back to QGnomePlatform for GNOME 42.
  qt5ct and qt6ct (Qt Configuration Utilities) may be marked as orphans.
  If you want use QGnomePlatform with the Adwaita Qt style,
  you'll need remove or comment the QT_QPA_PLATFORMTHEME variable
  in /etc/environment.
(29/31) Changing NetworkManager Connectivity-Ping to manjaro.org
(30/31) Updating the info directory file...
(31/31) Updating the desktop file MIME type cache...
~ >>>

check your package-manager for “linux-headers” and install the missing headers for 5.4 and 5.10

Hi @Ambossinator,

It would seem that you don’t have the kernel headers installed.

To Install the headers for currently installed kernels, run thee following:

pamac install $(pamac list --installed --quiet | grep "^linux" | grep "^linux[0-9]*[-rt]*$" | awk '{print $1"-headers"}' ORS=' ')

And then try the update again.

Hope this helps!

Hm, got this, but before I tried to install the headers as suggested by ollie:

sudo pacman -S linux54-headers linux510-headers

After Installing that, I did pacman -Syu, but there was nothing to do. After that I tried your command, and got this:

Error: target not found: linux511-rt-headers

Any suggestions?

Hmmm…seems you have kernel 5.11-rt (still) installed.

Please provide the output of:

mhwd-kernel --listinstalled

you have to remove all files from kernels 5.7 and 5.8
see this

The following kernels are installed in your system:
   * linux510
   * linux54
   * linux511-rt
   * linux515-rt
~ >>>

So what does that mean? I can only run one kernel at a time, and as far as I know, they update automatically, so why are there kernels installed which should not be there?And what do you mean by “still” installed? Isn’t 5.11 newer that 5.4/5.10?

Just as I said. Please remove the kernel with:

mhwd-kernel --remove linux511-rt

Edit:

What @Olli said:

and additionally:

Edit #2:

I mean, it’s not LTS not supported for as long as the LTS. Kernel 5.11 has been EOL for some time now. I don’t even have it available anymore:

$ mhwd-kernel --list

available kernels:
* linux419
* linux510
* linux515
* linux518
* linux519
* linux54
* linux515-rt
* linux518-rt
* linux519-rt
1 Like

so you have 2 ways

a) uninstall the unused kernels
or
b) install all other missing headers

and btw.: rt-kernels are a bad choice and are only recommended if you really know why and for what you really need them.

1 Like

Ok, removed the 5.11-rt kernel

:: Do you want to remove these packages? [Y/n] 
:: Running pre-transaction hooks...
(1/2) Removing linux initcpios...
(2/2) Remove DKMS modules
:: Processing package changes...
(1/3) removing linux511-rt-headers                                                                                  [######################################################################] 100%
(2/3) removing linux511-rt-acpi_call                                                                                [######################################################################] 100%
  > Updating module dependencies...
depmod: ERROR: could not open directory /lib/modules/5.11.4-1-rt11-MANJARO: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
error: command failed to execute correctly
(3/3) removing linux511-rt                                                                                          [######################################################################] 100%
:: Running post-transaction hooks...
(1/3) Arming ConditionNeedsUpdate...
(2/3) Updating module dependencies...
(3/3) Updating Grub-Bootmenu
Generating grub configuration file ...

Trying to update, it says it is fully updated. But the problem is fixed now? Since there is still the 5.15-rt. Do I need to remove it? how did it get there?

I recommended it. But to do so easier, you need to be booted into a different kernel, 5.4 or 5.10 in your case. Once done, run the following to remove 5.15-rt:

mhwd-kernel --remove linux515-rt

Edit:

AFAIK there’s only one way: you installed by yourself.

no you don’t need it but if you don’t use it then it’s wasted space on your disk. and as said rt-kernels need a lot of manual interference and adjusting and are designed for only some really rare realtime-applications but in average-use will cause crashes and malfunction.

I guess I put it there to solve problems with xpad-neo, but wasn’t aware I actually swapped the kernel…

well, thanks for all the advice and clarification! :slight_smile:

1 Like

:point_down: