You are not logged in.
i would like to use schedutil cpu frequency governor for my computer
but cannot. there must be something i am missing, but i do not know
what.
computer has ryzen 5700g and the 6.5 kernel from daedalus-backports
so that amd-pstate-epp driver is being used.
checking the kernel config, i see SCHEDUTIL is built-in:
> grep CPU_FREQ /boot/config-$(uname -r)
...
CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=m
CONFIG_CPU_FREQ_GOV_USERSPACE=m
CONFIG_CPU_FREQ_GOV_ONDEMAND=m
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
list of loadable kernel modules checks out:
> ls -l /lib/modules/6.5.0-0.deb12.4-amd64/kernel/drivers/cpufreq
...
-rw-r--r-- 1 root root 22899 Nov 23 15:05 cpufreq_conservative.ko
-rw-r--r-- 1 root root 33531 Nov 23 15:05 cpufreq_ondemand.ko
-rw-r--r-- 1 root root 9539 Nov 23 15:05 cpufreq_powersave.ko
-rw-r--r-- 1 root root 18123 Nov 23 15:05 cpufreq_userspace.ko
list of available drivers is not what i expected:
> cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
performance powersave
cpupower also not what i expected:
> cpupower frequency-info
analyzing CPU 11:
driver: amd-pstate-epp
CPUs which run at the same hardware frequency: 11
CPUs which need to have their frequency coordinated by software: 11
maximum transition latency: Cannot determine or is not supported.
hardware limits: 400 MHz - 4.67 GHz
available cpufreq governors: performance powersave
current policy: frequency should be within 400 MHz and 4.67 GHz.
The governor "powersave" may decide which speed to use
within this range.
current CPU frequency: Unable to call hardware
current CPU frequency: 400 MHz (asserted by call to kernel)
boost state support:
Supported: yes
Active: no
what needs to be done to switch to schedutil ?
Offline
Hi,
Both 6.6.8 (from unstable) and 6.5.x (from backports) seem to prefer acpi-cpufreq on my 5900x:
root@calliope:~# 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: 2.20 GHz - 4.95 GHz
available frequency steps: 3.70 GHz, 2.80 GHz, 2.20 GHz
available cpufreq governors: performance schedutil
Do you enable the amd-pstate-epp driver anywhere, or is that used automagically?
Offline
Speaking of which, I wonder when auto-cpufreq will be in stable for debian/devuan.
auto-cpufreq is very efficient supposedly and yet, it doesn't appear to be in stable.
I checked further and it isn't even in debian period...
so weird.
Last edited by zapper (2024-01-10 20:22:35)
Freedom is never more than one generation away from extinction. Feelings are not facts
If you wish to be humbled, try to exalt yourself long term If you wish to be exalted, try to humble yourself long term
Favourite operating systems: Hyperbola Devuan OpenBSD
Peace Be With us All!
Offline
My processor frequency is controlled via acpi-cpufreq by the DE TDEPowersave applet.
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: 10.0 us
hardware limits: 1.20 GHz - 2.67 GHz
available frequency steps: 2.67 GHz, 2.67 GHz, 2.53 GHz, 2.40 GHz, 2.27 GHz, 2.13 GHz, 2.00 GHz, 1.87 GHz, 1.73 GHz, 1.60 GHz, 1.47 GHz, 1.33 GHz, 1.20 GHz
available cpufreq governors: ondemand performance schedutil
current policy: frequency should be within 1.20 GHz and 2.67 GHz.
The governor "ondemand" may decide which speed to use
within this range.
current CPU frequency: 2.13 GHz (asserted by call to hardware)
boost state support:
Supported: yes
Active: yes
2933 MHz max turbo 2 active cores
3200 MHz max turbo 1 active cores
root@AA:/#
Offline
well, after much reading and fumbling around, i now understand what is happening.
mostly, i mis-read the doc :-(
amd-pstate leverages the Linux kernel governors such as schedutil, ondemand, etc. to manage the performance hints which are provided by CPPC hardware functionality that internally follows the hardware specification (for details refer to AMD64 Architecture Programmer's Manual
it's all explained here: https://docs.kernel.org/admin-guide/pm/amd-pstate.html
i wanted to try out this new amd-pstate-epp driver to see what advantages it offers over the default
ACPI stuff. there are lots of tunables in the ACPI. there are no tunables in amd-pstate-epp - it is all
handled by the firmwware. so, in sum, you cannot change the cpufreq governors in amd-pstate-epp.
oops!
primarily, the amd-pstate-epp driver lets the cores idle at 400MHz rather than 2.2GHz in ACPI-mode.
this is desirable for always-on machines. you can provide a 'hint' to EPP if you want, but the choice is
either powersave or performance and, as i discovered, powersave does not really do much beyond
the 400MHz idle freq, so performance (the defaut) hint it is.
in order to 'activate' this driver you need to change the BIOS and enable 'ACPI CPPC'
on my MSI BIOS, i made two changes:
Overclocking -> AMD CBS -> Global C-state Control: Auto -> Enable
Overclocking -> AMD CBS -> CPPC CTRL: Auto -> Enable
Offline