You are not logged in.
Pages: 1
For a while now (maybe since a couple of kernel upgrades, but I'm not sure), cpupower no longer loads for me. Until now I was using it with amd-pstate and everything worked fine. Do you have an idea of the problem or how I could investigate to find out the cause?
In the terminal I have:
systemctl start cpupower.service
Job for cpupower.service failed because the control process exited with error code.
See "systemctl status cpupower.service" and "journalctl -xeu cpupower.service" for details.
Running journalctl:
LC_ALL=C journalctl -xeu cpupower.service
--
-- A start job for unit cpupower.service has begun execution.
--
-- The job identifier is 1095.
Jul 18 10:01:23 arch-paz systemd[1]: cpupower.service: Main process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- An ExecStart= process belonging to unit cpupower.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
Jul 18 10:01:23 arch-paz systemd[1]: cpupower.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- The unit cpupower.service has entered the 'failed' state with result 'exit-code'.
Jul 18 10:01:23 arch-paz systemd[1]: Failed to start Apply cpupower configuration.
-- Subject: A start job for unit cpupower.service has failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- A start job for unit cpupower.service has finished with a failure.
--
-- The job identifier is 1095 and the job result is failed.
The complete journalctl -b:
Last edited by apaz (2022-08-14 07:59:33)
Offline
See "systemctl status cpupower.service" and "journalctl -xeu cpupower.service" for details.
"journalctl -u" tends to be useless "journalctl -e" is like top posting and "journalctl -x" is outright spam
Offline
Sorry:
# systemctl status cpupower.service
× cpupower.service - Apply cpupower configuration
Loaded: loaded (/usr/lib/systemd/system/cpupower.service; enabled; preset: disabled)
Active: failed (Result: exit-code) since Tue 2022-07-19 18:55:01 CEST; 49s ago
Process: 566 ExecStart=/usr/lib/systemd/scripts/cpupower (code=exited, status=1/FAILURE)
Main PID: 566 (code=exited, status=1/FAILURE)
CPU: 3ms
lug 19 18:55:01 arch-paz systemd[1]: Starting Apply cpupower configuration...
lug 19 18:55:01 arch-paz systemd[1]: cpupower.service: Main process exited, code=exited, status=1/FAILURE
lug 19 18:55:01 arch-paz systemd[1]: cpupower.service: Failed with result 'exit-code'.
lug 19 18:55:01 arch-paz systemd[1]: Failed to start Apply cpupower configuration.
Offline
Great, the script fails w/o any indication on what it does …
sudo /bin/bash -x /usr/lib/systemd/scripts/cpupower
Offline
The only suspect sentence is:
Loaded: loaded (/usr/lib/systemd/system/cpupower.service; enabled; preset: disabled)
What does "preset: disabled" mean? I edited the /etc/default/cpupower to put frequency limits, but it always worked until 2-3 weeks ago.
sudo /bin/bash -x /usr/lib/systemd/scripts/cpupower
[sudo] password di paz:
+ declare -i fail=0
+ params=()
+ declare -a params
+ params+=(${governor:+-g $governor})
+ params+=(${min_freq:+-d $min_freq})
+ params+=(${max_freq:+-u $max_freq})
+ params+=(${freq:+-f $freq})
+ (( 0 > 0 ))
+ params=()
+ declare -a params
+ params+=(${mc_scheduler:+-m $mc_scheduler})
+ params+=(${smp_scheduler:+-s $smp_scheduler})
+ params+=(${perf_bias:+-b $perf_bias})
+ (( 0 > 0 ))
+ exit 0
Offline
That it's not enabled by default and you you have to "systemctl enable" it, irrelevant.
The script relies on /etc/default/cpupower to do anything at all
sudo bash -x < <(cat /etc/default/cpupower /usr/lib/systemd/scripts/cpupower
Offline
Here the achieved result:
$ sudo bash -x < <(cat /etc/default/cpupower /usr/lib/systemd/scripts/cpupower)
+ governor=schedutil
+ min_freq=550MHz
+ max_freq=4.426GHz
+ declare -i fail=0
+ params=()
+ declare -a params
+ params+=(${governor:+-g $governor})
+ params+=(${min_freq:+-d $min_freq})
+ params+=(${max_freq:+-u $max_freq})
+ params+=(${freq:+-f $freq})
+ (( 6 > 0 ))
+ cpupower frequency-set -g schedutil -d 550MHz -u 4.426GHz
+ fail=1
+ params=()
+ declare -a params
+ params+=(${mc_scheduler:+-m $mc_scheduler})
+ params+=(${smp_scheduler:+-s $smp_scheduler})
+ params+=(${perf_bias:+-b $perf_bias})
+ (( 0 > 0 ))
+ exit 1
Still cpupower.service is not working. I tried disabling amd-pstate and then reverting back to the default acpi-cpufreq and now cpupower works without any problems.
I found this bug:
bugzilla.kernel.org/
and a fix:
Fix
There seems to be a fix and we have to wait for it to be put upstream. When it is done I will report if it works for me and put a "solved".
Note:
I did not understand whether my Ryzen 3700X (zen2) supports cppc, but until now amd-pstate worked with amd_pstate.shared_mem=1, which is the alternative to cppc.
zgrep CPPC /proc/config.gz
CONFIG_ACPI_CPPC_LIB=y
but:
lscpu | grep "cppc"
gives no results. And:
$ cat /sys/devices/system/cpu/cpuX/acpi_cppc/
cat: /sys/devices/system/cpu/cpuX/acpi_cppc/: No such file or directory
Offline
After upgrading to kernel 5.19, amd-pstate is back to working smoothly.
Offline
Pages: 1