How to use AMD P-State in Linux

Most likely it will be fixed very soon indeed. (If someone reports it :wink: )

Personally I just enjoy figuring out the root cause and digging into those things.
It’s somewhat fun for me and I enjoy it (and ideally also learn something). :man_shrugging:

2 Likes

It’s not working on my Ryzen 5500U and also on the desktop Ryzen 3800X which both worked before. I will wait til next kernel updates. My Ryzen 4700U never did work.

Neither did on my Ryzen 4800U :disappointed:

1 Like

Has the mitigation for this been already implemented in 5.18.11 ?

This is what inxi -aC shows regarding the vulnerabilities:

Vulnerabilities:
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: spec_store_bypass
    mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1
    mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, IBRS_FW,
    STIBP: conditional, RSB filling
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected

same here :wink:

also in this case I do simple have no error or anything shown any indication on why it does not work…

Actually no. I was jumping between the mainline and latest trees and just saw retbleed here and there :rofl:
Sorry. Thanks for noticing.

1 Like

i dont think that parameter is a thing

OP is still working on my end

yes you need shared mem for desktop zen3

AMD Ryzen™ 7 Mobile Processors
so also mobile one and working … (like the one from @fbodymechanic )

2 Likes

Working on my latest machine with 5.18.11…

image

just updated to .12 and is still not there for Desktop CPU :wink:

[16:37:17] joekamprad :: i3-private  ➜  ~ » uname -a 
Linux i3-private 5.18.12-AMD #1 SMP PREEMPT_DYNAMIC Fri Jul 15 10:46:59 CEST 2022 x86_64 GNU/Linux

i see this in journal:

Jul 15 16:31:26 i3-private kernel: amd_uncore: 4  amd_df counters detected
Jul 15 16:31:26 i3-private kernel: amd_uncore: 6  amd_l3 counters detected
Jul 15 16:31:26 i3-private kernel: perf/amd_iommu: Detected AMD IOMMU #0 (2 banks, 4 counters/bank).
Jul 15 16:31:26 i3-private systemd-modules-load[426]: Module 'amd_pstate' is built in

looks like maybe loading with “/etc/modules-load.d/amd-pstate.conf” may no longer be needed? or are you running a custom kernel that may have it built in?

yes … but should not harm loading it … i use linux-amd kernel where it is set to =y …

https://lore.kernel.org/all/3559249.JlDtxWtqDm@natalenko.name/

validation :wink: @jonathon

2 Likes

that would likely be why it still works for me, im on 5.18.10 lol

1 Like

Same here though 5800H laptop but also get acpi cpufreq since .11 and now also with .12 (Linux-amd kernel) .10 everything was working fine. I’ve seen this also remarked already in a Fedora forum thread so we’re not alone in this.


cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver gives me: acpi-cpufreq

/etc/modules-load.d/amd-pstate.conf I added it again (it disappeared after updating to .11 and again after going to .12) and rebooted but still acpi-cpufreq stays in place once rebooted. (amd-pstate.conf file did stay in place once rebooted)

executing watch -n1 “grep "^[c]pu MHz" /proc/cpuinfo” gives me 1200Mhz on all threads while 400 was set over cpupower frequency-set -u 400 (400 is the lowest for the 5800H). Setting 400 again has no effect whatsoever.

Putting some stress on the cpu doesn’t raise the core frequencies over +/- 1500MHz when checking with watch -n1 “grep "^[c]pu MHz" /proc/cpuinfo”

Really strange, i guess 2 options, rollback to .10 or wait for .13 and hope it’s solved in .13

1 Like

stress test result with s-tui shows cpu doesn’t go higher than 1.2Ghz

image

will give you the same on hardware limits… like only showing 1.2GHz as lowest and nothing lower…

1 Like

Seems fix is on the way: https://bugzilla.kernel.org/show_bug.cgi?id=216248

2 Likes

5.18.13 will have the needed fix !!

https://lwn.net/ml/linux-kernel/20220721182818.743726259%40linuxfoundation.org/

4 Likes

5.18.13 will soon be in the testing area, and a bit later as official.

akm