FreeBSDは高温でCPUクロックを調整します

FreeBSDは高温でCPUクロックを調整します

私が使っているラップトップは冷却システムが悪く、CPU温度が時々非常に高い温度に達し、dmesgに見られるように、LinuxカーネルはCPUクロックを調整してCPU温度を下げることができます。

[22612.245243] CPU3: Core temperature above threshold, cpu clock throttled (total events = 617268)
...
[22612.257307] CPU3: Core temperature/speed normal
etc

私は最近FreeBSDをインストールして遊んでいましたが、一部の使用後にCPU温度が通常より高くなり、FreeBSDが調整の代わりに再起動するようにpowerd設定しても常にCPUを最高速度で使用することがわかりました。-a hiadaptive -b adaptive -i 85 -r 60 -p 100C状態を試してみましたが、役に立ちませんでした。

Linuxの動作を取得するにはどうすればよいですか?

ベストアンサー1

CPUが過熱してファイアウォール(古いノートブック)がシャットダウンするという同様の問題がありました。 pfSenseファイアウォールで動作する次の手順を使用して問題を解決しました。

1) FreeBSDダウンロードCPU速度.sh 文書GitHubの著者:dreamcat4

2) ファイル生成CPU速度.sh、pfSense管理インターフェイスを介して診断>>ファイル編集を使用して、前の手順でリンクされたソースコンテンツを貼り付けます。

3) ファイル実行の有効化CPU速度.shfSense 管理インターフェイスで診断 >> コマンドプロンプトと次のコマンドを使用します。$ chmod +x /[path_to_file]/cpu-speed.sh

4)$ sysctl dev.cpu.0.freq_levels コマンドプロンプトで実行して、使用可能なCPU周波数を確認します。

4) ファイルの実行CPU速度.sh[valid_CPU_frq] 使用コマンド$ cd /[path_to_file] && ./cpu-speed.sh [valid_CPU_frq]

5)次のコマンドを使用して現在の(新しい)CPU周波数を確認します。$ sysctl dev.cpu.0.freq

6) 完了しました。

私は私のCPUに許容される最も低いCPUコア周波数を選択し、私のCPUのCPUコア温度を+90℃から<60℃に永久に下げることができました。

編集する: 将来のデッドリンクを防ぐには、dreamcat4用のコードを含むファイル(上記のリンク)を見つけてください。CPU速度.sh次のように:

#!/bin/sh
#
# cpu-speed:
#   Requirements - be the root user, FreeBSD 9.2 or higher.
# 
#   Get or set the CPU frequency. This command with no arguments will
#   print the current CPU frequency. CPU may be idling at it's lowest speed.
#
#   This command takes 1 optional argument - new MAX cpu freq (in Mhz).
#   expressed as an integer number. e.g. "cpu 800" - set max freq 800 Mhz.
#   This MAX figure is the new max frequency it is allowed to clock up to.
#
#   Number is rounded off to the nearest allowed frequency multiplier.
#

show_all_cpu_sysctl_settings()
{
# Most FreeBSD kernel settings are read-only. Some may look like duplicates.
# Very few are read-write (so we use powerd). Some CPU settings depend on the CPU family.

# This command should reveal all the CPU-related key names:
    sysctl - a | grep - i cpu
}

set_cpu_speed()
{
# To change the max clock, we must restart the "powerd" rc.d service 
# with new cmdline arguments. "man powerd" for more information.
    if ["$(id -u)" = "0"]; then
    if [!"$(grep "cpuspeed" " / etc / rc.conf")"]; then
       echo "" >> "/etc/rc.conf"
      echo "powerd_enable=\"YES\"" >> "/etc/rc.conf"

      # make the cmdline argument to -M flag a txt substitution with the txt file "/etc/cpuspeed"
    echo "powerd_flags=\"-M \$(cat /etc/cpuspeed)\"" >> "/etc/rc.conf"
    fi

    if ["$1"]; then
# write our new cpu speed to the txt file "/etc/cpuspeed"
      echo "$1" > / etc / cpuspeed

# restart powerd daemon to read the new cpu speed
      / etc / rc.d / powerd restart > / dev / null
    fi
  fi


}

print_current_cpu_freq()
{
# Report back the current cpu frequency for core "0"
    sysctl dev.cpu.0.freq
}

show_possible_cpu_speeds()
{
# Show a list of all possible cpu frequency steps for core "0"
    sysctl dev.cpu.0.freq_levels
}

main()
{
    set_cpu_speed "$@";
    sleep 1; # give it a chance to update before we check the new value
  print_current_cpu_freq;
    show_possible_cpu_speeds;
}

# Entry point
main "$@"

おすすめ記事