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.
(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.