10

I've just installed Ubuntu 13.04 on my MacBook Air, after toying around for awhile the machine felt really slow, so I checked out the CPU frequency. cpufreq-info, it reports 800MHz on all 4 cores (which is the lowest setting). The governor is set to ondemand. Now when I put some load on the system (running a small script that hashes stuff four times) the machine grinds to a hold, but cpufreq-info is still reporting 800MHz. I can manually set the frequency to 2GHz, which solves the performance problem, but will cost me my battery.

This is the output of cpufreq-info:

cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to [email protected], please.
analyzing CPU 0:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 0 1 2 3
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 10.0 us.
  hardware limits: 800 MHz - 2.00 GHz
  available frequency steps: 2.00 GHz, 2.00 GHz, 1.90 GHz, 1.80 GHz, 1.70 GHz, 1.60 GHz, 1.50 GHz, 1.40 GHz, 1.30 GHz, 1.20 GHz, 1.10 GHz, 1000 MHz, 900 MHz, 800 MHz
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance
  current policy: frequency should be within 800 MHz and 2.00 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 800 MHz (asserted by call to hardware).
  cpufreq stats: 2.00 GHz:5,75%, 2.00 GHz:0,47%, 1.90 GHz:0,00%, 1.80 GHz:0,01%, 1.70 GHz:0,01%, 1.60 GHz:0,01%, 1.50 GHz:0,01%, 1.40 GHz:0,01%, 1.30 GHz:0,01%, 1.20 GHz:0,02%, 1.10 GHz:0,01%, 1000 MHz:0,02%, 900 MHz:0,02%, 800 MHz:93,67%  (1388)
analyzing CPU 1:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 0 1 2 3
  CPUs which need to have their frequency coordinated by software: 1
  maximum transition latency: 10.0 us.
  hardware limits: 800 MHz - 2.00 GHz
  available frequency steps: 2.00 GHz, 2.00 GHz, 1.90 GHz, 1.80 GHz, 1.70 GHz, 1.60 GHz, 1.50 GHz, 1.40 GHz, 1.30 GHz, 1.20 GHz, 1.10 GHz, 1000 MHz, 900 MHz, 800 MHz
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance
  current policy: frequency should be within 800 MHz and 2.00 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 800 MHz (asserted by call to hardware).
  cpufreq stats: 2.00 GHz:3,17%, 2.00 GHz:0,01%, 1.90 GHz:0,01%, 1.80 GHz:0,00%, 1.70 GHz:0,00%, 1.60 GHz:0,01%, 1.50 GHz:0,01%, 1.40 GHz:0,01%, 1.30 GHz:0,01%, 1.20 GHz:0,01%, 1.10 GHz:0,01%, 1000 MHz:0,02%, 900 MHz:0,02%, 800 MHz:96,71%  (1433)
analyzing CPU 2:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 0 1 2 3
  CPUs which need to have their frequency coordinated by software: 2
  maximum transition latency: 10.0 us.
  hardware limits: 800 MHz - 2.00 GHz
  available frequency steps: 2.00 GHz, 2.00 GHz, 1.90 GHz, 1.80 GHz, 1.70 GHz, 1.60 GHz, 1.50 GHz, 1.40 GHz, 1.30 GHz, 1.20 GHz, 1.10 GHz, 1000 MHz, 900 MHz, 800 MHz
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance
  current policy: frequency should be within 800 MHz and 2.00 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 800 MHz (asserted by call to hardware).
  cpufreq stats: 2.00 GHz:2,69%, 2.00 GHz:0,00%, 1.90 GHz:0,01%, 1.80 GHz:0,01%, 1.70 GHz:0,01%, 1.60 GHz:0,02%, 1.50 GHz:0,01%, 1.40 GHz:0,01%, 1.30 GHz:0,02%, 1.20 GHz:0,02%, 1.10 GHz:0,01%, 1000 MHz:0,02%, 900 MHz:0,02%, 800 MHz:97,16%  (1194)
analyzing CPU 3:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 0 1 2 3
  CPUs which need to have their frequency coordinated by software: 3
  maximum transition latency: 10.0 us.
  hardware limits: 800 MHz - 2.00 GHz
  available frequency steps: 2.00 GHz, 2.00 GHz, 1.90 GHz, 1.80 GHz, 1.70 GHz, 1.60 GHz, 1.50 GHz, 1.40 GHz, 1.30 GHz, 1.20 GHz, 1.10 GHz, 1000 MHz, 900 MHz, 800 MHz
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance
  current policy: frequency should be within 800 MHz and 2.00 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 800 MHz (asserted by call to hardware).
  cpufreq stats: 2.00 GHz:3,07%, 2.00 GHz:0,02%, 1.90 GHz:0,01%, 1.80 GHz:0,00%, 1.70 GHz:0,01%, 1.60 GHz:0,01%, 1.50 GHz:0,01%, 1.40 GHz:0,01%, 1.30 GHz:0,01%, 1.20 GHz:0,01%, 1.10 GHz:0,03%, 1000 MHz:0,03%, 900 MHz:0,01%, 800 MHz:96,77%  (1004)
0

3 Answers 3

4

I had the same issue on latest version of Mint, setting the scaling to conservative seemed to be the closest to how ondemand used to work.

Then I found out what the problem was, the up_threshold was way too high, it was set to 95% load, now this is fine for continued loads, but in most cases there is a small burst of CPU activity, and you want the CPU to scale to 100% speed much faster. I resolved this by setting th up_threshold lower (75 seems to do OK in my case). You change it by echo'ing the desired value to /sys/devices/system/cpu/cpufreq/ondemand/up_threshold.

0
2

I would suggest that you should use Is there a power saving application similar to Jupiter?

And use indicator-cpufreq, so that you should know what freq you are at. check the link i have pasted how to install/configure indicator-cpufreq

Is there a power saving application similar to Jupiter? Section 3.) Processor and Frequency Scaling

ondemand        Dynamically switch between CPU(s) available if at 95% cpu load

Keep Cpu at low, only exceed if at 95% cpu load

performance     Run the cpu at max frequency

conservative    Dynamically switch between CPU(s) available if at 75% load

Keep Cpu at low, only exceed if at 75% cpu load

powersave       Run the cpu at the minimum frequency
0
0

I've had this problem on 14.04 - 16.04 (as of today). To solve it I had to force Ubuntu to ignore the bios limiting. The following worked for me:

Open grub:

sudo vim /etc/default/grub

Replace GRUB_CMDLINE_LINUX_DEFAULT line:

- GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
+ GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_pstate=disable processor.ignore_ppc=1"

Update grub:

sudo update-grub

Reboot then:

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 
echo 2900000 | sudo dd of=/sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq 
echo 2900000 | sudo dd of=/sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq 
echo 2900000 | sudo dd of=/sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq 

Worked for me. Check number of cpu cores and update all accordingly. You may want to put those extra lines in /etc/rc.local so they execute on every boot.

Ninja edit: Replace 2900000 above with the value in:

cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq
1
  • Was the frequency scaling working ok after this, temps & performance all the same or better? And you read /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq then write the same value back to it? Why? Does writing 1 to ignore_ppc change the values? (PS could use tee or just > instead of dd)
    – Xen2050
    Dec 22, 2018 at 20:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .