You are not logged in.

#1 2024-01-07 15:45:47

GTRONICK
Member
Registered: 2016-07-17
Posts: 41

[SOLVED] amd-pstate-epp driver not limiting CPU Frequency.

Hello everybody,

I'm testing the new amd-pstate-epp, using the power profiles daemon. I can see the energy performance preference changing when switching between Power save, Balanced and Performance in KDE.

It changes according to:

cat /sys/devices/system/cpu/cpu0/cpufreq/energy_performance_available_preferences
default performance balance_performance balance_power power

However, I still see the frequencies going up above 4GHz even setting it to power.

I have set the driver as active in the kernel parameters:

amd_pstate=active
sudo cpupower frequency-info
analyzing CPU 14:
  driver: amd-pstate-epp
  CPUs which run at the same hardware frequency: 14
  CPUs which need to have their frequency coordinated by software: 14
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 400 MHz - 5.03 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 400 MHz and 5.03 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: yes
    Active: yes
    AMD PSTATE Highest Performance: 166. Maximum Frequency: 5.03 GHz.
    AMD PSTATE Nominal Performance: 109. Nominal Frequency: 3.30 GHz.
    AMD PSTATE Lowest Non-linear Performance: 36. Lowest Non-linear Frequency: 1.09 GHz.
    AMD PSTATE Lowest Performance: 14. Lowest Frequency: 400 MHz.
lscpu
Architecture:            x86_64
  CPU op-mode(s):        32-bit, 64-bit
  Address sizes:         48 bits physical, 48 bits virtual
  Byte Order:            Little Endian
CPU(s):                  16
  On-line CPU(s) list:   0-15
Vendor ID:               AuthenticAMD
  Model name:            AMD Ryzen 9 5980HX with Radeon Graphics
    CPU family:          25
    Model:               80
    Thread(s) per core:  2
    Core(s) per socket:  8
    Socket(s):           1
    Stepping:            0
    CPU(s) scaling MHz:  34%
    CPU max MHz:         5025.0000
    CPU min MHz:         400.0000
    BogoMIPS:            6590.71
    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 cpu
                         id extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dn
                         owprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms i
                         nvpcid cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local user_shstk clzero irperf xsaveerptr rdpru wbnoinvd 
                         cppc arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif v_spec_ctrl umip pku ospke vaes vpclmulqdq rdpid over
                         flow_recov succor smca fsrm debug_swap
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:                    16 MiB (1 instance)
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:              Not affected
  Spec rstack overflow:  Vulnerable: Safe RET, no microcode
  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, IBRS_FW, STIBP always-on, RSB filling, PBRSB-eIBRS Not affected
  Srbds:                 Not affected
  Tsx async abort:       Not affected

Maybe I'm missing something, any idea?

Thanks in advance!!

UPDATE: 08 Jan, 2023
According to the Arch wiki, I understand now that the powersave governor actually works like the schedutil governor, giving dynamic frequency scaling:

...The most important feature of active governing is that only two governors appear available, powersave and performance. They do not work at all like their normal counterpart, however: these levels are translated into an Energy Performance Preference hint for the CPU's internal governor. As a result, they both provide dynamic scaling, similar to the schedutil or ondemand generic governors respectively, differing mostly in latency...

UPDATE: 17 Jan, 2023
After unplugging the laptop and switching to Power Save in the power profiles daemon applet, I can now see the frequencies limited to 1.3GHz.

Last edited by GTRONICK (2024-01-17 21:48:37)

Offline

#2 2024-05-19 04:50:02

Mario156090
Member
Registered: 2018-12-04
Posts: 57

Re: [SOLVED] amd-pstate-epp driver not limiting CPU Frequency.

I have same problem, My battery drain a lot. My temporal fix is set up frequency with cpupower but isn't good option.

Offline

Board footer

Powered by FluxBB