Macbook에서 데비안의 냉각 공격성을 높이는 방법은 무엇입니까?

Macbook에서 데비안의 냉각 공격성을 높이는 방법은 무엇입니까?

내 Macbook Air에 Debian을 설치했는데(왜? 재미있어서요.) 실제로 꽤 잘 실행됩니다.

그러나 모든 코어에서 100% CPU를 차지하는 "kidle_inject"라는 프로세스를 발견한 후 온도를 확인하고 싶었고 "센서"에서 온도가 96도에 머물고 있다고 말했습니다. 팬은 거의 작동하지 않았습니다.

나는 OSX에서는 시스템을 켜자마자 실행될 것이라는 것을 알았습니다(아마도 조금 전부터 따뜻했을 것입니다). 반면 데비안에서는 거의 들리지 않습니다. 데비안에서.

데비안에게 팬을 좀 더 적극적으로 사용하도록 지시할 수 있는 방법이 있나요?

답변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"으로.

이를 자동으로 제어하는 ​​방법이 다음 의제입니다.

편집: 또한 팬을 끄는 것만으로도 시스템이 과열될 위험에 노출될 수 있으므로 이러한 설정에 주의하십시오.

두 번째 편집:

또한 온도 센서 판독값이 페이지에서 제안한 다른 디렉터리가 아닌 팬 설정과 동일한 디렉터리에 있는 것으로 나타났기 때문에 해당 페이지의 정보가 약간 오래된 것 같습니다.

세 번째 편집: 해당 페이지의 알고리즘을 기반으로 루트로 실행하면 꽤 잘 작동하는 빠른 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)))

관련 정보