mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Power limits cleanup
This commit is contained in:
@@ -762,7 +762,10 @@ namespace GHelper
|
|||||||
|
|
||||||
private void TrackPower_MouseUp(object? sender, MouseEventArgs e)
|
private void TrackPower_MouseUp(object? sender, MouseEventArgs e)
|
||||||
{
|
{
|
||||||
modeControl.AutoPower();
|
Task.Run(() =>
|
||||||
|
{
|
||||||
|
modeControl.AutoPower();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -87,8 +87,13 @@ namespace GHelper.Mode
|
|||||||
Program.toast.RunToast(Modes.GetCurrentName(), SystemInformation.PowerStatus.PowerLineStatus == PowerLineStatus.Online ? ToastIcon.Charger : ToastIcon.Battery);
|
Program.toast.RunToast(Modes.GetCurrentName(), SystemInformation.PowerStatus.PowerLineStatus == PowerLineStatus.Online ? ToastIcon.Charger : ToastIcon.Battery);
|
||||||
|
|
||||||
SetGPUClocks();
|
SetGPUClocks();
|
||||||
AutoFans();
|
|
||||||
AutoPower(1000);
|
Task.Run(async () =>
|
||||||
|
{
|
||||||
|
AutoFans();
|
||||||
|
AutoPower(1000);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
// Power plan from config or defaulting to balanced
|
// Power plan from config or defaulting to balanced
|
||||||
if (AppConfig.GetModeString("scheme") is not null)
|
if (AppConfig.GetModeString("scheme") is not null)
|
||||||
@@ -155,7 +160,7 @@ namespace GHelper.Mode
|
|||||||
if (cpuResult != 1 || gpuResult != 1)
|
if (cpuResult != 1 || gpuResult != 1)
|
||||||
{
|
{
|
||||||
Program.acpi.DeviceSet(AsusACPI.PerformanceMode, Modes.GetCurrentBase(), "Reset Mode");
|
Program.acpi.DeviceSet(AsusACPI.PerformanceMode, Modes.GetCurrentBase(), "Reset Mode");
|
||||||
settings.LabelFansResult("ASUS BIOS rejected fan curve");
|
settings.LabelFansResult("Model doesn't support custom fan curves");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -189,21 +194,18 @@ namespace GHelper.Mode
|
|||||||
bool applyPower = AppConfig.IsMode("auto_apply_power");
|
bool applyPower = AppConfig.IsMode("auto_apply_power");
|
||||||
bool applyFans = AppConfig.IsMode("auto_apply");
|
bool applyFans = AppConfig.IsMode("auto_apply");
|
||||||
|
|
||||||
Task.Run(async () =>
|
if (applyPower && !applyFans && (AppConfig.IsFanRequired() || AppConfig.IsManualModeRequired()))
|
||||||
{
|
{
|
||||||
if (applyPower && !applyFans && (AppConfig.IsFanRequired() || AppConfig.IsManualModeRequired()))
|
delay = 500;
|
||||||
{
|
AutoFans(true);
|
||||||
delay = 500;
|
}
|
||||||
AutoFans(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
await Task.Delay(TimeSpan.FromMilliseconds(delay));
|
Thread.Sleep(delay);
|
||||||
if (applyPower) SetPower(delay == 0);
|
if (applyPower) SetPower(delay == 0);
|
||||||
|
|
||||||
await Task.Delay(TimeSpan.FromMilliseconds(500));
|
Thread.Sleep(500);
|
||||||
SetGPUPower();
|
SetGPUPower();
|
||||||
AutoRyzen();
|
AutoRyzen();
|
||||||
});
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user