Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
microcode enabling
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
juniper
l33t
l33t


Joined: 22 Oct 2004
Posts: 961
Location: we the north

PostPosted: Tue Jun 20, 2023 5:34 am    Post subject: microcode enabling Reply with quote

Apparently I am supposed to do this, but I haven't yet. I think that is a no no.

cat /proc/cpuinfo gives

Code:

 processor   : 0
vendor_id   : GenuineIntel
cpu family   : 6
model      : 60
model name   : Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
stepping   : 3
microcode   : 0x28
cpu MHz      : 800.000
cache size   : 8192 KB
physical id   : 0
siblings   : 8
core id      : 0
cpu cores   : 4
apicid      : 0
initial apicid   : 0
fpu      : yes
fpu_exception   : yes
cpuid level   : 13
wp      : yes


So I assume I need intel-microcode. does that mean I don't need to install linux-firmware? I have had linux-firmware being pulled in for a long time.

in any case, I guess I can then follow the guide https://wiki.gentoo.org/wiki/Intel_microcode
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 55015
Location: 56N 3W

PostPosted: Tue Jun 20, 2023 7:45 am    Post subject: Reply with quote

juniper,

Yes, you need intel-microcode and to follow that guide.

You can have intel-microcode and linux-firmware installed at the same time as they do not install the same files.
CPU microcode comes from three places - the newest will be used.
1. It's in the CPU when the CPU is manufactured
2. The firmware can update it as it starts up.
3. The kernel can update it again as it starts up.

You may need linux-firmware for other things, so don't rip it out yet.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5489
Location: Bavaria

PostPosted: Tue Jun 20, 2023 9:41 am    Post subject: Re: microcode enabling Reply with quote

juniper wrote:
in any case, I guess I can then follow the guide https://wiki.gentoo.org/wiki/Intel_microcode

... all what @Neddy said ... and maybe ... this is easier than our wiki article:
https://forums.gentoo.org/viewtopic-t-1065464.html
Back to top
View user's profile Send private message
juniper
l33t
l33t


Joined: 22 Oct 2004
Posts: 961
Location: we the north

PostPosted: Tue Jun 20, 2023 7:43 pm    Post subject: Reply with quote

hmmmm. I followed the instructions.

1) I emerged intel-microcode with use flag initramfs
2) modified /etc/genkernel.conf to include MICROCODE="all"
3) generated a kernel with genkernel all (the doc says if MICROCODE="all" is set, you don't have to tell genkernel about it).

an intel-uc.img file was generated when the first was executed.

grub seems to have found everything. here is the output of

grub-mkconfig -o /boot/grub/grub.cfg:

Generating grub configuration file ...
Found linux image: /boot/vmlinuz-6.1.31-gentoo-x86_64
Found initrd image: /boot/intel-uc.img /boot/initramfs-6.1.31-gentoo-x86_64.img
Found linux image: /boot/vmlinuz-6.1.28-gentoo-x86_64
Found initrd image: /boot/intel-uc.img /boot/initramfs-6.1.28-gentoo-x86_64.img
Found linux image: /boot/vmlinuz-6.1.27-gentoo-dist
Found initrd image: /boot/intel-uc.img /boot/initramfs-6.1.27-gentoo-dist.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 Boot Manager on /dev/sda1@/efi/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings ...
done


however dmesg | grep microcode gives

Code:

[    1.100017] microcode: sig=0x306c3, pf=0x2, revision=0x28
[    1.100612] microcode: Microcode Update Driver: v2.2.


just like before. Should I see different output?
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5489
Location: Bavaria

PostPosted: Tue Jun 20, 2023 9:42 pm    Post subject: Reply with quote

juniper wrote:
[...] just like before. Should I see different output?

Is this a very new machine ? If yes, it could be the same as I had (with my new machine; one month old; newest BIOS updated by manufactory):

I was also missing my first line with timestamp 0.00000 ... BUT ... If the BIOS gives the last (available) microcode to your CPU, then there is nothing to update ... ;-)

