diff --git a/app/Mode/ModeControl.cs b/app/Mode/ModeControl.cs index 1f81b8e0..8b9caf4d 100644 --- a/app/Mode/ModeControl.cs +++ b/app/Mode/ModeControl.cs @@ -12,6 +12,7 @@ public class ModeControl private static bool customFans = false; private static int customPower = 0; + private static bool customTemp = false; private int _cpuUV = 0; private int _igpuUV = 0; @@ -82,6 +83,8 @@ public void SetPerformanceMode(int mode = -1, bool notify = false) customFans = false; customPower = 0; + customTemp = false; + SetModeLabel(); // Workaround for not properly resetting limits on G14 2024 @@ -394,10 +397,17 @@ public void SetGPUPower() public void SetCPUTemp(int? cpuTemp, bool init = false) { + if (cpuTemp == RyzenControl.MaxTemp && customTemp) + { + cpuTemp = RyzenControl.DefaultTemp; + Logger.WriteLine($"Custom CPU Temp reset"); + } + if (cpuTemp >= RyzenControl.MinTemp && cpuTemp < RyzenControl.MaxTemp) { var resultCPU = SendCommand.set_tctl_temp((uint)cpuTemp); if (init) Logger.WriteLine($"CPU Temp: {cpuTemp} {resultCPU}"); + if (resultCPU == Smu.Status.OK) customTemp = cpuTemp != RyzenControl.DefaultTemp; } } diff --git a/app/Ryzen/RyzenControl.cs b/app/Ryzen/RyzenControl.cs index bcedbee0..b4ee837d 100644 --- a/app/Ryzen/RyzenControl.cs +++ b/app/Ryzen/RyzenControl.cs @@ -21,6 +21,7 @@ internal class RyzenControl public static int MinTemp => AppConfig.Get("min_temp", 75); public const int MaxTemp = 98; + public const int DefaultTemp = 96; public static int FAMID { get; protected set; }