clearlinux / distribution

Placeholder repository to allow filing of general bugs/issues/etc against the Clear Linux OS for Intel Architecture linux distribution
521 stars 29 forks source link

Microcode is loaded late giving cosmetic warnings but otherwise boots normally #2715

Closed sebastiencs closed 1 year ago

sebastiencs commented 2 years ago

Hello,

I'm getting the following messages in the journal:

microcode: Attempting late microcode loading - it is dangerous and taints the kernel.
microcode: You should switch to early loading, if possible.
microcode: updated to revision 0x421, date = 2022-06-15
x86/CPU: CPU features have changed after loading microcode, but might not take effect.
microcode: Reload completed, microcode revision: 0x421

According to clearlinux documentation it is supposed to load them early, so I mark this issue as a bug: https://docs.01.org/clearlinux/latest/guides/kernel/firmware.html#cpu-microcode-loading

I can manually fix the issue by modifying the order of the initrds: moving the 00-intel-ucode.cpio to the first initrd entry. But this requires me to update that file after every system update.

modified   /boot/loader/entries/Clear-linux-native-5.19.4-1181.conf
@@ -1,7 +1,7 @@
 title Clear Linux OS
 linux /EFI/org.clearlinux/kernel-org.clearlinux.native.5.19.4-1181
-initrd /EFI/org.clearlinux/initrd-org.clearlinux.native.5.19.4-1181
 initrd /EFI/org.clearlinux/freestanding-00-intel-ucode.cpio
+initrd /EFI/org.clearlinux/initrd-org.clearlinux.native.5.19.4-1181
 initrd /EFI/org.clearlinux/freestanding-clr-init.cpio.gz
 initrd /EFI/org.clearlinux/freestanding-my_initrd.cpio.gz
 initrd /EFI/org.clearlinux/freestanding-i915-firmware.cpio.xz

Journal with the changes above:

microcode: microcode updated early to revision 0x421, date = 2022-06-15

Could clr-boot-manager fix this issue ?

marioroy commented 2 years ago

I experience similarly on an AMD box: Clear Linux 36970, 5.19.5-1184.native

Aug 30 21:06:01 clr-desk kernel: microcode: Attempting late microcode loading - it is dangerous and taints the kernel.
Aug 30 21:06:01 clr-desk kernel: microcode: You should switch to early loading, if possible.
Aug 30 21:06:01 clr-desk kernel: microcode: CPU0: new patch_level=0x08301055
...
Aug 30 21:06:01 clr-desk kernel: x86/CPU: CPU features have changed after loading microcode, but might not take effect.
Aug 30 21:06:01 clr-desk kernel: microcode: Reload completed, microcode revision: 0x8301055

Edit: I booted into another drive running Clear Linux 36930, 5.15.63-6.lts2021. No mention of, "Attempting late microcode loading."

Aug 30 23:37:07 clr-desk kernel: microcode: CPU0: new patch_level=0x08301055
...
Aug 30 23:37:07 clr-desk kernel: x86/CPU: CPU features have changed after loading microcode, but might not take effect.
Aug 30 23:37:07 clr-desk kernel: microcode: Reload completed, microcode revision: 0x8301055
sebastiencs commented 2 years ago

@marioroy I booted into another drive running Clear Linux 36930, 5.15.63-6.lts2021. No mention of, "Attempting late microcode loading."

It is considered "dangerous" since kernel 5.19: https://github.com/torvalds/linux/commit/d23d33ea0fcdc4bbb484990bf53867f99c63ccab

alessandrofasse commented 1 year ago

Any updates? I saw a MR was done :) Can not install version 37430 on my threadripper system.

Help very much appreciated!

bwarden commented 1 year ago

It will be in releases >= 37440.

bwarden commented 1 year ago

Any updates? I saw a MR was done :) Can not install version 37430 on my threadripper system.

Help very much appreciated!

If you're having trouble installing, please open a new issue, as it's extremely unlikely to be related to this issue.

alessandrofasse commented 1 year ago

