Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Intel Microcode or not?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
tuggbuss
Tux's lil' helper
Tux's lil' helper


Joined: 20 Mar 2017
Posts: 144

PostPosted: Thu Nov 23, 2017 3:19 pm    Post subject: [SOLVED] Intel Microcode or not? Reply with quote

Read through a lot of the FAQ and found one article about Intel Microcode.

Is that required? I seem to have Intel Microcode installed:

Code:
$ dmesg | grep microcode
[    3.552932] microcode: sig=0x806e9, pf=0x40, revision=0x62
[    3.553028] microcode: Microcode Update Driver: v2.2.


I dont use initramfs, but that isn't necessary i read. Am i alright leaving it this way, or does Intel Microcode (SkyLake) give my system any benefit using the latest 171117?


Last edited by tuggbuss on Fri Nov 24, 2017 8:04 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Thu Nov 23, 2017 3:43 pm    Post subject: Reply with quote

tuggbuss,

But which version.

Your CPU comes with microcode at no extra charge.
Its moved from some slow permanent storage to RAM (inside the CPU) during CPU reset.
Microcode updating overwrites this RAM and has to be done every boot.

If you want to use hyperfhreading a microcode update may be a very good thing.

There will be other tweaks too.

The infamous 'slight loss of precision' bug could have been fixed that way but it wan in the days when the microcode could not be changed.
Intel replaced the affected CPUs on request.
_________________
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
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2932
Location: Germany

PostPosted: Thu Nov 23, 2017 3:44 pm    Post subject: Reply with quote

At least on Haswell platform, a microcode update when the system was already running could cause the system to crash.

