Created attachment 301428 [details]
Model name: AMD Ryzen 7 5800HS with Radeon Graphics
CPU family: 25
Flags: ... cppc ...
amd-pstate won't load:
modprobe: ERROR: could not insert 'amd_pstate': No such device
first bad commit is: 13bb696dd2f3bd5f23a6be2d97063ee3bdb6b690
[ACPI: CPPC: Check _OSC for flexible address space]
it cannot be simlpy reverted unfortunaltelly
Issue is quite simmilar to:
To be sure i've tweaked that patch to fit to my cpu, but it didn't work.
I believe your CPU should support the MSR approach. It should have been fixed by "ACPI: CPPC: Don't require _OSC if X86_FEATURE_CPPC is supported". You can see in your lscpu output the "cppc" flag is present.
That other patch won't matter. That patch was specifically to fix "ACPI: bus: Set CPPC _OSC bits for all and when CPPC_LIB is supported".
A few asks:
1) Does acpi-cpufreq work? Or that's broken too from this commit?
2) Can you please share your full dmesg and an acpidump?
3) If you turn on dynamic debugging for drivers/acpi/cppc_acpi.c do you see "Flexible address space capability not supported"? I would expect yes from that bisect.
Could try the latest kernel from linux-pm tree ?
I tried this tree, the pstate driver can be loaded.
[ 250.010934] cpufreq: setting new policy for CPU 15: 400000 - 4673000 kHz
[ 250.010935] cpufreq: new min and max freqs are 400000 - 4673000 kHz
[ 250.010935] cpufreq: governor limits update
[ 250.010935] cpufreq: cpufreq_governor_limits: for CPU 15
[ 250.010936] cpufreq: initialization complete
[ 250.010937] cpufreq: driver amd-pstate up and running
5.19.0-rc6+ #13 SMP PREEMPT_DYNAMIC Fri Jul 15 11:07:12 CST 2022 x86_64 x86_64 x86_64 GNU/Linux
My system has the same model id like yours.
Vendor ID: AuthenticAMD
CPU family: 25
with cppc flag in cpuid
I've built ...git/rafael/linux-pm.git #branch=bleeding-edge (as far I can see it's match linux-next) amd-pstate not working.
I've done any dumps on this build (hope it's not a problem)
1)it's loaded but not detect boost (but according to turbostats boost works)
2)will be uploaded
3)yes, you have right:
[ 0.494379] ACPI CPPC: CPPC v2 _OSC not acked
[ 0.494388] ACPI CPPC: Flexible address space capability not supported
Created attachment 301431 [details]
Created attachment 301432 [details]
(In reply to Arek Ruśniak from comment #3)
> I've built ...git/rafael/linux-pm.git #branch=bleeding-edge (as far I can
> see it's match linux-next) amd-pstate not working.
> I've done any dumps on this build (hope it's not a problem)
> 1)it's loaded but not detect boost (but according to turbostats boost works)
> 2)will be uploaded
> 3)yes, you have right:
> [ 0.494379] ACPI CPPC: CPPC v2 _OSC not acked
> [ 0.494388] ACPI CPPC: Flexible address space capability not supported
Could you upload the dmesg log with below parameter in grub?
cpufreq.dyndbg=+p amd_pstate.dyndbg=+p cppc_acpi.dyndbg=+p debug loglevel=8 log_buf_len=100M
If the driver was loaded, I would like to see if there is any loading error.
also need you help to post cpupower output .
# sudo cpupower frequency-info
Created attachment 301434 [details]
dmesg with more debug stuff
[ 3.964861] amd_pstate: the _CPC object is not present in SBIOS
is this what we are looking for?
# cpupower frequency-info
analyzing CPU 0:
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: 1.20 GHz - 3.20 GHz
available frequency steps: 3.20 GHz, 1.30 GHz, 1.20 GHz
available cpufreq governors: conservative ondemand userspace powersave performance schedutil
current policy: frequency should be within 1.20 GHz and 3.20 GHz.
The governor "schedutil" may decide which speed to use
within this range.
current CPU frequency: 1.20 GHz (asserted by call to hardware)
boost state support:
Boost States: 0
Total States: 3
Created attachment 301435 [details]
dmesg 5.18.10 - with working amd_pstate
I have the same problem with kernel 5.18.11, which is still in kernel 5.18.12, released today.
I have an AMD Ryzen 3 3100, and I use the kernel boot option: amd_pstate.shared_mem=1. With kernel 5.18.10 and earlier, no problem.
Hi Jose, did you try:
It's fixing issue I've mentioned in #1
(In reply to Arek Ruśniak from comment #11)
> Hi Jose, did you try:
> It's fixing issue I've mentioned in #1
Thank you, I will try it.
Problem solved. Thanks to all.
> [ 0.688308] ACPI CPPC: CPPC v2 _OSC not acked
OK good, this confirms that your system had _OSC not advertising.
> [ 0.688392] ACPI CPPC: Flexible address space capability not supported
That does confirm that your assertion of the bisect was the cause.
I'm attaching a patch that I think can help the problem.
Created attachment 301440 [details]
possible patch to avoid the error
Mario, Perry thanks a lot for help.
I've testing patch onto 5.18.2 and it works as before.
[ 3.337866] amd_pstate: AMD CPPC MSR based functionality is supported
*I mean 5.18.12*
Hi Mario, the patch don’t solve the issue on Zen2 CPU on Arch Linux or Based Systems. I saw some reports on the Manjaro forum.: https://forum.manjaro.org/t/testing-update-2022-07-17-kernel-5-18-octopi-haskell-python/116789
Patch is applied.
For example here: https://forum.manjaro.org/t/testing-update-2022-07-17-kernel-5-18-octopi-haskell-python/116789/12
Hi, phandrix did you read issue i've mention in #1
an patch for that issue:
if it still not helps, and you don't have 'cppc' flag in lscpu output please file a new bug,
Sorry for the mess I created and thanks Mario for fixing it. It s a bit late but please let me know if I can be of any help,
I will just say that amd_pstate work again on Manjaro. Both patches applied there.
Hope it will be upstream later. :)