Bug 216248
Summary: | [Regression] amd-pstate stops working after [ACPI: CPPC: Check _OSC for flexible address space] | ||
---|---|---|---|
Product: | Power Management | Reporter: | Arek Ruśniak (arek.rusi) |
Component: | cpufreq | Assignee: | linux-pm (linux-pm) |
Status: | RESOLVED CODE_FIX | ||
Severity: | normal | CC: | manualinux, mario.limonciello, pandre0x59, Perry.Yuan, perry_yuan, pierre.gondois, tasksynctest |
Priority: | P1 | ||
Hardware: | AMD | ||
OS: | Linux | ||
Kernel Version: | 5.18.11 | Subsystem: | |
Regression: | Yes | Bisected commit-id: | |
Attachments: |
lscpu
dmesg acpidump dmesg with more debug stuff dmesg 5.18.10 - with working amd_pstate possible patch to avoid the error |
Description
Arek Ruśniak
2022-07-14 20:40:31 UTC
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. Hi Arek: Could try the latest kernel from linux-pm tree ? https://kernel.googlesource.com/pub/scm/linux/kernel/git/rafael/linux-pm.git 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 Model: 80 with cppc flag in cpuid Perry. 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]
dmesg
Created attachment 301432 [details]
acpidump
(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 Hi Arek: 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 Perry. 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: 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: 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: Supported: yes Active: yes Boost States: 0 Total States: 3 Pstate-P0: 3200MHz Pstate-P1: 1300MHz Pstate-P2: 1200MHz Created attachment 301435 [details]
dmesg 5.18.10 - with working amd_pstate
Hello, 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. Regards. Hi Jose, did you try: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?h=next-20220714&id=fbd74d16890b9f5d08ea69b5282b123c894f8860 It's fixing issue I've mentioned in #1 (In reply to Arek Ruśniak from comment #11) > Hi Jose, did you try: > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/ > ?h=next-20220714&id=fbd74d16890b9f5d08ea69b5282b123c894f8860 > > 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 https://lore.kernel.org/lkml/3559249.JlDtxWtqDm@natalenko.name/ an patch for that issue: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?h=next-20220715&id=fbd74d16890b9f5d08ea69b5282b123c894f8860 if it still not helps, and you don't have 'cppc' flag in lscpu output please file a new bug, Hi, 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, Pierre Hi, I will just say that amd_pstate work again on Manjaro. Both patches applied there. Hope it will be upstream later. :) |