[Testing Update] 2022-06-03 - Linux 5.18, Systemd 251, GNOME 42.2, NVIDIA, Mesa, Pulseaudio, Perl

was that not integrated somehow to 5.17 kernel? amd-pstate I mean. how-to

My computer freeze during update (seems only a graphical driver issue).

I wait few minutes before hard shutdown then restart.

Everything was fine and no more updates.

Install 5.18 kernel → OK

I enabled amd_pstate.shared_mem=1 in grub config.

Linux Kernel 5.18:

❯ cat  /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver
acpi-cpufreq
❯ sudo cpupower frequency-info     
analyzing CPU 0:
  driver: acpi-cpufreq

Switch back to Linux Kernel 5.17:

❯ cat  /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver
amd-pstate
❯ sudo cpupower frequency-info     
analyzing CPU 0:
  driver: amd-pstate

It looks like it is not integrated to 5.18.


Edit://
Solution:

i have theses options on boot kernels for AMD zen2+ and more , and CPPC AUTO on UEFI motherboard
amd_pstate.enable=1 amd_pstate.shared_mem=1

with version 5.17.12

sudo cpupower frequency-info
analyse du CPU 0 :
  **driver: amd-pstate**
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 131 us
  limitation matérielle : 550 MHz - 4.65 GHz
  régulateurs disponibles : conservative ondemand userspace powersave performance schedutil
  tactique actuelle : la fréquence doit être comprise entre 550 MHz et 4.65 GHz.
                  Le régulateur "schedutil" est libre de choisir la vitesse
                  dans cette plage de fréquences.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 2.87 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes
    Boost States: 0
    Total States: 3
    **Pstate-P0:**  3700MHz ( should be AMD-Pstate here )
    **Pstate-P1**:  2800MHz ( should be AMD-Pstate here )
    **Pstate-P2**:  2200MHz ( should be AMD-Pstate here )

sudo turbostat
turbostat version 21.05.04 - Len Brown <lenb@kernel.org>
CPUID(0): AuthenticAMD 0x10 CPUID levels
CPUID(1): family:model:stepping 0x19:21:0 (25:33:0) microcode 0x0
CPUID(0x80000000): max_extended_levels: 0x80000023
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
RAPL: 234 sec. Joule Counter Range, at 280 Watts
/dev/cpu_dma_latency: 2000000000 usec (default)
**current_driver: acpi_idle**
current_governor: menu
current_governor_ro: menu
cpu9: POLL: CPUIDLE CORE POLL IDLE
cpu9: C1: ACPI FFH MWAIT 0x0
cpu9: C2: ACPI IOPORT 0x414
**cpu9: cpufreq driver: amd-pstate**
cpu9: cpufreq governor: schedutil
cpufreq boost: 1
cpu0: MSR_RAPL_PWR_UNIT: 0x000a1003 (0.125000 Watts, 0.000015 Joules, 0.000977 sec.)

cat  /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver
amd-pstate

With 5.18.1

sudo cpupower frequency-info

analyse du 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.
  limitation matérielle : 2.20 GHz - 4.65 GHz
  available frequency steps:  3.70 GHz, 2.80 GHz, 2.20 GHz
  régulateurs disponibles : conservative ondemand userspace powersave performance schedutil
  tactique actuelle : la fréquence doit être comprise entre 2.20 GHz et 3.70 GHz.
                  Le régulateur "schedutil" est libre de choisir la vitesse
                  dans cette plage de fréquences.
  current CPU frequency: 2.20 GHz (asserted by call to hardware)
  boost state support:
    Supported: yes
    Active: yes
    Boost States: 0
    Total States: 3
    **Pstate-P0:**  3700MHz 
    **Pstate-P1:**  2800MHz 
    **Pstate-P2:**  2200MHz 

sudo turbostat
turbostat version 21.05.04 - Len Brown <lenb@kernel.org>
CPUID(0): AuthenticAMD 0x10 CPUID levels
CPUID(1): family:model:stepping 0x19:21:0 (25:33:0) microcode 0x0
CPUID(0x80000000): max_extended_levels: 0x80000023
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
RAPL: 234 sec. Joule Counter Range, at 280 Watts
/dev/cpu_dma_latency: 2000000000 usec (default)
**current_driver: acpi_idle**
current_governor: menu
current_governor_ro: menu
cpu11: POLL: CPUIDLE CORE POLL IDLE
cpu11: C1: ACPI FFH MWAIT 0x0
cpu11: C2: ACPI IOPORT 0x414
**cpu11: cpufreq driver: acpi-cpufreq**
cpu11: cpufreq governor: schedutil
cpufreq boost: 1
cpu0: MSR_RAPL_PWR_UNIT: 0x000a1003 (0.125000 Watts, 0.000015 Joules, 0.000977 sec.)

cat  /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver
acpi-cpufreq

