Monday, August 21, 2017

Debian Jessie: CPU frequency scaling to prevent over heat on laptop's cpu

To prevent over heat on laptop's CPU when used, we need to limit its frequency below maximum. We need cpufrequtils to do that.
To install CPU frequency scaling tools:
# apt-get install cpufrequtils
Show CPU info
# cpufreq-info
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 10.0 us.
  hardware limits: 1000 MHz - 1.67 GHz
  available frequency steps: 1.67 GHz, 1.33 GHz, 1000 MHz
  available cpufreq governors: powersave, userspace, conservative, ondemand, performance
  current policy: frequency should be within 1000 MHz and 1.67 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 1.67 GHz (asserted by call to hardware).
  cpufreq stats: 1.67 GHz:30.20%, 1.33 GHz:3.69%, 1000 MHz:66.10%  (10888)
analyzing CPU 1:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 1
  CPUs which need to have their frequency coordinated by software: 1
  maximum transition latency: 10.0 us.
  hardware limits: 1000 MHz - 1.67 GHz
  available frequency steps: 1.67 GHz, 1.33 GHz, 1000 MHz
  available cpufreq governors: powersave, userspace, conservative, ondemand, performance
  current policy: frequency should be within 1000 MHz and 1.67 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 1.67 GHz (asserted by call to hardware).
  cpufreq stats: 1.67 GHz:28.63%, 1.33 GHz:3.90%, 1000 MHz:67.47%  (10888)
To show available frequency
# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
1667000 1333000 1000000
For kernel 3.16, edit file /etc/init.d/cpufrequtils, change MIN_SPEED to 1000000 and MAX_SPEED to 1333000. For example:
...
MAX_SPEED="1333000"
MIN_SPEED="1000000"
...
NOTE: Frequency must in range in # cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
Reload system daemon
# systemctl daemon-reload
References:

No comments:

Post a Comment