Score:1

cpufreq: cpu frequency going down to minimum just when I need extra power

in flag

I've spent almost 3 days around this problem, to no avail.

I felt the laptop was running slow on certain tasks, slower than usual so I downloaded cpufreq extension to try and monitor and maybe directly control the CPU running frequency and power consumption.

The problem is that I always see the CPU frequency drop to a minimal value (either 800MHz or 400MHz) on all 8 cores for no apparent reason. this seems to happen just when I need extra power- running code projects locally, opening several browser tabs etc.

I'm using cpufreq gnome shell extension to try and manually control the values, but this does not seem to help. no matter the changes, before and after reboots, the problem seems to appear out of nowhere, and disappear as well.


Things I've tried after researching online, but didn't help:

  • By default the intel_pstate driver was used, but I disabled it (by editing /etc/default/grub), and now using acpi driver
  • tried using CPU Power Manager gnome shell extension as well to control the power/speed programmatically
  • in cpufreq extension, I've tried every min-max frequency combination I can think of, as well as switch between governor programs, and enable/disable frequency boost
  • I tried settings the max frequency directly for ALL 8 cores, and disable ppc like this:

-- echo 1 | sudo dd of=/sys/module/processor/parameters/ignore_ppc

-- echo 2900000 | sudo dd of=/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq


Any ideas going forward? I really dont know what to do. this prevents me from working, as most code-developing tasks I do require some horsepower. even scrolling a text editor up and down becomes a pain on 400MHz, while several other things are running in the background.

Here's a random screenshot from cpufreq with some more technical details: cpufreq and system details

Here is the relevant BIOS settings: BIOS power mgmt settings

user10489 avatar
in flag
In addition to the cpu power governor, check for thermal throttling and power throttling, especially if you have cpu power saving disabled and are seeing performance dips immediately after a heavy load runs for a bit.
Doug Smythies avatar
gn flag
Your TDP is only 15 watts. Your CPU is throttling down, and your screenshot even says as much. To get the most out of your computer, you will have to do a bunch of tests to determine if you can safely turn up TDP somewhat, or if it is already temperature limited as @user10489 mentioned. Suggest you use turbostat (linux-tools-common) to monitor stuff and to go back to the intel_pstate CPU frequency scaling driver. You can use passive and disable HWP if you want.
Maoration avatar
in flag
Thank you both, but I dont think I'm sure what I can check/change next. I uploaded another screenshot, of the BIOS settings for power mgmt. any suggestions on how to edit these? any other benchmarks or info I can provide?
Maoration avatar
in flag
I also reverted everything I already did, installed cpupower and try to manually set min/max freq using (cpupower frequency-set). things are better- but still the problem exists..
user10489 avatar
in flag
As to what else you can do-- turn up fan speed? Clean the fans? Stop blocking the fan outlets by using it on the bed? :) Buy hardware with better TDP / airflow...
Score:0
bv flag

You can set the CPU to maximum speed using this bash script:

Make a file called cpumaxspeed.sh and enter in this code:

#!/bin/bash
#Getting and setting variables

echo Getting info....

CPUMIN=$(cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq)
CPUMAX=$(cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq)
CPUMAXGHZ=$(echo "scale=1; $CPUMAX / 1000000" | bc)
CPUMINGHZ=$(echo "scale=1; $CPUMIN / 1000000" | bc)

#Display min and max CPU frequency in MHz
echo CPU min frequency: $CPUMIN" MHz" / $CPUMINGHZ" GHz"
echo CPU max frequency: $CPUMAX" MHz" / $CPUMAXGHZ" GHz"

#Setting CPU governor
echo Setting governor to performance
sudo cpufreq-set -r -g performance
echo Set governor to performance

#Setting to max frequency
echo Setting CPU frequency to be $CPUMAX" MHz" / $CPUMAXGHZ" GHz"
sudo cpufreq-set -r -f $CPUMAXGHZ"GHz"
echo Set CPU frequency to $CPUMAXGHZ"GHz"

done

Execute it with this command:

sudo sh cpumaxspeed.sh
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.