I have some issues with kernel 5.18.1, I’m using manjaro as a host for qemu vms and I’m noticing stuttering inside them, it seems due to high cpu usage.
This doesn’t happen with 5.15 or 5.17.
Running 2x old sandy bridge e5-2687w

Same issue for me too. But there is the bug/error in the log when using amd-pstate for Linux Kernel 5.17:

That is why I disabled amd-pstate.

I do not notice what is difference between amd_pstate and acpi-cpufreq.

about this point , UEFI motherboard has both options for CPU ZEN2+
for acpi-cpufreq you cant go under 2200mhz , it mean even in idle , so not good for any laptop
for amd-pstate , cppc will use sequence order cpu to use the number core with lower temp and can go to lower frequency 550Mhz , better for any laptop

1 Like

Maybe you forgot to add initcall_blacklist=acpi_cpufreq_init to grub.

I do not have to set this variable to get evolution to adhere to my chosen dark theme. I’m not sure why.

In tweaks I have set the shell and legacy applications to use adwaita-maia-compact-dark theme.

adwaita-maia-compact-dark theme works, but other default dark themes e.g. Matcha-dark-aliz do not work with it.
But the old version of evolution 3.44.1-1 works fine with these different themes.

1 Like

It does not work.

❯ sudo cpupower frequency-info    
analyzing CPU 0:
  no or unknown cpufreq driver is active on this CPU

Does it work for you?

same result on 5.18.1 , lost acpi-cpufreq with this blacklist option

How to enable amd_pstate for AMD Zen 2+ and Linux Kernel 5.17 or 5.18 only

  1. Edit /etc/mkinitcpio.conf to add
MODULES=(amd_pstate)
  1. sudo mkinitcpio -P linux

  2. Edit /etc/default/grub to add it in GRUB_CMDLINE_LINUX_DEFAULT:

amd_pstate.shared_mem=1
  1. sudo update-grub

  2. reboot.

  3. Enable CPPC in BIOS setting.

It works for me in Linux Kernel 5.18:

❯ sudo cpupower frequency-info                                                                                                                                                                                            
analyzing CPU 0:
  driver: amd-pstate

❯ modinfo amd_pstate
filename:       /lib/modules/5.18.1-1-MANJARO/kernel/drivers/cpufreq/amd_pstate.ko.xz
license:        GPL
description:    AMD Processor P-state Frequency Driver
author:         Huang Rui <ray.huang@amd.com>
srcversion:     39739A8C79AAB14F2C15670
depends:        
retpoline:      Y
intree:         Y
name:           amd_pstate
vermagic:       5.18.1-1-MANJARO SMP preempt mod_unload 

5 Likes

it ok with kernel and added in module for mkinitcpio.conf for kernels 5.17 & 5.18 ,
amd_pstate is not in kernel 5.15 LTS and 5.10 LTS

And this doesn’t require editing your GRUB config file?

GRUB config file adds only amd_pstate.shared_mem=1 in GRUB_CMDLINE_LINUX_DEFAULT

You do not need to add amd_pstate.enable=1

Yup, my CPU needs the shared memory solution. Some of the newest Ryzen CPUs (mostly mobile) work with amd_pstate.enable=1.

1 Like

because amd_pstate was / is hyped.:
watch this Video on YT: René gave good informations about this new driver:

And as I understand it right its developed for notebooks (mobile) not desktop AMD CPUs.

My power states didn’t change, though hardware limits would now allow dropping clocks down to 550 MHz:

analyzing CPU 0:
  driver: amd-pstate
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 131 us
  hardware limits: 550 MHz - 4.65 GHz
  available cpufreq governors: conservative ondemand userspace powersave performance schedutil
  current policy: frequency should be within 550 MHz and 4.65 GHz.
                  The governor "schedutil" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 2.93 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes
    Boost States: 0
    Total States: 3
    Pstate-P0:  3700MHz
    Pstate-P1:  2800MHz
    Pstate-P2:  2200MHz

The three states are identical with what acpi-cpufreq provides.
My AGESA version is 1.2.0.7, so the motherboard is up-to-date. CPU is 5600X
Here’s one example of 5800X from the internet:

analyzing CPU 0:
  driver: amd-pstate
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 131 us
  hardware limits: 550 MHz - 4.93 GHz
  available cpufreq governors: conservative ondemand userspace powersave performance schedutil
  current policy: frequency should be within 550 MHz and 4.93 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 903 MHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes
    AMD PSTATE Highest Performance: 166. Maximum Frequency: 4.93 GHz.
    AMD PSTATE Nominal Performance: 128. Nominal Frequency: 3.80 GHz.
    AMD PSTATE Lowest Non-linear Performance: 59. Lowest Non-linear Frequency: 1.75 GHz.
    AMD PSTATE Lowest Performance: 19. Lowest Frequency: 550 MHz.

facing this as well I switch back to acpi-cpufreq