AMD pstate driver steps and discussion

I've tried your cmdline and I've tried one with both, modprobe.blacklist & initcall_blacklist, but it still loads acpi-cpufreq. How is this even possible if it is blacklisted?

The 4650G is an APU, is it possible that it loads the driver via some gpu settings?
 
It's a shame it didn't work. It would be interesting what power compsumption you could achieve ..

I have "parked" my 2 AMD's 5600 , 5900X due to a too high wattage usage for my home server...

Right now on my Intel(R) Xeon(R) E-2146G CPU @ 3.50GHz , 32GB Memory ,1Tb Nvme I'm under 25 watt...
 
Running a ryzen 3600, PVE 8.0.4 and kernel 6.2.16-10-pve. I was able to activate the AMD P State driver using the passive option.
amd_pstate=passive

It work for a few minutes, can see how the cores go low to 500mhz, but after a few minutes the server hangs, and also I think the consumption in that time was a bit higher than the default kernel driver

Could be a setting that make the server freeze?
Thanks for your help
 
Running on a Ryzen 7 5800H and kernel 6.2.16-14-pve. Activated AMD P State using the passive option.

GRUB_CMDLINE_LINUX_DEFAULT="quiet amd_pstate=passive initcall_blacklist=acpi_cpufreq_init amd_pstate.shared_mem=1"


Cores are working at 55° @4463Mhz
1695667629643.png


# cpupower frequency-info
analyzing CPU 0:
driver: amd-pstate
CPUs which run at the same hardware frequency: 0
CPUs which need to have their frequency coordinated by software: 0
maximum transition latency: 20.0 us
hardware limits: 400 MHz - 4.46 GHz
available cpufreq governors: conservative ondemand userspace powersave performance schedutil
current policy: frequency should be within 400 MHz and 4.46 GHz.
The governor "performance" may decide which speed to use
within this range.
current CPU frequency: Unable to call hardware
current CPU frequency: 3.17 GHz (asserted by call to kernel)
boost state support:
Supported: yes
Active: yes
AMD PSTATE Highest Performance: 166. Maximum Frequency: 4.46 GHz.
AMD PSTATE Nominal Performance: 119. Nominal Frequency: 3.20 GHz.
AMD PSTATE Lowest Non-linear Performance: 41. Lowest Non-linear Frequency: 1.10 GHz.
AMD PSTATE Lowest Performance: 15. Lowest Frequency: 400 MHz.


With acpi cores were working at 75° and fan was a pain in the ass (it's a RZBox, so the fan isn't really top notch)

Hope this helps someone
 
Last edited:
What made you take 'guided' and not 'active' or 'passive' as the mode if I may ask? Background: https://docs.kernel.org/admin-guide/pm/amd-pstate.html#amd-pstate-driver-operation-modes

Thanks for your apt reply btw.
It looked like guided gave higher frequencies, but maybe it does not really matter on a desktop.
EDIT: Maybe it or I got confused after switching the mode while the system was running. I don't see much difference now but I do see something strange when switching sometimes.
 
Last edited:
It looked like guided gave higher frequencies, but maybe it does not really matter on a desktop.
EDIT: Maybe it or I got confused after switching the mode while the system was running. I don't see much difference now but I do see something strange when switching sometimes.
After a close read of the kernel docs shared today, mode active seems to leverage the newer (progress is improvement) amd-pstate-epp driver. It is benchmarked here.

Just found a nice writeup from the archlinux community explaining the difference between scaling driver and governer.

Something to play with.
 
Hi, yesterday I enable it with ACTIVE profile and is working well, cores reaching 500mhz. Still testing on a ryzen 3600


Code:
root@proxmox:~# cpupower frequency-info
analyzing CPU 0:
  driver: amd-pstate-epp
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 550 MHz - 4.21 GHz
  available cpufreq governors: performance powersave.
  current policy: frequency should be within 550 MHz and 4.21 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 3.59 GHz (asserted by call to kernel)
  boost state support:
    Supported: no
    Active: no
    Boost States: 0
    Total States: 3
    Pstate-P0:  3600MHz
    Pstate-P1:  2800MHz
    Pstate-P2:  2200MHz

Code:
Every 2.0s: grep "cpu MHz" /proc/cpuinfo                                      proxmox: Mon Nov 27 19:52:47 2023

cpu MHz         : 3602.621
cpu MHz         : 550.000
cpu MHz         : 3592.743
cpu MHz         : 3593.347
cpu MHz         : 550.000
cpu MHz         : 550.000
cpu MHz         : 550.000
cpu MHz         : 3593.099
cpu MHz         : 3593.162
cpu MHz         : 550.000
cpu MHz         : 3592.806
cpu MHz         : 550.000
 
FYI I did exactly the same thing and got similar output for a AMD Ryzen 7 5800X:

