You are not logged in.

#1 2020-07-11 21:31:44

liewkj
Member
Registered: 2019-07-08
Posts: 210

amd-ucode does not include mobile Ryzen APUs

It seems that amd-ucode which is derived from linux-firmware does not include microcode update for mobile Ryzen APUs. This is extremely nasty with mainline kernel, currently at 5.7.x. Multi-threaded workloads (such as make -j 8) simply hard crashed without any log with fan spinning at high-speed. Older kernels do not have such problem, presumably anything between 4.19.x and 5.4.x.

The CPU microcode update version included on my Ryzen 2500U laptop is:

microcode	: 0x8101007

And, mainline kernel hard crashed from time to time, especially during make jobs.

Lenovo E485/E585 has a critical BIOS/UEFI update from May 2020 and it included the new microcode. Windows 10 build 2004 mcupdate_AuthenticAMD.dll includes the same CPU microcode.

microcode	: 0x810100b

One can either ping the laptop manufacturers to release a new BIOS/UEFI update or follow Gentoo wiki to extract and rebuild the image for linux early microcode update.

Offline

#2 2020-07-11 21:47:46

loqs
Member
Registered: 2014-03-06
Posts: 17,373

Re: amd-ucode does not include mobile Ryzen APUs

@liewkj have you contacted the upstream maintainers of linux-firmware or filed a bug report on the arch bug tracker?

Offline

#3 2020-07-12 01:01:42

yochananmarqos
Member
Registered: 2020-02-05
Posts: 197

Re: amd-ucode does not include mobile Ryzen APUs

liewkj wrote:

It seems that amd-ucode which is derived from linux-firmware does not include microcode update for mobile Ryzen APUs..

Proof?

Offline

#4 2020-07-13 20:40:01

liewkj
Member
Registered: 2019-07-08
Posts: 210

Re: amd-ucode does not include mobile Ryzen APUs

yochananmarqos wrote:
liewkj wrote:

It seems that amd-ucode which is derived from linux-firmware does not include microcode update for mobile Ryzen APUs..

Proof?

I am glad to be proven wrong.

Offline

#5 2020-07-13 23:13:17

yochananmarqos
Member
Registered: 2020-02-05
Posts: 197

Re: amd-ucode does not include mobile Ryzen APUs

liewkj wrote:
yochananmarqos wrote:
liewkj wrote:

It seems that amd-ucode which is derived from linux-firmware does not include microcode update for mobile Ryzen APUs..

Proof?

I am glad to be proven wrong.

I was just curious how you knew, that's all.

Offline

#6 2020-07-13 23:36:44

liewkj
Member
Registered: 2019-07-08
Posts: 210

Re: amd-ucode does not include mobile Ryzen APUs

yochananmarqos wrote:

I was just curious how you knew, that's all.

From this thread and it always suggested that one should have installed amd-ucode while amd-ucode did not help at all.

Offline

#7 2020-07-13 23:51:01

loqs
Member
Registered: 2014-03-06
Posts: 17,373

Re: amd-ucode does not include mobile Ryzen APUs

What CPU does your system have?  Did the amd-ucode update the CPU's microcode version for your system?
You extracted a microcode update from mcupdate_AuthenticAMD.dll and that did update the microcode and resolve the issue?  If not where did you obtain a microcode update?
Edit:
Are you saying the PKGBUILD for amd-ucode should be updated so that amd_sev_fam17h_model0xh.sbin is included in amd-ucode.img ?

Last edited by loqs (2020-07-14 00:03:35)

Offline

#8 2020-07-14 02:38:42

liewkj
Member
Registered: 2019-07-08
Posts: 210

Re: amd-ucode does not include mobile Ryzen APUs

I extracted the CPU microcode from Lenovo E485/E585 BIOS/UEFI update for Ryzen 2500U APU. Windows 10 mcupdate_AuthenticAMD.dll just happened to have the exact same revision. And YES, that solved the hard crash on make jobs completely.

I don't think this is a problem for package amd-ucode. Upstream git.kernel.org has never included any CPU microcode for mobile Ryzen APUs and I don't know why. If Windows 10 can have them, upstream git.kernel.org should have them, too.

Offline

#9 2020-07-14 02:49:45

loqs
Member
Registered: 2014-03-06
Posts: 17,373

Re: amd-ucode does not include mobile Ryzen APUs

I would suggest contacting John Allen who authored https://git.kernel.org/pub/scm/linux/ke … f2e79e96e6 or Sherry Hurwitz who authored https://git.kernel.org/pub/scm/linux/ke … a498e91609 to see if AMD will add the ucode to linux-firmware upstream.

Offline

#10 2020-07-15 12:01:00

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,922

Re: amd-ucode does not include mobile Ryzen APUs

$ pacman -Qo /usr/lib/firmware/amd/amd_sev_fam17h_model0xh.sbin 
/usr/lib/firmware/amd/amd_sev_fam17h_model0xh.sbin is owned by linux-firmware 20200519.8ba6fa6-1
$ 

https://git.kernel.org/pub/scm/linux/ke … el0xh.sbin

If that's the file that solved liewkj problem, then it seems to be already presen in linux-firmware, just in an incorrect location .
Smells like a kernel bug .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#11 2020-07-15 22:08:04

liewkj
Member
Registered: 2019-07-08
Posts: 210

Re: amd-ucode does not include mobile Ryzen APUs

I guess that's not the right file.

+-------------------------------------------+
|         MC Extractor v1.44.0 r153         |
+-------------------------------------------+

amd_sev_fam17h_model0xh.sbin (1/1)

File does not contain CPU microcodes

Offline

Board footer

Powered by FluxBB