I just enabled it on my HP Envy 2n1, seems to be working. It’s the 5800U model. It shouldn’t matter but it is running fedora.
No 5000 series OEM systm should have issues. I think CPPC enabled was a requirement for those systems afaik
Currently on my system (see above for the CPU info etc.)
$ lscpu | grep cppc
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 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 3dnowprefetch 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 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 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 rdpid overflow_recov succor smca
cat /etc/modules-load.d/amd_pstate.conf
amd_pstate
$ cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-linux-zen root=UUID=920fc5a6-a736-43bf-a799-127e270776f0 rw amd_pstate.shared_mem=1 lsm=landlock,lockdown,yama,apparmor,bpf loglevel=3
Still
$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver
cat: /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver: No such file or directory
$ 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.
Not Available
available cpufreq governors: Not Available
Unable to determine current policy
current CPU frequency: Unable to call hardware
current CPU frequency: Unable to call to kernel
boost state support:
Supported: yes
Active: no
about series 4000 mobile / 5000 mobile Ryzen 2 or Ryzen 3
see this
only version 5600m ou 5800m or 5900m or + are Zen 3
all others cpu series are Zen 2
always error in dmesg on CPPC init ?
There doesn’t seem to be any errors.
sudo dmesg | grep cppc
outputs nothing.
Did you disable acpi-cpufreq
? You should re-enable it then.
I think it is pretty much every Zen2 based lenovo model indeed.
Nice! Thanks for finding this.
I searched several hours for getting into some sort of advanced firmware settings.
(seems lenovo is securing these kind of things better than fort knox)
Of course there is issues again with the Thinkpad models though Would’ve been to easy.
I think I’ll wait for someone else to brick their device first before I’ll play with it
https://github.com/SmokelessCPU/UniversalAMDFormBrowser/issues/1#issuecomment-1126851893
Yes, I did. I blocked it in a conf in /etc/modprobe.d
in the hope of forcing the loading of amd_pstat
which by now it looks not to be supported.
Also, there is some settings in BIOS concerning system performance: powersave, intelligent cooling, extreme performance.
Now with acpi_cpufreq disabled, are those settings in charge of scaling up and down cpu frequency? I am watching it with htop and s-tui. It seems that it scales up and down fine.
Admitedly I am out of my depth when it comes to this sort of technical subtleties so I might very well be confounding things.
Don’t know, but I guess the processor will adapt frequency by itself (or in case of a laptop the EC might play a role as well for this?) if not governed by software (OS).
I’d enable acpi-cpufreq
again though. It’s probably “more clever” than pure hw steered scaling.
Thanks for the insight and the advise!
I’ll enable it again then.
Just bought an AMD. Never knew about this, so thank you, for bringing this up.
CPU:
Info: 8-core model: AMD Ryzen 9 5900HX with Radeon Graphics bits: 64
type: MT MCP cache: L2: 4 MiB
Kernel: 5.18.1-arch1-1
Just had to put this in:
/etc/modules-load.d/amd-pstate.conf
amd_pstate
amd_pstate.shared_mem=1
and reboot
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver
amd-pstate
cpu MHz : 3139.200
cpu MHz : 442.800
cpu MHz : 442.800
cpu MHz : 827.100
cpu MHz : 400.000
cpu MHz : 400.000
cpu MHz : 400.000
cpu MHz : 656.800
cpu MHz : 442.800
cpu MHz : 485.600
cpu MHz : 1341.600
cpu MHz : 442.800
cpu MHz : 614.000
cpu MHz : 400.000
cpu MHz : 485.600
cpu MHz : 956.400
I run EndeavourOS as a virtual machine inside Proxmox, and had never thought about power management and CPU frequency scaling. This post now has me thinking on how virtualization interacts with the CPU’s state…
Is it just the host kernel that controls CPU performance or are guest kernels actually able to control the cores they are running on? I’m just thinking that if a guest kernel is able to set some cores in low-power mode because it is not using them, but then the host moves another VM into those cores and that VM is doing some intensive work, then the cores would be flipping into and out of lower power state.
At the same time, is the host kernel aware of the processing requirements in guest VMs? Say you are running a 16c/32t processor (5950x) and have a single VM with EndeavourOS using “8 cores” (really threads I guess, would the host be aware of how intensively the guest is running those cores and be able to manage the core states effectively?
P.S. I use QEMU/KVM via Proxmox.
Pretty sure for VM Guests this isn’t useful, and isn’t good for VM performance vs performance governor
AFAIK mostly host controls p states, the rest is outside the scope of my knowledge.
Just wanted to report that I got amd_pstate
working on another system with the CPU as follows:
CPU
Info: model: AMD Ryzen 7 5700U with Radeon Graphics bits: 64 type: MT MCP
arch: Zen 2 family: 0x17 (23) model-id: 0x68 (104) stepping: 1
microcode: 0x8608102
Topology: cpus: 1x cores: 8 tpc: 2 threads: 16 smt: enabled cache:
L1: 512 KiB desc: d-8x32 KiB; i-8x32 KiB L2: 4 MiB desc: 8x512 KiB
L3: 8 MiB desc: 2x4 MiB
Speed (MHz): avg: 1524 high: 4183 min/max: 400/4372 boost: enabled
scaling: driver: amd-pstate governor: ondemand cores: 1: 1097 2: 4183
3: 1098 4: 1097 5: 1115 6: 1106 7: 1408 8: 1384 9: 1053 10: 1094 11: 1580
12: 1580 13: 1053 14: 1053 15: 3444 16: 1053 bogomips: 57494
$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver
amd-pstate
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: 131 us
hardware limits: 400 MHz - 4.37 GHz
available cpufreq governors: conservative ondemand userspace powersave performance schedutil
current policy: frequency should be within 400 MHz and 4.37 GHz.
The governor "ondemand" may decide which speed to use
within this range.
current CPU frequency: Unable to call hardware
current CPU frequency: 1.07 GHz (asserted by call to kernel)
boost state support:
Supported: yes
Active: yes
AMD PSTATE Highest Performance: 255. Maximum Frequency: 4.37 GHz.
AMD PSTATE Nominal Performance: 105. Nominal Frequency: 1.80 GHz.
AMD PSTATE Lowest Non-linear Performance: 65. Lowest Non-linear Frequency: 1.11 GHz.
AMD PSTATE Lowest Performance: 24. Lowest Frequency: 400 MHz.
Just a question: do you use cpupower (cpupower.service) for frequency scaling?
currently I’ve got cpupower.service
running on the config below:
cat /etc/default/cpupower
# Define CPUs governor
# valid governors: ondemand, performance, powersave, conservative, userspace.
governor='ondemand'
# Limit frequency range
# Valid suffixes: Hz, kHz (default), MHz, GHz, THz
#min_freq="2.25GHz"
#max_freq="3GHz"
# Specific frequency to be set.
# Requires userspace governor to be available.
# Do not set governor field if you use this one.
#freq=
# Utilizes cores in one processor package/socket first before processes are
# scheduled to other processor packages/sockets.
# See man (1) CPUPOWER-SET for additional details.
#mc_scheduler=
# Utilizes thread siblings of one processor core first before processes are
# scheduled to other cores. See man (1) CPUPOWER-SET for additional details.
#smp_scheduler=
# Sets a register on supported Intel processore which allows software to convey
# its policy for the relative importance of performance versus energy savings to
# the processor. See man (1) CPUPOWER-SET for additional details.
#perf_bias=
# vim:set ts=2 sw=2 ft=sh et:
The host controls this. Would be problematic if the hypervisor exposes direct control of that stuff to the guests.

would the host be aware of how intensively the guest is running those cores and be able to manage the core states effectively
Yes.
This is just awsome.
I have a HP laptop with Ryzen 7 5700U here, running fedora (doesn’t matter i guess).
I was really annoyed because the fan was constantly running - with no obvious reason. Seemed to be kind of random, as the temperature was quite cool. A BIOS update didn’t help. Looked at the Arch Wiki for things like controlling the fan, power management and so on. Then i found this thread, like on accident, because it just was on top of the “latest” category when i visited the forum . Boy this worked wonders! I just had to make sure the driver gets loaded (by creating the conf file in /etc/modules-load.d). Now its so much better. Before, the CPU only clocked down to 1,4 GHz. Now it even reaches 400 MHz. And the fan is finally chillin’
. Even at the same temperatures, where the fan went crazy before, it now stays calm, only comming up sometimes for a short time when its needed.
Thanks so much @Echoa. I didn’t know about this. And i am not sure i would have discovered that driver if i hadn’t read this thread…

Before, the CPU only clocked down to 1,4 GHz. Now it even reaches 400 MHz.
That’s actually the only reason I want to give this driver a try.
Do you know the difference in power consumption (cpu package power) between the two?
I didn’t measure it. I was mainly interested in the fan activity. But i do get more battery life with amd_pstate driver
Could you do me a favor and post the output of sudo ryzenadj -i
? (when the machine is idle…)
https://aur.archlinux.org/packages/ryzenadj-git
Is this one a desktop or laptop and how did you get it working. My HP 4700U laptop won’t work. It’s using acpi_freq. Tried different things and it won’t co-operate.