diff --git a/app/Gpu/NvidiaGpuControl.cs b/app/Gpu/NvidiaGpuControl.cs index 53c9b220..5706b799 100644 --- a/app/Gpu/NvidiaGpuControl.cs +++ b/app/Gpu/NvidiaGpuControl.cs @@ -55,7 +55,16 @@ public class NvidiaGpuControl : IGpuControl try { Process[] processes = internalGpu.GetActiveApplications(); - foreach (Process process in processes) ProcessHelper.KillByProcess(process); + foreach (Process process in processes) + try + { + Logger.WriteLine("Kill:" + process.ProcessName); + ProcessHelper.KillByProcess(process); + } + catch (Exception ex) + { + Logger.WriteLine(ex.Message); + } } catch (Exception ex) { diff --git a/app/Settings.cs b/app/Settings.cs index 21104017..8d19827b 100644 --- a/app/Settings.cs +++ b/app/Settings.cs @@ -993,7 +993,10 @@ namespace GHelper private void ButtonStopGPU_Click(object? sender, EventArgs e) { - HardwareControl.KillGPUApps(); + if (HardwareControl.GpuControl is not null) + { + HardwareControl.GpuControl.KillGPUApps(); + } } public async void RefreshSensors(bool force = false) @@ -1615,7 +1618,7 @@ namespace GHelper if (eco < 0 && mux < 0) { isGpuSection = false; - + buttonEco.Visible = false; buttonStandard.Visible = false; buttonUltimate.Visible = false;