Can not enable amd pstate

Hello,

i want to use amd_pstate driver, too optimize energy consumption and fan noise on my Thinkpad T14 G1 with Ryzen 4650u CPU, which is Zen2. And Zen2 should support amd-pstate, doesn’t it?

output of lscpu | grep cppc

Markierungen:                         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 xtopology 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 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

output of sudo powerprofilesctl

  performance:
    PlatformDriver:     platform_profile
    Degraded:   no

* balanced:
    PlatformDriver:     platform_profile

  power-saver:
    PlatformDriver:     platform_profile

output of cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver

acpi-cpufreq

output of cat /etc/kernel/cmdline

amd_pstate=passive amd_pstate.shared_mem=1 nvme_load=YES nowatchdog rw rd.luks.uuid=ce2b3cf4-64eb-49ce-9909-b11233bddf68 root=/dev/mapper/luks-ce2b3cf4-64eb-49ce-9909-b11233bddf68

i tried “amd-pstate=passive” with “-” instead of “_” and “amd_pstate=active” before with and without “amd_pstate.shared_mem=1” before and it doesnt change a thing.

I dont know, what i have to do, to active that damn driver. Is my cpu not supported or what is going wrong here?

can you post

inxi -Fza
cpupower frequency-info

and check type idle running

sudo turbostat

I seem to have the same issue on my Ryzen 3800X. It used to work until newer kernels. I gave up on it for a while but maybe if someone figures it out I’ll get it working again. :smile:

inxi -Fza:

System:
  Kernel: 6.9.7-arch1-1 arch: x86_64 bits: 64 compiler: gcc v: 14.1.1
    clocksource: tsc avail: hpet,acpi_pm
    parameters: initrd=\94ff977ffb314bb397fddfc664261237\6.9.7-arch1-1\initrd
    amd-pstate=passive amd-pstate.shared_mem=1 nvme_load=YES nowatchdog rw
    rd.luks.uuid=ce2b3cf4-64eb-49ce-9909-b11233bddf68
    root=/dev/mapper/luks-ce2b3cf4-64eb-49ce-9909-b11233bddf68
    systemd.machine_id=94ff977ffb314bb397fddfc664261237
  Desktop: KDE Plasma v: 6.1.1 tk: Qt v: N/A info: frameworks v: 6.3.0
    wm: kwin_wayland vt: 1 dm: SDDM Distro: EndeavourOS base: Arch Linux
Machine:
  Type: Laptop System: LENOVO product: 20UES1K600 v: ThinkPad T14 Gen 1
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: LENOVO model: 20UES1K600 v: SDK0J40697 WIN
    serial: <superuser required> part-nu: LENOVO_MT_20UE_BU_Think_FM_ThinkPad
    T14 Gen 1 uuid: <superuser required> UEFI: LENOVO v: R1BET77W(1.46 )
    date: 10/24/2023
Battery:
  ID-1: BAT0 charge: 35.5 Wh (98.9%) condition: 35.9/50.5 Wh (71.0%)
    volts: 12.9 min: 11.6 model: LGC 5B10W139 type: Li-poly serial: <filter>
    status: not charging cycles: 95
