動かざることバグの如し

近づきたいよ 君の理想に

UbuntuでCPUのパワーを抑えて節電対策

環境

インストール

apt install cpufrequtils

確認

cpufreq-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: intel_pstate
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 0.97 ms.
  hardware limits: 1.60 GHz - 3.40 GHz
  available cpufreq governors: performance, powersave
  current policy: frequency should be within 1.60 GHz and 3.40 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency is 2.55 GHz (asserted by call to hardware).

(↑がCPUの数だけ表示される)

ズラズラ表示されるが、主に抑えるポイントは以下

  • 最小周波数は1.60 GHz
  • 最大周波数は3.40 GHz
  • 現在のガバナーはpowersave
  • 利用可能なガバナーはperformance, powersave

シンプルに表示したければ以下

cpufreq-info -p
  1600000 3400000 powersave

ガバナーを設定

cpufreq-set -g powersave