Eco tweaks

This commit is contained in:
Serge
2023-05-11 10:52:40 +02:00
parent 22f136fe9e
commit 97c97e8e19
4 changed files with 23 additions and 20 deletions

View File

@@ -90,10 +90,10 @@ public class NvidiaGpuControl : IGpuControl
}
public void RestartGPU()
public bool RestartGPU()
{
if (!IsValid) return;
if (!IsValid) return false;
try
{
@@ -104,10 +104,12 @@ public class NvidiaGpuControl : IGpuControl
Thread.Sleep(3000);
RunCMD("pnputil", $"/enable-device /deviceid \"{pnpDeviceId}\"");
Thread.Sleep(2000);
return true;
}
catch (Exception ex )
{
Logger.WriteLine(ex.ToString());
return false;
}
}