I tried it on desktop Ubuntu 22.04.3, 23.10, regular and lowlatency versions. I have to increase the minimum frequency of a core, which runs an image capture process requiring high CPU clock. Here is an example:
paul@box4x4:~$ sudo cpupower -c 5 frequency-set -d 3000MHz
Setting cpu: 5
which sets the minimum frequency for core #5, but the actual frequency doesn't change:
paul@box4x4:~/profiler$ cpupower -c 5 frequency-info
analyzing CPU 5:
driver: amd-pstate-epp
CPUs which run at the same hardware frequency: 5
CPUs which need to have their frequency coordinated by software: 5
maximum transition latency: Cannot determine or is not supported.
hardware limits: 400 MHz - 5.58 GHz
available cpufreq governors: performance powersave
current policy: frequency should be within 3.00 GHz and 5.58 GHz.
The governor "performance" 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
and stays and glacial 400MHz. Am I doing it wrong? Is there another, hopefully not too cumbersome, way and tool to accomplish it?
One red flag with I see here is a bogus maximum frequency of 5.58GHz. It is not possible. 4.9GHz is the maximum turbo frequency for AMD Ryzen 5 7640U CPU I'm using.
I did a sanity test on Intel N100 PC and it seems to work there:
paul@cube:~$ sudo cpupower -c 3 frequency-info
analyzing CPU 3:
driver: intel_pstate
CPUs which run at the same hardware frequency: 3
CPUs which need to have their frequency coordinated by software: 3
maximum transition latency: Cannot determine or is not supported.
hardware limits: 700 MHz - 3.40 GHz
available cpufreq governors: performance powersave
current policy: frequency should be within 3.40 GHz and 3.40 GHz.
The governor "performance" may decide which speed to use
within this range.
current CPU frequency: Unable to call hardware
current CPU frequency: 3.30 GHz (asserted by call to kernel)
boost state support:
Supported: yes
Active: yes
Core #3 frequency reaches requested 3.4GHz, but sometimes reading lower when monitored with watch grep \"cpu MHz\" /proc/cpuinfo. Still, vastly better than the results on AMD CPU.
/sys/devices/system/cpu/cpu*/cpufreq. Set both max and min if you want it constant. If the governor is schedutil, set it to something else first. – Daniel T Jan 29 '24 at 09:43scaling-governor,scaling_max_freqandscaling_min_freqfiles have values corresponding tocpupower-frequency-infooutput. – Paul Jurczak Jan 29 '24 at 09:49energy_performance_preference? – Daniel T Jan 29 '24 at 10:18sudodoesn't changeUnable to call hardware. Setting all cores together doesn't change the behavior.energy_performance_preferenceis set toperformance. Reading on the subject, I think that OS is not allowed to control these parameters. I don't see a BIOS setting to change it, though. – Paul Jurczak Jan 29 '24 at 10:27amd_pstate=disablein the/etc/default/grubcommand line,upgrade-gruband reboot? This should turn "driver: amd-pstate-epp" into "driver: acpi-cpufreq". Then retry everything you and I thought of. – Daniel T Jan 29 '24 at 10:40driver: amd-pstate-epp– Paul Jurczak Jan 29 '24 at 19:44amd_pstate=disableat the end of the file. When added toGRUB_CMDLINE_LINUX_DEFAULTit works as intended. BTW,update-grubis what I needed. – Paul Jurczak Jan 30 '24 at 03:37echo | sudo teeand wrongly assumed people would understand it based on context – Daniel T Jan 30 '24 at 04:37