CPU:
  Info: model: AMD Ryzen 5 PRO 4650U with Radeon Graphics bits: 64
    type: MT MCP arch: Zen 2 gen: 3 level: v3 note: check built: 2020-22
    process: TSMC n7 (7nm) family: 0x17 (23) model-id: 0x60 (96) stepping: 1
    microcode: 0x8600109
  Topology: cpus: 1x cores: 6 tpc: 2 threads: 12 smt: enabled cache:
    L1: 384 KiB desc: d-6x32 KiB; i-6x32 KiB L2: 3 MiB desc: 6x512 KiB L3: 8 MiB
    desc: 2x4 MiB
  Speed (MHz): avg: 1869 high: 2895 min/max: 1400/2100 boost: enabled
    scaling: driver: acpi-cpufreq governor: schedutil cores: 1: 2100 2: 1400
    3: 1400 4: 1400 5: 1400 6: 1400 7: 2719 8: 2100 9: 1751 10: 2100 11: 1770
    12: 2895 bogomips: 50325
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities:
  Type: gather_data_sampling status: Not affected
  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: reg_file_data_sampling status: Not affected
  Type: retbleed mitigation: untrained return thunk; SMT enabled with STIBP
    protection
  Type: spec_rstack_overflow mitigation: Safe RET
  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; STIBP:
    always-on; RSB filling; PBRSB-eIBRS: Not affected; BHI: Not affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: AMD Renoir [Radeon Vega Series / Radeon Mobile Series]
    vendor: Lenovo driver: amdgpu v: kernel arch: GCN-5 code: Vega
    process: GF 14nm built: 2017-20 pcie: gen: 3 speed: 8 GT/s lanes: 16
    link-max: gen: 4 speed: 16 GT/s ports: active: eDP-1
    empty: DP-1,DP-2,HDMI-A-1 bus-ID: 07:00.0 chip-ID: 1002:1636
    class-ID: 0300 temp: 40.0 C
  Device-2: Chicony Integrated Camera driver: uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 2-2:2 chip-ID: 04f2:b6d0
    class-ID: fe01 serial: <filter>
  Display: wayland server: X.org v: 1.21.1.13 with: Xwayland v: 24.1.0
    compositor: kwin_wayland driver: X: loaded: amdgpu unloaded: modesetting
    alternate: fbdev,vesa dri: radeonsi gpu: amdgpu display-ID: 0
  Monitor-1: eDP-1 res: 1920x1080 size: N/A modes: N/A
  API: EGL v: 1.5 hw: drv: amd radeonsi platforms: device: 0 drv: radeonsi
    device: 1 drv: swrast surfaceless: drv: radeonsi wayland: drv: radeonsi x11:
    drv: radeonsi inactive: gbm
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: amd mesa v: 24.1.2-arch1.1
    glx-v: 1.4 direct-render: yes renderer: AMD Radeon Graphics (radeonsi
    renoir LLVM 17.0.6 DRM 3.57 6.9.7-arch1-1) device-ID: 1002:1636
    memory: 500 MiB unified: no display-ID: :1.0
  API: Vulkan v: 1.3.279 layers: 6 device: 0 type: integrated-gpu name: AMD
    Radeon Graphics (RADV RENOIR) driver: mesa radv v: 24.1.2-arch1.1
    device-ID: 1002:1636 surfaces: xcb,xlib,wayland
Audio:
  Device-1: AMD Renoir Radeon High Definition Audio vendor: Lenovo
    driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16
    link-max: gen: 4 speed: 16 GT/s bus-ID: 07:00.1 chip-ID: 1002:1637
    class-ID: 0403
  Device-2: AMD ACP/ACP3X/ACP6x Audio Coprocessor vendor: Lenovo
    driver: snd_rn_pci_acp3x v: kernel alternate: snd_pci_acp3x, snd_pci_acp5x,
    snd_pci_acp6x, snd_acp_pci, snd_rpl_pci_acp6x, snd_pci_ps,
    snd_sof_amd_renoir, snd_sof_amd_rembrandt, snd_sof_amd_vangogh,
    snd_sof_amd_acp63 pcie: gen: 3 speed: 8 GT/s lanes: 16 link-max: gen: 4
    speed: 16 GT/s bus-ID: 07:00.5 chip-ID: 1022:15e2 class-ID: 0480
  Device-3: AMD Family 17h/19h HD Audio vendor: Lenovo driver: snd_hda_intel
    v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16 link-max: gen: 4
    speed: 16 GT/s bus-ID: 07:00.6 chip-ID: 1022:15e3 class-ID: 0403
  API: ALSA v: k6.9.7-arch1-1 status: kernel-api
    tools: alsactl,alsamixer,amixer
  Server-1: PipeWire v: 1.2.0 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    vendor: Lenovo driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1
    port: 3400 bus-ID: 02:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp2s0f0 state: down mac: <filter>
  Device-2: Intel Wi-Fi 6 AX200 driver: iwlwifi v: kernel pcie: gen: 2
    speed: 5 GT/s lanes: 1 bus-ID: 03:00.0 chip-ID: 8086:2723 class-ID: 0280
  IF: wlan0 state: up mac: <filter>
  Device-3: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    vendor: Lenovo driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1
    port: 2000 bus-ID: 05:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp5s0 state: down mac: <filter>
  Info: services: NetworkManager, systemd-timesyncd, wpa_supplicant
