You are not logged in.

#1 2021-06-06 12:51:53

cbc02009
Member
Registered: 2021-06-06
Posts: 3

How to get AMD's PBO to work on Arch Linux?

How do I get PBO to work on Arch? I'd like for my home server to be able to boost to 4.2GHz like it does in Windows because I use it as an embedded build server (so bursty workload), but it never goes above 3.5Ghz.

I think the issue is that unless I manually overclock (which I don't want) my BIOS reports a bios_limit of 3.5GHz and nothing I do seems to be able to change that. I've tried setting ignore_ppc=1 in my kernel options, but either the value no longer does anything, or something else is also preventing my CPU from boosting correctly.

For reference I've tried the schedutil, ondemand, and performance governors, and all 3 are max out at 3.5GHz. I've also tried manually writing to scaling_max_freq but the value doesn't change, and no error is reported.

Specs:

  • Kernel: Linux Uiharu 5.12.9-arch1-1 #1 SMP PREEMPT Thu, 03 Jun 2021 11:36:13 +0000 x86_64 GNU/Linux

  • Processor: AMD Ryzen 9 3950x

  • Motherboard: ASUS Pro WS X570-ACE

Not sure what other information would be helpful to post. I've gone through https://wiki.archlinux.org/title/CPU_frequency_scaling multiple times, but nothing seems to work. It's possible that this is a BIOS being stupid issue and not a kernel issue, but then wouldn't ignore_ppc work?

Offline

#2 2021-06-06 13:26:01

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 9,201

Re: How to get AMD's PBO to work on Arch Linux?

You are aware most (all ?) boosting only works if there are some cores that are not doing anything ?

https://bbs.archlinux.org/viewtopic.php?id=266285 suggests to use turbostat to verify if some cores are boosted.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
Did you use the guided installer ? If yes, I can't help you.

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

Offline

#3 2021-06-06 16:53:42

cbc02009
Member
Registered: 2021-06-06
Posts: 3

Re: How to get AMD's PBO to work on Arch Linux?

Lone_Wolf wrote:

You are aware most (all ?) boosting only works if there are some cores that are not doing anything ?

https://bbs.archlinux.org/viewtopic.php?id=266285 suggests to use turbostat to verify if some cores are boosted.

Maybe I'm confusing terminology, but my CPU all-core boosts to 4.2GHz on Windows with only PBO settings in the BIOS. It doesn't do that on Arch. I also had it working on this exact hardware when I was running Ubuntu previously, but I can't for the life of me remember what I did to set it up, and I'd rather not go back to Ubuntu.

But just to verify I ran stress --cpu 4 and the four cores that were working still maxed out at 3.5GHz.

Offline

#4 2021-06-06 19:15:00

Ropid
Member
Registered: 2015-03-09
Posts: 1,053

Re: How to get AMD's PBO to work on Arch Linux?

It works for me here. I have a Ryzen 2700X and have tweaked PBO settings manually in the BIOS menus. It boosts fine.

Where are you looking for the speed? What tool are you using?

Example here from my system, first I run this command line here at a bash prompt to have one 100% usage process:

while :; do :; done

Now I check speeds like this:

$ cat /proc/cpuinfo | grep MHz | sort -nr
cpu MHz		: 4224.372
cpu MHz		: 3700.000
cpu MHz		: 3700.000
cpu MHz		: 3200.000
cpu MHz		: 3200.000
cpu MHz		: 3200.000
cpu MHz		: 3200.000
cpu MHz		: 3200.000
cpu MHz		: 3200.000
cpu MHz		: 3200.000
cpu MHz		: 3200.000
cpu MHz		: 3200.000
cpu MHz		: 3200.000
cpu MHz		: 3200.000
cpu MHz		: 3200.000
cpu MHz		: 2816.806

You see there's one core doing 4.2GHz.

Now I'm trying something more stressful, a task that uses 8 threads to do stuff:

stress --cpu 8

CPU speeds now look like this:

$ cat /proc/cpuinfo | grep MHz | sort -nr
cpu MHz		: 4011.742
cpu MHz		: 4006.090
cpu MHz		: 4006.066
cpu MHz		: 4005.850
cpu MHz		: 4005.763
cpu MHz		: 4004.969
cpu MHz		: 4004.897
cpu MHz		: 4004.847
cpu MHz		: 4004.622
cpu MHz		: 3998.811
cpu MHz		: 3349.876
cpu MHz		: 3200.000
cpu MHz		: 3200.000
cpu MHz		: 3200.000
cpu MHz		: 3200.000
cpu MHz		: 3200.000

Now it's 4.0GHz on 8 or 9 cores.

Offline

#5 2021-06-06 19:52:59

cbc02009
Member
Registered: 2021-06-06
Posts: 3

Re: How to get AMD's PBO to work on Arch Linux?

Ropid wrote:

It works for me here. I have a Ryzen 2700X and have tweaked PBO settings manually in the BIOS menus. It boosts fine. ...

What motherboard are you using? Like I said, it's definitely possible it's my motherboard that's the issue, but I thought ignore_ppc would let me override that.

I'm using the same method you're using to look at CPU frequencies, just with watch.

if you don't mind, what are your values for bios_limit and scaling_max_freq? what governor are you using?

Offline

#6 2021-06-06 23:13:28

Ropid
Member
Registered: 2015-03-09
Posts: 1,053

Re: How to get AMD's PBO to work on Arch Linux?

I remember there was something about a kernel update changing how speed is counted to make the "schedutil" governor do better choices about P-states for Zen CPUs. This was maybe only something that applied to newer Zen CPUs and not my older one?

If that's what's happening and it's just the kernel showing a wrong number, then check out the "turbostat" program. The turbostat program reads state directly out of the CPU hardware, without going through the kernel's files. You'll then see the real speed the hardware uses.

It's important that you use turbostat version 5.9. You can't use the newer versions. They are broken on Ryzen. There is a script named "downgrade" in the AUR to help with getting the 5.9 version. You run "sudo downgrade turbostat" and choose from the list that gets printed.

About my settings here, I use "ondemand" governor in /etc/default/cpupower. I've set "min_freq=3GHz" as well in that config which disables the lowest P-state. The hardware is an X470 board from ASRock and a Zen+ 2700X CPU. Those bios_limit and scaling_max_freq files show 3700000.

Offline

#7 2021-06-07 10:00:58

Wild Penguin
Member
Registered: 2015-03-19
Posts: 217

Re: How to get AMD's PBO to work on Arch Linux?

I've noticed that how far the cores boost, also depends on the workload. I.e. some CPU-intensive (test/benchmark) programs boost more likely than others. This may be the reason of different behavior in Windows (as you can not easily make sure the workload is identical). Also, make sure CPU temps are down. It seems my CPU (5950X) is more likely to boost to higher clocks if CPU temp is lower. However it still seems to boost even on temps I would myself consider a bit high....

I've monitored the core frequencies with corefreq. It required an out-of-tree kernel module and a server in addition to the client, all of which reside in the AUR currently, and I have no idea how it compares to turbostat.

Offline

Board footer

Powered by FluxBB