Bug 218705
Summary: | amd_pstate fails to load on AMD 5950x with Asus ROG CROSSHAIR VIII DARK HERO x570 | ||
---|---|---|---|
Product: | Power Management | Reporter: | Andrei Amuraritei (andamu) |
Component: | cpufreq | Assignee: | linux-pm (linux-pm) |
Status: | RESOLVED CODE_FIX | ||
Severity: | normal | CC: | nielsenb, Perry.Yuan, xiaojian.du |
Priority: | P3 | ||
Hardware: | AMD | ||
OS: | Linux | ||
Kernel Version: | Subsystem: | ||
Regression: | No | Bisected commit-id: | |
Attachments: |
cppc check script
values from cppc_attr_values_check.sh script cpufreq_grep dmesg with amd_pstate.dyndbg lscpu -ae cpufreq_grep with amd_pstate=active dmesg with amd_pstate.dyndbg and amd_pstate=active lscpu -ae with amd_pstate=active lscpu -ae with amd_pstate=passive dmesg with amd_pstate.dyndbg and amd_pstate=passive cpufreq_grep with amd_pstate=passive |
Description
Andrei Amuraritei
2024-04-10 16:52:17 UTC
Reading though 218171, I have checked if my ACPI tables have the _CPC entries and they do: ssdt10.dsl: Name (_CPC, Package (0x17) // _CPC: Continuous Performance Control Looking at the source[0] I think this is by design. I am not sure what the current roadmap for enablement looks like, but I am also awaiting it. [0] - https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/cpufreq/amd-pstate.c#n55 Created attachment 306192 [details]
cppc check script
(In reply to Andrei Amuraritei from comment #0) > Hi! > > Sorry if the formatting is broken or this is unreadable. Description preview > is broken it seems. > > amd_pstate fails to load on this hardware: > CPU: AMD 5950x > Mainboard: Asus ROG CROSSHAIR VIII DARK HERO x570 running UEFI version 4702 > OS: Fedora 39 Wayland with kernel Linux 6.8.4-200.fc39.x86_64 > > amd_pstate does not get automatically enabled. dmesg -T | grep pstate says: > > [Tue Apr 9 17:24:36 2024] amd_pstate: driver load is disabled, boot with > specific mode to enable this > > No cppc found in output from lscpu. In UEFI the following are activated: > > Advanced > AMD CBS > NBIO Common Options > SMU Common Options > > CPPC (Auto / Enabled / Disabled): Enabled > CPPC Preferred Cores: Enabled Hi Andrei Could you use the script to check the CPPC capabilities? As I know, the 5950x is in the CPPC supported list, I need more information to check what the system is missing. Perry. Created attachment 306195 [details]
values from cppc_attr_values_check.sh script
Hi Perry,
I've attached 20240422-cppc_check.txt with the output from the script.
pstate did not load automatically for me on this system as long as I remember (across Debian or Fedora with kernels 6.x).
Let me know what other info you require please.
Thanks,
Andrei Amuraritei
I have confirmed that the CPPC capabilities are valid to enable pstate driver, 1) sudo nano /etc/default/grub 2) add ``amd_pstate.dyndbg=+p`` to kernel command line. 3) sudo update-grub 4) sudo reboot then share below logs to me. # dmesg # lscpu -ae # cd /sys/devices/system/cpu/cpu0/cpufreq # grep -R . Perry. I have confirmed that the CPPC capabilities are valid to enable pstate driver, 1) sudo nano /etc/default/grub 2) add ``amd_pstate.dyndbg=+p`` to kernel command line. 3) sudo update-grub 4) sudo reboot then share below logs to me. # dmesg # lscpu -ae # cd /sys/devices/system/cpu/cpu0/cpufreq # grep -R . Perry. BTW, which kernel version you used? Have you added "amd_pstate=active" to command line? Created attachment 306207 [details]
cpufreq_grep
Created attachment 306208 [details]
dmesg with amd_pstate.dyndbg
Created attachment 306209 [details]
lscpu -ae
Created attachment 306210 [details]
cpufreq_grep with amd_pstate=active
Created attachment 306211 [details]
dmesg with amd_pstate.dyndbg and amd_pstate=active
Created attachment 306212 [details]
lscpu -ae with amd_pstate=active
Hi Perry, Attached the required output of the commands specified. First files are after adding amd_pstate.dyndbg=+p but there amd_pstate still did not load automatically. Then I also added amd_pstate=active to the kernel param list and attached the outputs from commands, with "active" in names. Kernel when opened the bug was 6.8.4-200.fc39.x86_64 and right now it is 6.8.6-200.fc39.x86_64 as specified in dmesg output. "Talk" soon. Andrei Amuraritei From the dmesg log: ...... [Do Apr 25 17:18:53 2024] device-mapper: uevent: version 1.0.3 [Do Apr 25 17:18:53 2024] device-mapper: ioctl: 4.48.0-ioctl (2023-03-01) initialised: dm-devel@redhat.com [Do Apr 25 17:18:53 2024] amd_pstate: AMD CPPC **shared memory** based functionality is supported [Do Apr 25 17:18:53 2024] amd_pstate: policy_max =5084000, policy_min=550000 [Do Apr 25 17:18:53 2024] amd_pstate: set_policy: cpuinfo.max 5084000 policy->max 5084000 [Do Apr 25 17:18:53 2024] amd_pstate: policy_max =5084000, policy_min=550000 [Do Apr 25 17:18:53 2024] amd_pstate: set_policy: cpuinfo.max 5084000 policy->max 5084000 [Do Apr 25 17:18:53 2024] amd_pstate: policy_max =5084000, policy_min=550000 [Do Apr 25 17:18:53 2024] amd_pstate: set_policy: cpuinfo.max 5084000 policy->max ...... R9-5950X is ZEN3 Arch CPU and has half support for CPPC. Would you try to use "amd_pstate=passive" in the grub config? Created attachment 306222 [details]
lscpu -ae with amd_pstate=passive
Created attachment 306223 [details]
dmesg with amd_pstate.dyndbg and amd_pstate=passive
Created attachment 306224 [details]
cpufreq_grep with amd_pstate=passive
Hi Xiaojian, Booted with amd_passive and ran the commands. Output attached in files with passive in name. Friendly greetings Andrei Amuraritei Not sure if relevant, but I found out that Fedora also has amd-pstate-ut module, and loading this, i see the following in dmesg: boot kernel with amd_pstate=passive [Fr Apr 26 19:37:29 2024] amd_pstate_ut: 1 amd_pstate_ut_acpi_cpc_valid success! [Fr Apr 26 19:37:29 2024] amd_pstate_ut: 2 amd_pstate_ut_check_enabled success! [Fr Apr 26 19:37:29 2024] amd_pstate_ut: amd_pstate_ut_check_perf cpu0 highest=221 166 nominal=111 111 lowest_nonlinear=57 57 lowest=19 19, they should be equal! [Fr Apr 26 19:37:29 2024] amd_pstate_ut: 3 amd_pstate_ut_check_perf fail! [Fr Apr 26 19:37:29 2024] amd_pstate_ut: 4 amd_pstate_ut_check_freq success! boot kernel with amd_pstate=active [Fr Apr 26 19:35:07 2024] amd_pstate_ut: 1 amd_pstate_ut_acpi_cpc_valid success! [Fr Apr 26 19:35:07 2024] amd_pstate_ut: 2 amd_pstate_ut_check_enabled success! [Fr Apr 26 19:35:07 2024] amd_pstate_ut: amd_pstate_ut_check_perf cpu0 highest=221 166 nominal=111 111 lowest_nonlinear=57 57 lowest=19 19, they should be equal! [Fr Apr 26 19:35:07 2024] amd_pstate_ut: 3 amd_pstate_ut_check_perf fail! [Fr Apr 26 19:35:07 2024] amd_pstate_ut: 4 amd_pstate_ut_check_freq success! Hi Andrei, I saw the pstate passive mode driver was loaded on your system, how do you check the pstate dricer loaded or not? # sudo cpupower frequency-info you could use cpupower to see if the driver loaded gernerally. [Fr Apr 26 19:20:02 2024] amd_pstate: AMD CPPC shared memory based functionality is supported. root@fedora:/sys/devices/system/cpu/cpu0/cpufreq# grep -R . amd_pstate_highest_perf:166 scaling_min_freq:550000 scaling_available_governors:conservative ondemand userspace powersave performance schedutil scaling_governor:schedutil cpuinfo_max_freq:5084000 boost:0 amd_pstate_lowest_nonlinear_freq:1743000 amd_pstate_max_freq:5084000 related_cpus:0 scaling_cur_freq:2880470 scaling_setspeed:<unsupported> affected_cpus:0 scaling_max_freq:5084000 cpuinfo_transition_latency:20000 scaling_driver:amd-pstate<<<<<<<<<<<<<<<<<<<<<<<<< cpuinfo_min_freq:550000 Perry. Hi Perry, The driver loads when manually specifying amd_pstate kernel param. My issue is that it does not get automatically enabled for the system, as stated in the first message. The issue is why is not enabled automatically, if the hardware support is there? Thanks. Andrei Amuraritei Hi Andrei, "pstate did not load automatically for me on this system as long as I remember (across Debian or Fedora with kernels 6.x)." Ok, I thought your system cannot load pstate driver, not the problem is simple to resolve. Have you configured the kernel config to enable the default mode 3(EPP) or set to disabled? Could you check your kernel config if you have enabled the AMD pstate driver? Here is my kernel config option, you can update config if you have not enabled it to default 3. # grep -rsn AMD_PSTATE .config 693:CONFIG_X86_AMD_PSTATE=y 694:CONFIG_X86_AMD_PSTATE_DEFAULT_MODE=3 695:# CONFIG_X86_AMD_PSTATE_UT is not set Perry. Hi again, I meant, amd_pstate did not load automatically, without me specifying a kernel param for it. The .config values are (Fedora default config): grep -rsn AMD_PSTATE /boot/config-6.8.7-200.fc39.x86_64 700:CONFIG_X86_AMD_PSTATE=y 701:CONFIG_X86_AMD_PSTATE_DEFAULT_MODE=3 702:CONFIG_X86_AMD_PSTATE_UT=m Thanks. (In reply to Andrei Amuraritei from comment #25) > Hi again, > > I meant, amd_pstate did not load automatically, without me specifying a > kernel param for it. > > The .config values are (Fedora default config): > > grep -rsn AMD_PSTATE /boot/config-6.8.7-200.fc39.x86_64 > 700:CONFIG_X86_AMD_PSTATE=y > 701:CONFIG_X86_AMD_PSTATE_DEFAULT_MODE=3 > 702:CONFIG_X86_AMD_PSTATE_UT=m > > Thanks. Thank you help to share the info, I have found the root cause, working on the fix patch, will send it out after we finish the testing. Perry. Hi, Please try this patchset for the issue https://lore.kernel.org/lkml/cover.1715065568.git.perry.yuan@amd.com/ (In reply to Perry Yuan(AMD) from comment #27) > Hi, Please try this patchset for the issue > > https://lore.kernel.org/lkml/cover.1715065568.git.perry.yuan@amd.com/ I see the same issue on my 5800x3d and Gigabyte X570S Aorus Elite and would like to test this fix. What kernel does this patchset apply to? I get conflicts on both 6.9 and linux-next. Hi Brandon, V2 patchset had been sent out, https://lore.kernel.org/lkml/cover.1715356532.git.perry.yuan@amd.com/ the patches need to be applied to linux-pm/bleeding-ege branch, https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/?h=bleeding-edge Perry. (In reply to Perry Yuan(AMD) from comment #29) > Hi Brandon, > > V2 patchset had been sent out, > > https://lore.kernel.org/lkml/cover.1715356532.git.perry.yuan@amd.com/ > > > the patches need to be applied to linux-pm/bleeding-ege branch, > > https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/ > ?h=bleeding-edge > > Perry. I can confirm with the V2 patchset applied to linux-pm/bleeding-ege, the AMD P-state driver loads by default on my system with no kernel arguments necessary. Hi Perry, I can also confirm the module loads automatically now, without specifying a kernel parameter, with V2 patchset on the mentioned kernel branch: uname -r ; cat /sys/devices/system/cpu/amd_pstate/{prefcore,status} ; git remote -v 6.9.0-rc7+ enabled active origin https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/ (fetch) origin https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/ (push) cpupower frequency-info gives driver: amd-pstate-epp Waiting for V3 patchset. Do you think this will be merged for kernel 6.10? Thanks. |