Code:
root@server:~# date
Wed Nov 29 03:30:41 PM CET 2023
root@server:~# uname -a
Linux server 6.5.11-6-pve #1 SMP PREEMPT_DYNAMIC PMX 6.5.11-6 (2023-11-29T08:32Z) x86_64 GNU/Linux
root@server:~# cat /etc/kernel/cmdline
root=ZFS=rpool/ROOT/pve-1 boot=zfs amd_iommu=on iommu=pt pcie_aspm=off amd_pstate=active
root@server:~#
root@server:~# cat /etc/kernel/cmdline
root=ZFS=rpool/ROOT/pve-1 boot=zfs amd_iommu=on iommu=pt pcie_aspm=off amd_pstate=active
root@server:~# uname -a
Linux server 6.5.11-6-pve #1 SMP PREEMPT_DYNAMIC PMX 6.5.11-6 (2023-11-29T08:32Z) x86_64 GNU/Linux
root@server:~# cpupower frequency-info
analyzing CPU 0:
  driver: amd-pstate-epp
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 550 MHz - 4.85 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 550 MHz and 4.85 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 3.77 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes
    Boost States: 0
    Total States: 3
    Pstate-P0:  3800MHz
    Pstate-P1:  2800MHz
    Pstate-P2:  2200MHz
root@server:~# grep "cpu MHz" /proc/cpuinfo
cpu MHz         : 3710.829
cpu MHz         : 4609.019
cpu MHz         : 4022.968
cpu MHz         : 4599.711
cpu MHz         : 4556.229
cpu MHz         : 4297.282
cpu MHz         : 4566.897
cpu MHz         : 4481.882
cpu MHz         : 4593.433
cpu MHz         : 4611.519
cpu MHz         : 4428.120
cpu MHz         : 4544.011
cpu MHz         : 4431.429
cpu MHz         : 4085.285
cpu MHz         : 4601.264
cpu MHz         : 4592.359

Change using
Code:
root@server:~# cpupower frequency-set -g [performance|powersave]
 
After updating to the latest kernel, the issue with the fan on my rzbox (Ryzen 7 5800H) was back.

So I've done a bit of experiments:
  1. switched to amd-pstate-epp active, governor performance and epp set to performance, fan was loud as hell
  2. switched to amd-pstate-epp active, governor performance and epp set to balance performance, fan was loud too (strange, because the frequencies were going like crazy between 400MHz and 4.46GHz)
  3. switched to amd-pstate-epp guided, governor performance and epp set to performance, fan was loud as hell (no difference with 1)
  4. switched to amd-pstate-epp guided, installed auto-epp and configured it for balance performance, governor changed to powersave, epp was to balance performance and finally fan was quiet. Frequencies fluctuating between 400MHz and 4.46GHz and performances absolutely comparable to n°1. This article and this post on reddit were my inspiration.

Code:
root@Overmind:~# date
Thu Dec  7 09:43:28 PM CET 2023
root@Overmind:~# uname -a
Linux Overmind 6.5.11-7-pve #1 SMP PREEMPT_DYNAMIC PMX 6.5.11-7 (2023-12-05T09:44Z) x86_64 GNU/Linux
root@Overmind:~# cpupower frequency-info
analyzing CPU 0:
  driver: amd-pstate-epp
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 400 MHz - 4.46 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 400 MHz and 4.46 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 2.19 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes
    Boost States: 0
    Total States: 3
    Pstate-P0:  3200MHz
    Pstate-P1:  1300MHz
    Pstate-P2:  1200MHz
root@Overmind:~# grep "cpu MHz" /proc/cpuinfo
cpu MHz         : 400.000
cpu MHz         : 2236.021
cpu MHz         : 400.000
cpu MHz         : 400.000
cpu MHz         : 1807.973
cpu MHz         : 400.000
cpu MHz         : 400.000
cpu MHz         : 1946.223
cpu MHz         : 2838.246
cpu MHz         : 400.000
cpu MHz         : 400.000
cpu MHz         : 400.000
cpu MHz         : 1453.039
cpu MHz         : 1461.699
cpu MHz         : 400.000
cpu MHz         : 1525.925

1701981969080.png
 
Here with latest updates and following the instruction in the first post, running with a AMD Ryzen 3700X in a MSI B550 Gaming Plus, BIOS settings for CPPC (Enable) and CPPC Preferred Cores (Disabled). Kernel parameter amd_pstate=active and cpu governor set to powersave.

Bash:
root@pve:~# cpupower frequency-info
analyzing CPU 0:
  driver: amd-pstate-epp
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 550 MHz - 4.43 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 550 MHz and 4.43 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 550 MHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes
    Boost States: 0
    Total States: 3
    Pstate-P0:  3600MHz
    Pstate-P1:  2800MHz
    Pstate-P2:  2200MHz


Screenshot from 2023-12-09 16-42-02.png
 
  • Like
Reactions: SInisterPisces
I recently swap a ryzen 3600 for a 3400ge and now I cant activate the amd pstate, this is /etc/default/grub
Code:
GRUB_CMDLINE_LINUX_DEFAULT="quiet amd_iommu=on initcall_blacklist=acpi_cpufreq_init amd_pstate=active"

It said it cant load the driver. What could i be doing wrong? maybe blacklisting something?
Code:
root@proxmox:~# cpupower frequency-info

analyzing CPU 0:

no or unknown cpufreq driver is active on this CPU