Before one week we had an update of "sys-firmware/intel-microcode" to (unstable) 20230613_p20230520 (I have emerged it) and there was now a newer microcode in there than before: Now I have:
Code:
# dmesg | grep microcode
[    0.000000] microcode: microcode updated early to revision 0x115, date = 2023-03-15
[    9.817329] microcode: sig=0xb0671, pf=0x2, revision=0x115
[    9.817970] microcode: Microcode Update Driver: v2.2.

(the last two lines will be logged always - as soon as you have enabled microcode update in the kernel)

In the neighbour thread:
https://forums.gentoo.org/viewtopic-t-1163795-highlight-.html
I gave this link:
https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files/blob/main/releasenote.md
where you can verify if your microcode is really the latest.
(You will need your F-M-S family-model-stepping; find it with "dmesg | grep Intel")
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 55015
Location: 56N 3W

PostPosted: Wed Jun 21, 2023 7:26 am    Post subject: Reply with quote

juniper,

Trust but verify ..
The version of the microcode in use is in /sys/devices/system/cpu/cpu0/microcode/version fro cpu0

What version of microcode did you install?

As pietinger says, if the microcode is already correct, there is nothing to update.
Do keep the microcode up to date with every kernel update. It will change one day.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
juniper
l33t
l33t


Joined: 22 Oct 2004
Posts: 961
Location: we the north

PostPosted: Wed Jun 21, 2023 5:15 pm    Post subject: Reply with quote

@both Neddy and pietinger:

Is the functionality of this the same as upgrading the bios in the olden days?

The above is from my desktop, which is circa 2015. I manually updated through the windows partition the bios firmware about a year or so ago and looked on the manufacturers website that there are no further updates.

So maybe nothing to update.

On my new laptop, which is quite new with a freshly installed gentoo that both of you have been answering questions on in other threads, I haven't enabled microcode (I just installed today). However, I did upgrade the bios from windows a week or so ago.

I was going to enable microcoding on this laptop, but I just had to ditch gentoo-sources for gentoo-kernel-bin for the reason o this thread

https://forums.gentoo.org/viewtopic-t-1161354-start-25.html

(my touchpad wasn't working).
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 55015
Location: 56N 3W

PostPosted: Wed Jun 21, 2023 5:59 pm    Post subject: Reply with quote

juniper,

The CPU microcode is usually included in the motherboard firmware.
Its all those poor Windows users have :)

If the motherboard vendor does not issue an update. Windows is stuck in the past.
Linux users can do their own thing, if the microcode is issued.

For your touchpad, dmesg with it working and non working would be good ta see.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5489
Location: Bavaria

PostPosted: Wed Jun 21, 2023 6:33 pm    Post subject: Reply with quote

juniper,

I can confirm that you have on your "old" machine the newest microcode. With this line:
Code:
[    1.100017] microcode: sig=0x306c3, pf=0x2, revision=0x28

I can see that you have F-M-S 06-3c-03 and the active microcode for this CPU has level 0x28.
Now I searched in:
https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files/blob/main/releasenote.md#
and found the first entry (== the newest) for this F-M-S in microcode-20200609:
Quote:
HSW C0 06-3c-03/32 00000027 00000028 Core Gen4

So, yes, there is no update because your CPU has already the newest microcode.
Back to top
View user's profile Send private message
juniper
l33t
l33t


Joined: 22 Oct 2004
Posts: 961
Location: we the north

PostPosted: Wed Jun 21, 2023 10:01 pm    Post subject: Reply with quote

ha ha. I am impressed with your detective work!
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5489
Location: Bavaria

PostPosted: Wed Jun 21, 2023 10:51 pm    Post subject: Reply with quote

juniper wrote:
ha ha. I am impressed with your detective work!

:lol:


Now do the same with your new machine ... 8)

:lol:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum