From db3804414e33cd5387ddb8f52289f4a3d342e5bb Mon Sep 17 00:00:00 2001 From: Serge <5920850+seerge@users.noreply.github.com> Date: Wed, 17 Jan 2024 17:42:42 +0100 Subject: [PATCH] Reset clock limit https://github.com/seerge/g-helper/issues/1915 --- app/Gpu/NVidia/NvidiaGpuControl.cs | 2 ++ app/Mode/ModeControl.cs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Gpu/NVidia/NvidiaGpuControl.cs b/app/Gpu/NVidia/NvidiaGpuControl.cs index 6a362b6e..08e3e88e 100644 --- a/app/Gpu/NVidia/NvidiaGpuControl.cs +++ b/app/Gpu/NVidia/NvidiaGpuControl.cs @@ -152,6 +152,8 @@ public class NvidiaGpuControl : IGpuControl int _clockLimit = GetMaxGPUCLock(); + if (_clockLimit < 0 && clock == 0) return 0; + if (_clockLimit != clock) { if (clock > 0) RunPowershellCommand($"nvidia-smi -lgc 0,{clock}"); diff --git a/app/Mode/ModeControl.cs b/app/Mode/ModeControl.cs index c7406ed9..a3fe3f6c 100644 --- a/app/Mode/ModeControl.cs +++ b/app/Mode/ModeControl.cs @@ -318,7 +318,7 @@ namespace GHelper.Mode int memory = AppConfig.GetMode("gpu_memory"); int clock_limit = AppConfig.GetMode("gpu_clock_limit"); - if (core == -1 && memory == -1 && clock_limit == -1) return; + //if (core == -1 && memory == -1 && clock_limit == -1) return; //if ((gpu_core > -5 && gpu_core < 5) && (gpu_memory > -5 && gpu_memory < 5)) launchAsAdmin = false; if (Program.acpi.DeviceGet(AsusACPI.GPUEco) == 1) { Logger.WriteLine("Clocks: Eco"); return; }