CPUs which run at the same hardware frequency: Not Available

CPUs which need to have their frequency coordinated by software: Not Available

maximum transition latency: Cannot determine or is not supported
 
Here with latest updates and following the instruction in the first post, running with a AMD Ryzen 3700X in a MSI B550 Gaming Plus, BIOS settings for CPPC (Enable) and CPPC Preferred Cores (Disabled). Kernel parameter amd_pstate=active and cpu governor set to powersave.

Bash:
root@pve:~# cpupower frequency-info
analyzing CPU 0:
  driver: amd-pstate-epp
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 550 MHz - 4.43 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 550 MHz and 4.43 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 550 MHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes
    Boost States: 0
    Total States: 3
    Pstate-P0:  3600MHz
    Pstate-P1:  2800MHz
    Pstate-P2:  2200MHz


View attachment 59565
Were you able to actually confirm that the Ryzen 3700X actually supports CPPC? I can't find that info anywhere, but it doesn't show up as supported when I look at lscpu or the sys device tree (the options that should indicate EPP support are missing, too).

TL;DR: I got it working but I'm not seeing enough of an improvement in idle power draw to deal with the power spikes I'm now observing via my ePDU. I'm going to disable it for now, but it's nice to know it works.

EDIT 1 - Passive Works: I've got it working in passive mode with the ondemand governor on my 3700X with an Asrock Rack X570D4U, but despite the lower clock frequency, I'm not seeing any difference in power draw according to my PDU. If anything, it occassionally spikes higher at idle.
1711499219143.png
(Ignore the bit about it being degraded. That is Proxmox and ZFS having a fight, apparently.)

Code:
~# cpupower frequency-info
analyzing CPU 0:
  driver: amd-pstate
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 20.0 us
  hardware limits: 550 MHz - 4.43 GHz
  available cpufreq governors: conservative ondemand userspace powersave performance schedutil
  current policy: frequency should be within 550 MHz and 4.43 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 608 MHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes
    AMD PSTATE Highest Performance: 166. Maximum Frequency: 4.43 GHz.
    AMD PSTATE Nominal Performance: 135. Nominal Frequency: 3.60 GHz.
    AMD PSTATE Lowest Non-linear Performance: 66. Lowest Non-linear Frequency: 1.76 GHz.
    AMD PSTATE Lowest Performance: 21. Lowest Frequency: 550 MHz.

EDIT 2 - Active Seems to Work, but Not Completely?
Getting some odd results using active/EPP.

Code:
# cpupower frequency-info
analyzing CPU 0:
  driver: amd-pstate-epp
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 550 MHz - 4.43 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 550 MHz and 4.43 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 550 MHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes
    Boost States: 0
    Total States: 3
    Pstate-P0:  3600MHz
    Pstate-P1:  2800MHz
    Pstate-P2:  2200MHz

OTOH, it's clearly hitting the lower MHz ranges, and staying there more consistently at idle (and not spiking to 4.4 Mhz!).
No change to CPU temp vs. the acpi driver, but I'm seeing a consistently higher (slightly) amp draw from the wall outlet.

Code:
cat /proc/cpuinfo | grep -i mhz
cpu MHz         : 550.000
cpu MHz         : 550.000
cpu MHz         : 550.000
cpu MHz         : 3599.534
cpu MHz         : 550.000
cpu MHz         : 550.000
cpu MHz         : 550.000
cpu MHz         : 550.000
cpu MHz         : 550.000
cpu MHz         : 550.000
cpu MHz         : 550.000
cpu MHz         : 550.000
cpu MHz         : 550.000
cpu MHz         : 550.000
cpu MHz         : 550.000
cpu MHz         : 3597.390

So, I'm not seeing enough benefit to change this right now. Undervolting would probably make more sense to try to drive down power, but I need to see what the system does under a real load to know if I want to mess with that.

But: It's nice to know passive mode seems to be properly supported on the 3700X (at least, CPUpower is able to read it properly), and even the active/epp driver mostly works.
 
Last edited:
People are talking here about saving Power :)

Im more in search of more performance, but more performance also means that the CPU doesn't get too hot.
So is there anyone already with Epyc Milan/Rome/Genoa Servers out here and can report if its worth it over acpi?
I thought of using amd-pstate-epp balanced-performance with the performance governor.
Should in theory be the perfect balance, some cores should boost that are used, others run slower.

Cheers
 
  • Like
Reactions: ITT
People are talking here about saving Power :)

Im more in search of more performance, but more performance also means that the CPU doesn't get too hot.
So is there anyone already with Epyc Milan/Rome/Genoa Servers out here and can report if its worth it over acpi?
I thought of using amd-pstate-epp balanced-performance with the performance governor.
Should in theory be the perfect balance, some cores should boost that are used, others run slower.

Cheers
I had the best results on Rome 7443P with amd-paste-epp using balanced_power and the governor set to powersave. It dropped idle wattage by like 30+ and still hit the boost clocks I wanted. I was gaming on 6c12t in VMs as well as running Cinebench R23 in them, so keep in mind that this was not utilizing every core.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!