OptimusG(L-01E,LGL21)にCPUサーマルスロットリングを組み込む

CPUサーマルスロットリングとは

温度が上昇するとクロックを下げて温度上昇を抑える仕組み

もともと組み込んであるのだが、configファイルをみると

/etc/thermald.conf

...
[tsens_tz_sensor7]
sampling         5000
thresholds       60      120
thresholds_clr   57      115
actions          none    shutdown
action_info      0       5000
...
[tsens_tz_sensor10]
sampling         5000
thresholds       60      120
thresholds_clr   57      115
actions          none    shutdown
action_info      0       5000
...

温度(thresholds)が高くなるとシャットダウンしか記述されていない

実際ゲームを長時間やると温度が高くなって本体が電源OFFする

これを以下のように記述してみた

...
[tsens_tz_sensor7]
sampling         5000
thresholds       60     70      90      95      100     105     110     115
thresholds_clr   57     67      85      90      95      100     105     110
actions          none   cpu     cpu     cpu     cpu     cpu     cpu     shutdown
action_info      0      1512000 1242000 1134000  702000  594000  384000  5000
...
[tsens_tz_sensor10]
sampling         5000
thresholds       60     70      90      95      100     105     110     115
thresholds_clr   57     67      85      90      95      100     105     110
actions          none   cpu     cpu     cpu     cpu     cpu     cpu     shutdown
action_info      0      1512000 1242000 1134000  702000  594000  384000  5000
...

CPU Throttling Test アプリでは負荷テストをしながらCPUの温度とクロックをモニタリングできる

実際動かしてみると最高クロックの指定が行われていることがわかる

adb では、以下の操作で最高クロックの内容が確認できる

$ adb root
$ adb shell
# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
1512000
# cat /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
1512000
# cat /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq
1512000
# cat /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq
1512000

thermaldというプログラムはcpu0はあまり指定せす、cpu1~cpu3を先に指定しているようである