Skip to content

Commit 5b5b8b9

Browse files
committed
temperature fixed
1 parent b867c8f commit 5b5b8b9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/thermal_control.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
#include <stdbool.h> // bool 타입 추가
1212

1313
#define GPU_TEMP_PATH "/sys/class/kgsl/kgsl-3d0/temp"
14-
#define TEMP_THRESHOLD_MC 70000 // 70도 = 70000 millidegree C
15-
#define TARGET_CPU_FREQ 1785600
14+
#define TEMP_THRESHOLD_MC 60000 // 60도 = 60000 millidegree C
15+
#define TARGET_CPU_FREQ 960000
1616

1717
// GPU 온도 읽기 (millidegree C)
1818
static inline int read_gpu_temp() {
@@ -94,14 +94,14 @@ static inline void thermal_control_check() {
9494
if (temp_mc >= TEMP_THRESHOLD_MC && !throttled) {
9595
set_cpu_freq(TARGET_CPU_FREQ);
9696
throttled = true;
97-
fprintf(stderr, "Thermal: GPU temp %.1f°C >= 70°C, throttling CPU to %d KHz\n",
97+
fprintf(stderr, "Thermal: GPU temp %.1f°C >= 60°C, throttling CPU to %d KHz\n",
9898
temp_mc / 1000.0, TARGET_CPU_FREQ);
9999
}
100100
// 65도 이하로 내려가면 throttle 해제 (hysteresis)
101101
else if (temp_mc < (TEMP_THRESHOLD_MC - 5000) && throttled) {
102102
// 원하는 경우 여기서 원래 frequency로 복구 가능
103103
throttled = false;
104-
fprintf(stderr, "Thermal: GPU temp %.1f°C < 65°C, releasing throttle\n",
104+
fprintf(stderr, "Thermal: GPU temp %.1f°C < 55°C, releasing throttle\n",
105105
temp_mc / 1000.0);
106106
}
107107

0 commit comments

Comments
 (0)