Thanks for the quick reply. No it is exactly the same problem. When I run over the USB stick and chose the Clear Linux option the start process hangs with showing only this:

microcode: Attempting late microcode loading - it is dangerous and taints the kernel.
microcode: You should switch to early loading, if possible.
bwarden commented 1 year ago

Thanks for the quick reply. No it is exactly the same problem. When I run over the USB stick and chose the Clear Linux option the start process hangs with showing only this:

microcode: Attempting late microcode loading - it is dangerous and taints the kernel.
microcode: You should switch to early loading, if possible.

Please add debug to your kernel command line and open a new issue. Without that, you're only seeing the last error-level message something bothered to print before whatever actually failed.

marioroy commented 1 year ago

Thanks. This is working again since Clear Linux 37450. I'm running the LTS kernel 5.15.74-16.lts2021.

[    0.531510] microcode: microcode updated early to new patch_level=0x08301055
[    0.531528] microcode: CPU0: patch_level=0x08301055
[    0.531535] microcode: CPU1: patch_level=0x08301055
[    0.531540] microcode: CPU2: patch_level=0x08301055
[    0.531552] microcode: CPU3: patch_level=0x08301055
...
[    0.532218] microcode: Microcode Update Driver: v2.2.
bwarden commented 1 year ago

In clr-boot-manager version 3.2.12: https://github.com/clearlinux-pkgs/clr-boot-manager/commit/f985dd1001395f421b1ed98fba5a9db88c95dbe5

sebastiencs commented 1 year ago

Thanks, this is working for me too:

[    0.000000] microcode: microcode updated early to revision 0x421, date = 2022-06-15
...
[    2.759536] microcode: sig=0x906a3, pf=0x80, revision=0x421
[    2.760341] microcode: Microcode Update Driver: v2.2.
sebastiencs commented 1 year ago

I'm re-opening the issue, I get the same message again:

$ dmesg | grep microcode
[    0.000000] microcode: microcode updated early to revision 0x421, date = 2022-06-15
[    2.759293] microcode: sig=0x906a3, pf=0x80, revision=0x421
[    2.759924] microcode: Microcode Update Driver: v2.2.
[   20.558462] microcode: Attempting late microcode loading - it is dangerous and taints the kernel.
[   20.560127] microcode: You should switch to early loading, if possible.
[   20.568683] microcode: updated to revision 0x424, date = 2022-09-19
[   20.573622] microcode: Reload completed, microcode revision: 0x424

It seems that 2 different versions (0x421 and 0x424) are loaded at different times here. @bwarden This is with Clearlinux 37620

$ cat /proc/cmdline
initrd=\EFI\org.clearlinux\freestanding-00-early-ucode.cpio initrd=\EFI\org.clearlinux\initrd-org.clearlinux.native.6.0.7-1207 initrd=\EFI\org.clearlinux\freestanding-clr-init.cpio.gz initrd=\EFI\org.clearlinux\freestanding-my_initrd.cpio.gz initrd=\EFI\org.clearlinux\freestanding-i915-firmware.cpio.zstd root=UUID=bdbf2cdf-9394-4424-8c23-c413122982ab rd.luks.uuid=006548bc-0221-417f-87b8-62f1e9df5a24 quiet console=tty0 console=ttyS0,115200n8 cryptomgr.notests init=/usr/bin/initra-desktop intel_iommu=igfx_off kvm-intel.nested=1 no_timer_check noreplace-smp page_alloc.shuffle=1 rcupdate.rcu_expedited=1 rootfstype=ext4,btrfs,xfs,f2fs tsc=reliable rw rootflags=x-systemd.device-timeout=0 vconsole.font=ter-132n systemd.unified_cgroup_hierarchy log_buf_len=64M resume=UUID=bdbf2cdf-9394-4424-8c23-c413122982ab rd.luks.options=006548bc-0221-417f-87b8-62f1e9df5a24=no-read-workqueue,no-write-workqueue resume_offset=30238720
bwarden commented 1 year ago

I'm re-opening the issue, I get the same message again:

This is not the same issue. Please open a new one.