Drives:
  Local Storage: total: 476.94 GiB used: 170.79 GiB (35.8%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: SK Hynix
    model: HFS512GD9TNI-L2B0B size: 476.94 GiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 tech: SSD serial: <filter>
    fw-rev: 11710C10 temp: 35.9 C scheme: GPT
Partition:
  ID-1: / raw-size: 475.94 GiB size: 467.4 GiB (98.21%)
    used: 170.71 GiB (36.5%) fs: ext4 dev: /dev/dm-0 maj-min: 254:0
    mapped: luks-ce2b3cf4-64eb-49ce-9909-b11233bddf68
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default) zswap: yes
    compressor: zstd max-pool: 20%
  ID-1: swap-1 type: file size: 31 GiB used: 0 KiB (0.0%) priority: -2
    file: /swapfile
Sensors:
  System Temperatures: cpu: 50.0 C mobo: N/A gpu: amdgpu temp: 40.0 C
  Fan Speeds (rpm): fan-1: 0 fan-2: 0
Info:
  Memory: total: 32 GiB note: est. available: 30.58 GiB used: 2.5 GiB (8.2%)
  Processes: 293 Power: uptime: 17m states: freeze,mem,disk suspend: deep
    avail: s2idle wakeups: 0 hibernate: platform avail: shutdown, reboot,
    suspend, test_resume image: 12.22 GiB services: org_kde_powerdevil,
    power-profiles-daemon, upowerd Init: systemd v: 256 default: graphical
    tool: systemctl
  Packages: pm: pacman pkgs: 1210 libs: 335 tools: yay Compilers:
    gcc: 14.1.1 Shell: Bash v: 5.2.26 running-in: konsole inxi: 3.3.35

cpupower frequency-info:

CPU 11 wird analysiert:
  driver: acpi-cpufreq
  CPUs, die mit der gleichen Hardwarefrequenz laufen: 11
  CPUs, die ihre Frequenz mit Software koordinieren müssen: 11
  Maximale Dauer eines Taktfrequenzwechsels:  Cannot determine or is not supported.
  Hardwarebegrenzungen: 1.40 GHz - 2.10 GHz
  available frequency steps:  2.10 GHz, 1.70 GHz, 1.40 GHz
  verfügbare cpufreq-Regler: conservative ondemand userspace powersave performance schedutil
  momentane Richtlinie: Frequenz sollte innerhalb 1.40 GHz und 2.10 GHz.
                    sein. Der Regler "schedutil" kann frei entscheiden,
                    welche Geschwindigkeit er in diesem Bereich verwendet.
  current CPU frequency: 2.10 GHz (asserted by call to hardware)
  boost state support:
    Unterstützt: ja
    Aktiv: ja
    Boost-Zustände: 0
    Gesamtzustände: 3
    Pstate-P0:  2100MHz
    Pstate-P1:  1700MHz
    Pstate-P2:  1400MHz

sudo turbostat:

