From 5fe8416c650dcfa0ba316d8e0e49c00831478538 Mon Sep 17 00:00:00 2001 From: "Luke D. Jones" Date: Thu, 14 Mar 2024 21:28:06 +1300 Subject: [PATCH] Only apply fan curve for profile if *on* that profile, but still save config --- asusd/src/ctrl_fancurves.rs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/asusd/src/ctrl_fancurves.rs b/asusd/src/ctrl_fancurves.rs index 2df03fb2..1968749f 100644 --- a/asusd/src/ctrl_fancurves.rs +++ b/asusd/src/ctrl_fancurves.rs @@ -172,11 +172,14 @@ impl CtrlFanCurveZbus { .await .profiles .save_fan_curve(curve, profile)?; - self.config - .lock() - .await - .profiles - .write_profile_curve_to_platform(profile, &mut find_fan_curve_node()?)?; + let active: ThrottlePolicy = self.platform.get_throttle_thermal_policy()?.into(); + if active == profile { + self.config + .lock() + .await + .profiles + .write_profile_curve_to_platform(profile, &mut find_fan_curve_node()?)?; + } self.config.lock().await.write(); Ok(()) }