1
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?

Raspberry Pi 5でのCPUファン制御

Posted at

はじめに

Raspberry Pi 5(Ubuntu OS)のファン動作温度をraspi-configで設定しました。

ファン制御の目的

CPUはトランジスタの動作によって発熱します。特に、大規模な演算やコンパイルなどの高負荷な処理を実行すると発熱量が増加し、熱暴走やエラーなどを引き起こすおそれがあります。
そのため、CPUの温度上昇を検知すると、クロック数を下げる(サーマルスロットリング)や、内部の熱を放散させるといった対策がとられます。
ヒートシンクやファンを取り付けて制御するのは、この放熱を効率的に行うことが目的です。

CPU温度の確認

Raspberry Pi 5ではターミナルのコマンドでCPUの温度を確認できます。

$ sudo vcgencmd measure_temp
temp=47.2'C

thermal_zoneのファイルから情報を引くことでも確認できます。
こちらは1000で割ると°Cになります。

$ cat /sys/class/thermal/thermal_zone0/temp
47950

筆者の環境ではthermal_zone0のみでtypecpu-thermalでした。複数の点で測定している場合は、zoneが複数存在するようです。

$ cat /sys/class/thermal/thermal_zone0/type
cpu-thermal

raspi-configでのファン動作温度設定

raspi-configはターミナルから起動できます。

$ sudo raspi-config

ターミナル画面でツールが立ち上がるので、キーボードで操作して設定します。

4 Performance Optionsを選択

Screenshot from 2025-10-26 23-42-10.png

P4 Fanを選択

Screenshot from 2025-10-26 23-42-43.png

ファンの温度制御を有効にするか -> Yes

Screenshot from 2025-10-27 01-00-15.png

ファンが接続されたGPIOのピン配置 -> デフォルトで14を設定しています。

Screenshot from 2025-10-26 23-43-17.png

ファンが起動するCPU温度を設定します。

Screenshot from 2025-10-26 23-43-30.png

これで確認画面し、OKを押してから再起動します。

Screenshot from 2025-10-27 01-04-26.png

実際には4コア使わないとなかなか温度上昇はしませんでしたが、60°Cを超えるとファンが動作することを確認できました。
読んでいただきありがとうございました。

環境

Raspberry Pi 5 (Cortex-A76, 2.4GHz)
OS: Ubuntu 24.04 LTS
Fan: Smraza Official Active Cooler

1
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
1
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?