Context
coolstep/daemon.py hard-codes thermal thresholds that were calibrated for
the dev target (ASUS TUF A15 / Ryzen 9 7940HS):
HOT_THRESHOLD_C = float(os.environ.get("COOLSTEP_HOT_THRESHOLD_C", 82.0))
THROTTLE_ENTER_C = float(os.environ.get("COOLSTEP_THROTTLE_ENTER_C", 90.0))
THROTTLE_EXIT_C = float(os.environ.get("COOLSTEP_THROTTLE_EXIT_C", 85.0))
The comments call this out explicitly: «82°C is conservative for AMD 7940HS
post-knee zone», «AMD 7940HS thermal trip ~95°C, knee ~85°C».
Env overrides work, but the user has to know what knee/trip mean for their
silicon and manually edit a drop-in. On Intel 13th-gen the picture is
different (e.g. i5-13500 has a Tjunction around 100°C, knee ~80-85°C
P-cores). Server Xeons / EPYC are different again.
What to do
Add a caps-derived default that respects manual env overrides:
def _default_hot_threshold_c(caps: PlatformCaps) -> float:
"""Conservative ~5-10°C below the vendor knee."""
cpu_class = caps.cpu_class # 'amd_ryzen_apu', 'intel_alder_lake', 'arm', ...
return {
"amd_ryzen_apu": 82.0,
"amd_ryzen_desktop": 85.0,
"intel_alder_lake": 80.0,
"intel_raptor_lake": 82.0,
"intel_xeon_server": 75.0,
"amd_epyc_server": 75.0,
"arm": 75.0,
}.get(cpu_class, 80.0) # generic fallback
User env override always wins. Two-line change in daemon startup + a small
mapping table in coolstep/compat/core.json (since we already centralise
hwmon driver sets and DMI hints there — same shape).
Acceptance
Difficulty: small. ~40 LOC + per-fixture assertions.
Context
coolstep/daemon.pyhard-codes thermal thresholds that were calibrated forthe dev target (ASUS TUF A15 / Ryzen 9 7940HS):
The comments call this out explicitly: «82°C is conservative for AMD 7940HS
post-knee zone», «AMD 7940HS thermal trip ~95°C, knee ~85°C».
Env overrides work, but the user has to know what knee/trip mean for their
silicon and manually edit a drop-in. On Intel 13th-gen the picture is
different (e.g. i5-13500 has a Tjunction around 100°C, knee ~80-85°C
P-cores). Server Xeons / EPYC are different again.
What to do
Add a caps-derived default that respects manual env overrides:
User env override always wins. Two-line change in daemon startup + a small
mapping table in
coolstep/compat/core.json(since we already centralisehwmon driver sets and DMI hints there — same shape).
Acceptance
caps.cpu_classDifficulty: small. ~40 LOC + per-fixture assertions.