Enabling AMD Pstate Scaling Driver on Proxmox 8.1.4 (Debian Linux) under a Ryzen 3700X? Is the Ryzen 3700X Even Supported by AMD’s Pstate Driver?

Hello,

I finally had time to poke around my power management settings, and it seems I’m not running the AMD Pstate Scaling Driver, but rather the fallback ACPI driver.
I’m running an AMD Ryzen 3700X in eco mode, and since this is a home server and I’m really not doing anything terribly demanding, I want to optimize power draw as much as possible.

CPPC and CPPC Preferred Cores are both set to AUTO in my BIOS, with an option for ON, AUTO, or OFF.

Questions:

  1. Does the Ryzen 3700X support the EPP/Active Mode AMD pstate driver?
  2. If not, does it at least support the passive mode driver (which just exposes more pstates but doesn’t impact governor settings).
  3. If passive is supported, what is the practical difference between “passive” and “guided” mode?

I’m looking into this because I’m interested in possibly lowering my idle power in an always-on Proxmox server, which is presently at 105 watts with 18 SSDs and three PCIe cards mostly idling. Right now, the CPU is in ECO MODE, and Proxmox’s default CPU Governor in combination with the acpi power driver keeps it at its highest pstate (3600 Mhz).

I’ve tried to research this on my own, but I’ve learned enough to just be kind of confused about what’s supported and what’s stable on my Ryzen 3700X, since most documentation just says “modern” AMD CPUs, which include “some” Zen 2 CPUs.

If it’s supported, I’d at least like to try the passive mode AMD pstate driver (not the active mode/EPP driver, which I’m not sure my system supports), which should expose more pstates to get a lower idle power, but I wanted confirmation from someone that my CPU will support that. I don’t want to to introduce Instability into the system that I’m not experienced enough to identify as a power driver problem.

Here’s what I’m seeing right now.
Noticeably, the lscpu output doesn’t mention CPPC support, which makes me think that the active/EPP version of the driver won’t work well, but the passive version might. But I can’t find anything confirming this. Maybe I have to enable it before that information shows up?

# pveversion
pve-manager/8.1.4/ec5affc9e41f1d79 (running kernel: 6.5.13-1-pve)

# cat /boot/config-6.5.13-1-pve | grep -i PSTATE
CONFIG_X86_INTEL_PSTATE=y
CONFIG_X86_AMD_PSTATE=y
CONFIG_X86_AMD_PSTATE_DEFAULT_MODE=3
# CONFIG_X86_AMD_PSTATE_UT is not set

# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver
acpi-cpufreq

I also used the lscpu and cpupower utilities to figure out what the OS can actually see about the CPU.

lscpu
Architecture:            x86_64
  CPU op-mode(s):        32-bit, 64-bit
  Address sizes:         43 bits physical, 48 bits virtual
  Byte Order:            Little Endian
CPU(s):                  16
  On-line CPU(s) list:   0-15
Vendor ID:               AuthenticAMD
  BIOS Vendor ID:        Advanced Micro Devices, Inc.
  Model name:            AMD Ryzen 7 3700X 8-Core Processor
    BIOS Model name:     AMD Ryzen 7 3700X 8-Core Processor              Unknown CPU @ 3.6GHz
    BIOS CPU family:     107
    CPU family:          23
    Model:               113
    Thread(s) per core:  2
    Core(s) per socket:  8
    Socket(s):           1
    Stepping:            0
    Frequency boost:     enabled
    CPU(s) scaling MHz:  82%
    CPU max MHz:         4426.1709
    CPU min MHz:         2200.0000
    BogoMIPS:            7200.22
    Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulq
                         dq monitor ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perf
                         ctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero 
                         irperf xsaveerptr rdpru wbnoinvd arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif v_spec_ctrl umip rdpid overflow_recov succor smca sev sev_es
Virtualization features: 
  Virtualization:        AMD-V
Caches (sum of all):     
  L1d:                   256 KiB (8 instances)
  L1i:                   256 KiB (8 instances)
  L2:                    4 MiB (8 instances)
  L3:                    32 MiB (2 instances)
NUMA:                    
  NUMA node(s):          1
  NUMA node0 CPU(s):     0-15
Vulnerabilities:         
  Gather data sampling:  Not affected
  Itlb multihit:         Not affected
  L1tf:                  Not affected
  Mds:                   Not affected
  Meltdown:              Not affected
  Mmio stale data:       Not affected
  Retbleed:              Mitigation; untrained return thunk; SMT enabled with STIBP protection
  Spec rstack overflow:  Mitigation; Safe RET
  Spec store bypass:     Mitigation; Speculative Store Bypass disabled via prctl
  Spectre v1:            Mitigation; usercopy/swapgs barriers and __user pointer sanitization
  Spectre v2:            Mitigation; Retpolines, IBPB conditional, STIBP always-on, RSB filling, PBRSB-eIBRS Not affected
  Srbds:                 Not affected
  Tsx async abort:       Not affected

cpupower frequency-info 
analyzing CPU 0:
  driver: acpi-cpufreq
  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: 2.20 GHz - 4.43 GHz
  available frequency steps:  3.60 GHz, 2.80 GHz, 2.20 GHz
  available cpufreq governors: conservative ondemand userspace powersave performance schedutil
  current policy: frequency should be within 2.20 GHz and 3.60 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency: 3.60 GHz (asserted by call to hardware)
  boost state support:
    Supported: yes
    Active: yes
    Boost States: 0
    Total States: 3
    Pstate-P0:  3600MHz
    Pstate-P1:  2800MHz
    Pstate-P2:  2200MHz

Switching CPPC to ENABLED in the BIOS didn’t change the output of lscpu (still no reference to CPPC) or cpupower frequency-info.

I’d appreciate any advice on how to best understand what my CPU can actually do with regard to power management features. Thanks!

Not something I have tinkered with. I found this on the proxmox forums. Looks like a great discussion about using this feature. You might have already seen this.

Thanks!

I’m actually the last commenter on that thread.

It’s a great discussion, but it’s missing two things I’m looking for:

  1. A yes/no answer on whether my CPU (Ryzen 3700X) is supported by this driver.
  2. Which version of the driver (regular or with epp) is actually supported by my CPU and how to correctly enable it.

I shouldn’t be having to search as hard for this as I am. AMD seems to have dropped the new pstate driver on Linux, said it’s supported in “some” of the “modern” Ryzen CPUs, and left us all to YOLO it. :stuck_out_tongue:

I want to optimize my power usage, but I need this server to be stable, since it’s supposed to be always-on once it’s set up.