Skip to content

Commit

Permalink
fix: don't check for the minimum temperature limit in custom fan curves,
Browse files Browse the repository at this point in the history
as it is not reported correctly anywhere anyway
  • Loading branch information
ilya-zlobintsev committed Dec 26, 2024
1 parent 240d4b1 commit f452ebe
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lact-daemon/src/server/gpu_controller/fan_control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ impl FanCurve {
let current = temp.current.expect("No current temp");

// This scenario is most likely unreachable as the kernel shuts down the GPU when it reaches critical temperature
if temp.crit.filter(|crit| current > *crit).is_some()
|| temp.crit_hyst.filter(|hyst| current < *hyst).is_some()
{
if temp.crit.filter(|crit| current > *crit).is_some() {
warn!("GPU temperature is beyond critical values! {current}°C");
return u8::MAX;
}
Expand Down Expand Up @@ -187,7 +185,6 @@ mod tests {
assert_eq!(pwm_at_temp(79.0), 248);
assert_eq!(pwm_at_temp(85.0), 255);
assert_eq!(pwm_at_temp(100.0), 255);
assert_eq!(pwm_at_temp(-5.0), 255);
}

#[test]
Expand Down

0 comments on commit f452ebe

Please sign in to comment.