So to be on the safe side, microcode should be put directly into the kernel (or as first file in initramfs) to be loaded early, timestamp 0.00, even before Linux prints its version number (before it starts actually measuring time, that's why the first 100 or so messages are all 0.00)

Code:

$ dmesg | head
[    0.000000] microcode: microcode updated early to revision ...
[    0.000000] Linux version ...


microcode might already be updated by your bios, also not using microcode you might never notice, depends on what the microcode changed exactly. a lot of fixes are for obscure use cases and might affect only few users.

your message only says you have the driver for updating microcode, and shows which revision you are currently using. it does not mean you actually updated your microcode.

No idea if there is an update available for you. If there is, I'd use it just in case.
Back to top
View user's profile Send private message
tuggbuss
Tux's lil' helper
Tux's lil' helper


Joined: 20 Mar 2017
Posts: 144

PostPosted: Thu Nov 23, 2017 4:06 pm    Post subject: Reply with quote

NeddySeagoon wrote:
tuggbuss,

But which version.

Your CPU comes with microcode at no extra charge.
Its moved from some slow permanent storage to RAM (inside the CPU) during CPU reset.
Microcode updating overwrites this RAM and has to be done every boot.

If you want to use hyperfhreading a microcode update may be a very good thing.

There will be other tweaks too.

The infamous 'slight loss of precision' bug could have been fixed that way but it wan in the days when the microcode could not be changed.
Intel replaced the affected CPUs on request.


Thanks.

Yes, i'll think i'll give it a shot.

This particular CPU is "Intel(R) Core(TM) i7-7567U CPU @ 3.50GHz" I checked and it's Kaby Lake. I will set up Intel Microcode and give it a go.
Back to top
View user's profile Send private message
tuggbuss
Tux's lil' helper
Tux's lil' helper


Joined: 20 Mar 2017
Posts: 144

PostPosted: Thu Nov 23, 2017 4:13 pm    Post subject: Reply with quote

frostschutz wrote:
At least on Haswell platform, a microcode update when the system was already running could cause the system to crash.

So to be on the safe side, microcode should be put directly into the kernel (or as first file in initramfs) to be loaded early, timestamp 0.00, even before Linux prints its version number (before it starts actually measuring time, that's why the first 100 or so messages are all 0.00)

Code:

$ dmesg | head
[    0.000000] microcode: microcode updated early to revision ...
[    0.000000] Linux version ...


microcode might already be updated by your bios, also not using microcode you might never notice, depends on what the microcode changed exactly. a lot of fixes are for obscure use cases and might affect only few users.

your message only says you have the driver for updating microcode, and shows which revision you are currently using. it does not mean you actually updated your microcode.

No idea if there is an update available for you. If there is, I'd use it just in case.


Thank you. I toasted a i7 6900K (got refunded a brand new one) running Gentoo with no microcode installed other than the UEFI one. Don't know if that was related to the CPU died after 6 months or not.
Back to top
View user's profile Send private message
tuggbuss
Tux's lil' helper
Tux's lil' helper


Joined: 20 Mar 2017
Posts: 144

PostPosted: Thu Nov 23, 2017 4:46 pm    Post subject: Reply with quote

Followed the guide but now i got kernel panic at boot.

How come the boot message state that i have an initramfs when i dont?
That might be the issue. Not sure

E: I chrooted, removed the entries in grub.cfg and regenerated grub, now i'm in at least (:
Back to top
View user's profile Send private message
hceline
n00b
n00b


Joined: 30 Aug 2015
Posts: 26

PostPosted: Thu Nov 23, 2017 5:49 pm    Post subject: Reply with quote

If you are not using initramfs from before, the easiest way to get microcode update working is:
1. emerge sys-firmware/intel-microcode with USE="initramfs split-ucode -monolithic"
2. copy /lib/firmware/microcode.cpio to /boot (or somewhere under /boot/EFI, it should be in the directory where your kernel is located)
3. adjust bootloader to use microcode.cpio as initramfs
Back to top
View user's profile Send private message
kajzer
Apprentice
Apprentice


Joined: 27 Nov 2014
Posts: 163

PostPosted: Fri Nov 24, 2017 3:03 am    Post subject: Reply with quote

Without intel-microcode I was getting random desktop freezes, took me some time to figure out the reason though, when I installed intel-microcode everything was fine after that.
Dmesg was reporting *ERROR* Atomic update failure on pipe A" , now it doesn't.
So, in my case I need it, although I was running for couple of years without that problem (same hardware), though I just remembered that I had dedicated gpu card when I didn't need intel-microcode and now I don't (I use integrated gpu now) , so I guess that's the reason why I need it now.
Back to top
View user's profile Send private message
tuggbuss
Tux's lil' helper
Tux's lil' helper


Joined: 20 Mar 2017
Posts: 144

PostPosted: Fri Nov 24, 2017 7:10 pm    Post subject: Reply with quote

Thank you all for your answers.

I installed Gentoo again on my main desktop but am struggling to get this microcode thing working. I am on 4.12.12 gentoo-sources, but when following the guide in Gentoo handbook my kernel panics.
First i install sys-firmware/intel-microcode and sys-apps/iucode_tool and iucode_tool -S --write-earlyfw=/boot/early_ucode.cpio /lib/firmware/intel-ucode/*

Is there any more info around this microcode somewhere? It seems like whenever i manually edit my /etc/grub.d/10_linux adding:

Code:

      initrd="early_ucode.cpio ${rel_dirname}/${i}"
      break
    else
      initrd="early_ucode.cpio"


and regenerate grub-mkconfig -o /boot/grub/grub.cfg and reboot. Kernel panics. And i'm not that fond of following some random tutorial on the net/youtube and so on, they are often outdated or wrong, but i bet some of you have kind of new HW.

My MB/processor on my Desktop is ASUS Deluxe II (X99), with i7 6900K slightly clocked to 3,5GHz
Back to top
View user's profile Send private message
tuggbuss
Tux's lil' helper
Tux's lil' helper


Joined: 20 Mar 2017
Posts: 144

PostPosted: Fri Nov 24, 2017 8:03 pm    Post subject: Reply with quote

Hey, solved.

After 3:rd try, installed and configured, rebooted without generating grub.cfg

After login, regenerated grub.cfg

rebooted again. All in place.

Thanks. Now im on

Code:
desktop /home/tim # dmesg | grep microcode
[    0.000000] microcode: microcode updated early to revision 0xb000021, date = 2017-03-01
[    9.780683] microcode: sig=0x406f1, pf=0x4, revision=0xb000021
[    9.781279] microcode: Microcode Update Driver: v2.2.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo 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