5

lscpu shows a minimum CPU speed of 1600MHz, rather than 400MHz as the actual minimum. This is absolutely killing my battery life (I get about 2-3 hours rather than the 8-10 I get under Windows on the same hardware) and causing the fan to run constantly.

How do I change the minimum CPU scaling speed?

This is on 18.04 x86_64 - Specific hardware is a HP Envy x360 13" Ryzen 7

affected_cpus                  0
bios_limit                     2200000
cpb                            0
cpuinfo_cur_freq               1600000
cpuinfo_max_freq               2200000
cpuinfo_min_freq               1600000
cpuinfo_transition_latency     0
freqdomain_cpus                0 1
related_cpus                   0
scaling_available_frequencies  2200000 1700000 1600000
scaling_available_governors    conservative ondemand userspace powersave perform                    ance schedutil
scaling_cur_freq               1439222
scaling_driver                 acpi-cpufreq
scaling_governor               powersave
scaling_max_freq               2200000
scaling_min_freq               1600000
scaling_setspeed               <unsupported>
stats

Edit: This appears to be a broad failure to handle frequency scaling. The frequency isn't increasing under load either. The frequency seems to randomly shift around irrespective of the system load.

PhonicUK
  • 141
  • Can you update your question with the output from these two commands: CPU0_DIR=/sys/devices/system/cpu/cpu0/cpufreq to set variable. Then use: paste <(ls $CPU0_DIR) <(cat $CPU0_DIR/*) | column -s $'\t' -t. Now copy and paste the output into your question. Thanks. – WinEunuuchs2Unix Sep 02 '18 at 18:40
  • @WinEunuuchs2Unix done - as an aside I have observed the CPU frequency occasionally dropping to sub-1ghz speeds but it doesn't seem to particularly correlate with system load, it happens randomly and for short periods of time. – PhonicUK Sep 03 '18 at 19:48
  • Has there been any progress on the problem? – WinEunuuchs2Unix Oct 21 '18 at 16:03
  • Doesn't look like it, the issue hasn't changed after the latest BIOS and various package updates that have occurred since. – PhonicUK Oct 23 '18 at 16:54
  • You can try the following echo 400000 | sudo tee > /sys/devices/system/cpu/cpu*/cpufreq/scaling_min_freq but I'm not sure if it will override the governor. – WinEunuuchs2Unix Oct 23 '18 at 23:17
  • Some new developments: https://askubuntu.com/questions/1057710/change-min-and-max-cpu-frequency/1057727#1057727 and https://askubuntu.com/questions/1141157/cpu-governor-changes-automatically-to-performance-under-load – WinEunuuchs2Unix May 15 '19 at 02:48

1 Answers1

2

Update: Try linux-cpupower

I found this Q&A that may be of help: Is it possible to set a constant lowest CPU frequency under the modern PSTATE driver?

Summary of the answer:

sudo apt-get install linux-cpupower

Then:

sudo cpupower frequency-set -g powersave
sudo cpupower frequency-set -d 400MHz
sudo cpupower frequency-set -u 3100MHz

As mentioned elsewhere I don't have an AMD processor and cannot test this for you...


I've been thinking of purchasing a Ryzen based system based upon leading-edge developments but I am still Intel platform based.

cpufrequtils comes up often on this site and it is designed for your AMD platform. From this Debian Article (Debian is the father of Ubuntu) install the AMD CPU utilities using:

sudo apt install cpufrequtils

Pay close attention to removing or overriding other governor utilities such as laptop-mode-tools.

If you have any questions post a comment below and I'll try my best to assist with my limited knowledge of AMD platform.

Additionally, here is a detailed report from another user in Ask Ubuntu: CPU frequency scaling stuck 2.80 Ghz and it's not going down