turbostat version 2024.04.08 - Len Brown <lenb@kernel.org>
Kernel command line: initrd=\94ff977ffb314bb397fddfc664261237\6.9.7-arch1-1\initrd amd_pstate=passive amd_pstate.shared_mem=1 nvme_load=YES nowatchdog rw rd.luks.uuid=ce2b3cf4-64eb-49ce-9909-b11233bddf68 root=/dev/mapper/luks-ce2b3cf4-64eb-49ce-9909-b11233bddf68 systemd.machine_id=94ff977ffb314bb397fddfc664261237
CPUID(0): AuthenticAMD 0x10 CPUID levels
CPUID(1): family:model:stepping 0x17:60:1 (23:96:1) microcode 0x0
CPUID(0x80000000): max_extended_levels: 0x80000020
CPUID(1): SSE3 MONITOR - - - TSC MSR - HT -
CPUID(6): APERF, No-TURBO, No-DTS, No-PTM, No-HWP, No-HWPnotify, No-HWPwindow, No-HWPepp, No-HWPpkg, No-EPB
CPUID(7): No-SGX No-Hybrid
cpu0: cpufreq driver: acpi-cpufreq
cpu0: cpufreq governor: schedutil
cpufreq boost: 1
/dev/cpu_dma_latency: 2000000000 usec (default)
current_driver: acpi_idle
current_governor: menu
current_governor_ro: menu
cpu0: POLL: CPUIDLE CORE POLL IDLE
cpu0: C1: ACPI FFH MWAIT 0x0
cpu0: C2: ACPI IOPORT 0x414
cpu0: C3: ACPI IOPORT 0x415
RAPL: 234 sec. Joule Counter Range, at 280 Watts
cpu0: MSR_RAPL_PWR_UNIT: 0x000a1003 (0.125000 Watts, 0.000015 Joules, 0.000977 sec.)

turbostat: get_rapl_counters: failed to read perf_data (8 1): Success

is there any option CPPC in your UEFI motherboard ?

Okay i got mine working again. I had forgotten i had reinstalled a while back and this is one thing i forgot to set up. I installed cpupower and added amd_pstate=passive to the grub command line and then updated grub with the update grub command and rebooted.

[ricklinux@rick-ms7c37 ~]$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver
amd-pstate

I am not sure if @Wendigo is using grub or systemd-boot? Then it would be slightly different procedure.

In UEFI there is an option called “cpu power management”. By default it was on. I tried both. It makes no difference. lscpu | grep cppc shows the same output.

yes, i’m using systemd-boot. it is the default for endeavourOs, isn’t it? Maybe i give GRUB i try then. Are you using dracut or mkinitcpio?

I’m using dracut because that is the default now on EOS. If you are using systemd-boot did you add amd_pstate=passive to the kernel command line in /etc/kernel/cmdline? Then you have to reinstall kernels with sudo reinstall-kernels Then reboot and see if the command shows amd-pstate

Edit:

https://discovery.endeavouros.com/installation/systemd-boot/2022/12/

it seems, that lenovo had not enabled that feature thinkpads of that generation, yet:
https://forums.lenovo.com/t5/Other-Linux-Discussions/amd-pstate-driver-support-for-AMD-laptops/m-p/5135917

try forcing it:

create /etc/modules-load.d/amd-pstate.conf

# Load amd pstate at boot
amd_pstate

save file and regenerate initramfs images.
sudo reinstall-kernels
(systemd-boot)
sudo dracut-rebuild
(Grub)

Does not work. I tried blacklisting acpi_cpufreq as well. But no Luck. :slightly_frowning_face:

I could never get it working on my 4700U either. It does work on my 3800X desktop. It also works on my Thinkbook Ryzen 5 5500U. You need to have cpupower installed and then add the kernel parameter and regenerate initramsfs images depending on whether you have grub or systemd-boot.

i tried everything by now. it’s simply not working. and according to several threads in lenovo forums, it seems, that it is not enabled for several models and i don’t believe that will change in the future, considering how old those are today. :face_with_diagonal_mouth:

i guess, i have to stay with acpi-cpufreq.