mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Allow setting GPU clock limit when clock offsets are default https://github.com/seerge/g-helper/issues/1557
This commit is contained in:
@@ -153,7 +153,7 @@ namespace GHelper
|
|||||||
labelM1.Text = "FN+F2";
|
labelM1.Text = "FN+F2";
|
||||||
labelM2.Text = "FN+F3";
|
labelM2.Text = "FN+F3";
|
||||||
labelM3.Text = "FN+F4";
|
labelM3.Text = "FN+F4";
|
||||||
labelM4.Visible = comboM4.Visible = textM4.Visible = false;
|
labelM4.Visible = comboM4.Visible = textM4.Visible = AppConfig.IsDUO();
|
||||||
labelFNF4.Visible = comboFNF4.Visible = textFNF4.Visible = false;
|
labelFNF4.Visible = comboFNF4.Visible = textFNF4.Visible = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -133,9 +133,10 @@ namespace GHelper.Helpers
|
|||||||
cmd.StartInfo.Arguments = args;
|
cmd.StartInfo.Arguments = args;
|
||||||
cmd.Start();
|
cmd.Start();
|
||||||
|
|
||||||
|
Logger.WriteLine(args);
|
||||||
|
|
||||||
string result = cmd.StandardOutput.ReadToEnd().Replace(Environment.NewLine, " ").Trim(' ');
|
string result = cmd.StandardOutput.ReadToEnd().Replace(Environment.NewLine, " ").Trim(' ');
|
||||||
|
|
||||||
Logger.WriteLine(args);
|
|
||||||
Logger.WriteLine(result);
|
Logger.WriteLine(result);
|
||||||
|
|
||||||
cmd.WaitForExit();
|
cmd.WaitForExit();
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ namespace GHelper.Input
|
|||||||
SetBacklightAuto();
|
SetBacklightAuto();
|
||||||
}
|
}
|
||||||
|
|
||||||
//Debug.WriteLine(iddle.TotalSeconds);
|
//Logger.WriteLine("Iddle: " + iddle.TotalSeconds);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Init()
|
public void Init()
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using GHelper.Battery;
|
using GHelper.Gpu.NVidia;
|
||||||
using GHelper.Gpu.NVidia;
|
|
||||||
using GHelper.Helpers;
|
using GHelper.Helpers;
|
||||||
using Ryzen;
|
using Ryzen;
|
||||||
|
|
||||||
@@ -311,13 +310,13 @@ namespace GHelper.Mode
|
|||||||
int memory = AppConfig.GetMode("gpu_memory");
|
int memory = AppConfig.GetMode("gpu_memory");
|
||||||
int clock_limit = AppConfig.GetMode("gpu_clock_limit");
|
int clock_limit = AppConfig.GetMode("gpu_clock_limit");
|
||||||
|
|
||||||
if (core == -1 && memory == -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 ((gpu_core > -5 && gpu_core < 5) && (gpu_memory > -5 && gpu_memory < 5)) launchAsAdmin = false;
|
||||||
|
|
||||||
if (Program.acpi.DeviceGet(AsusACPI.GPUEco) == 1) return;
|
if (Program.acpi.DeviceGet(AsusACPI.GPUEco) == 1) { Logger.WriteLine("Clocks: Eco"); return; }
|
||||||
if (HardwareControl.GpuControl is null) return;
|
if (HardwareControl.GpuControl is null) { Logger.WriteLine("Clocks: NoGPUControl"); return; }
|
||||||
if (!HardwareControl.GpuControl!.IsNvidia) return;
|
if (!HardwareControl.GpuControl!.IsNvidia) { Logger.WriteLine("Clocks: NotNvidia"); return; }
|
||||||
|
|
||||||
using NvidiaGpuControl nvControl = (NvidiaGpuControl)HardwareControl.GpuControl;
|
using NvidiaGpuControl nvControl = (NvidiaGpuControl)HardwareControl.GpuControl;
|
||||||
try
|
try
|
||||||
@@ -328,7 +327,7 @@ namespace GHelper.Mode
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Logger.WriteLine(ex.ToString());
|
Logger.WriteLine("Clocks Error:" + ex.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
settings.GPUInit();
|
settings.GPUInit();
|
||||||
|
|||||||
Reference in New Issue
Block a user