2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Raspberry PiにOpenMediaVaultをインストールしたら、CPUの最大クロックが上がらない件

Last updated at Posted at 2022-02-23

新しめのRaspberry Pi4では、最大クロックが1.8GHzに上がっている

上記ページに書いてあるように、基板を見れば1.8GHz対応かどうかわかります。自分のも1.8GHz対応でしたが、実際には最大1.5GHzで動いてる状態でした。

/boot/config.txtで1.8GHzになるように設定します。

/boot/config.txt
arm_boost=1

しかし、この設定で1.8GHzになるはずが、依然として従来の1.5GHzのままなので原因を調査してみました。

cpufrequtilsをインストールする

CPU周波数関連の設定ツール、cpufrequtilsをインストールします

sudo apt-get install cpufrequtils

cpufreq-infoで現在の設定が参照できます。

pi@raspberrypi4:~ $ 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: cpufreq-dt
  CPUs which run at the same hardware frequency: 0 1 2 3
  CPUs which need to have their frequency coordinated by software: 0 1 2 3
  maximum transition latency: 0.97 ms.
  hardware limits: 600 MHz - 1.80 GHz
  available frequency steps: 600 MHz, 700 MHz, 800 MHz, 900 MHz, 1000 MHz, 1.10 GHz, 1.20 GHz, 1.30 GHz, 1.40 GHz, 1.50 GHz, 1.60 GHz, 1.70 GHz, 1.80 GHz
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance, schedutil
  current policy: frequency should be within 600 MHz and 1.50 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 700 MHz.
  cpufreq stats: 600 MHz:22.22%, 700 MHz:20.53%, 800 MHz:13.27%, 900 MHz:9.16%, 1000 MHz:3.40%, 1.10 GHz:0.99%, 1.20 GHz:0.23%, 1.30 GHz:0.00%, 1.40 GHz:0.00%, 1.50 GHz:30.20%, 1.60 GHz:0.00%, 1.70 GHz:0.00%, 1.80 GHz:0.00%  (193378)

hardware limitsの項目を見ればわかる通り1.8GHzが最大クロックなのですが、current policy: frequency should be within 600 MHz and 1.50 GHz.と、なぜか最大クロックが1.5GHzに抑えられています。

ためしに、cpufreq-set --max 1800000で最大周波数を1.8GHzに設定すると、ちゃんとcurrent policy: frequency should be within 600 MHz and 1.80 GHz.になりました。

誰がクロックを制限しているのか調査

たぶん/etc以下にそれっぽい設定があるのだろうとgrepかけてみました。

$ grep -r ondemand /etc
/etc/default/cpufrequtils:GOVERNOR="ondemand"
/etc/default/openmediavault:OMV_CPUFREQUTILS_GOVERNOR="ondemand"

2つのファイルの内容をチェックしてみます

/etc/default/cpufrequtils

ENABLE="true"
GOVERNOR="ondemand"
MAX_SPEED="1500000"
MIN_SPEED="600000"

/etc/default/openmediavault (抜粋)

OMV_CPUFREQUTILS_GOVERNOR="ondemand"
OMV_CPUFREQUTILS_MINSPEED="600000"
OMV_CPUFREQUTILS_MAXSPEED="1500000"

ということで犯人発見。上記2ファイルの1500000を1800000に書き換えます。

Openmediavaultはオールインワン設計で、Web UIでシステム回りの設定もできるのが便利な反面、こういうところで不意を突かれるので油断なりません。

関連記事:

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?