MacbookでDebianの冷却強度を上げるには?

MacbookでDebianの冷却強度を上げるには?

Macbook AirにDebianをインストールしたのですが(なぜ?楽しいのですが)、実際にはかなりよく戻ります。

しかし、「kidle_inject」というプロセスがすべてのコアでCPUの100%を占めていることに気づいた後、温度を確認したかったし、「センサー」が摂氏96度を回っていると述べた。ファンがほとんど戻らないですね。

私はOSXでは、システムの電源を入れるたびにそれが実行されることに気づきました(おそらく少し前には暑かったでしょう)。一方、Debianではその音がほとんど聞こえず、ノートパソコンに触れると暖かく見えます。 Debian で。

Debianにファンをより積極的に使用させる方法はありますか?

ベストアンサー1

http://allanmcrae.com/2010/05/simple-macbook-pro-fan-daemon/これは有用な開始であることが証明されています。

には、/sys/devices/platform/applesmc.768/ファンの速度を制御するのに便利ないくつかのオプションがあります。

ここで、「fan1_min」および「fan1_max」は最小および最大ファン速度、「fan1_output」はファンを直接制御する設定、「fan1_manual」はシステムが最小および最大設定を無視し、「fan1_output」の変更に直接応答するしてください。 」。

これを自動的に制御する方法は次の議題です。

編集:また、ファンの電源を切るだけでシステムが過熱する危険性があるため、これらの設定に注意してください。

2番目の編集:

そのページの情報は少し古いようです。これは、温度センサーの読み取り値がページで提案されている他のディレクトリではなく、ファン設定と同じディレクトリにあることがわかったためです。

3番目の編集:そのページのアルゴリズムに基づいてrootとして実行すると、正常に動作する高速Pythonスクリプトが作成されました。

#!/usr/bin/python
import time
import glob
import math

last_temp = 0

while True:

    time.sleep(1)

    files = glob.glob("/sys/devices/platform/applesmc.768/temp*_input")

    temp = 0

    for file in files:
        with open(file) as openfile:
            sensor_temp = openfile.read()

            temp = max(int(sensor_temp)/1000, temp)

    with open("/sys/devices/platform/applesmc.768/fan1_input") as fan1_input:
        current_speed = int(fan1_input.read())

    increasing = temp > last_temp

    last_temp = temp

    if increasing:
        if temp <= 65:
            speed = max(current_speed, 2000)
        elif 65 < temp < 80:
            step = (6200 - 2000) / ((80 - 65) * (80 - 64) / 2)
            speed = max(current_speed, math.ceil(2000 + (temp - 65) * (temp - 64) / 2 * step))
        elif temp >= 80:
            speed = 6200
    else:
        if temp >= 80:
            speed = 6200
        elif 55 < temp < 80:
            step = (6200 - 2000) / ( (80 - 55) * (80 - 54) / 2 )
            speed = min(current_speed, math.floor(6200 - (80 - temp) * (81 - temp) / 2 * step))
        elif temp <= 55:
            speed = 2000

    print "Temperature: " + str(temp) + " Increasing?: " + str(increasing) + " Current speed: " + str(current_speed) + " Target: " + str(speed)

    with open("/sys/devices/platform/applesmc.768/fan1_min", "w") as fan1_input:
    #with open("/home/werner/testtemp", 'w+') as fan1_input:
        fan1_input.write(str(int(speed)))

おすすめ記事