Compare commits

...

47 Commits

Author SHA1 Message Date
Serge
0069234563 Version bump 2023-08-18 01:23:02 +02:00
Serge
d92a1880ee Merge branch 'main' of https://github.com/seerge/g-helper 2023-08-17 20:28:51 +02:00
Serge
dd72e2b573 Screen detection fix 2023-08-17 20:28:48 +02:00
Serge
10714d1002 Update README.md 2023-08-17 19:58:22 +02:00
Serge
daad1bca53 Merge pull request #1109 from IceStormNG/asus-mouse-support
Support for ROG Keris Wireless Aimpoint (P709_Wireless)
2023-08-17 14:29:17 +02:00
IceStormNG
c82ec8a005 Adds ROG Keris Wireless Aimpoint (P709_Wireless) 2023-08-17 14:25:31 +02:00
IceStormNG
9fbea0a3d3 Fixes crash when DPI was not read yet. 2023-08-17 14:23:55 +02:00
Serge
ed06247206 Merge branch 'main' of https://github.com/seerge/g-helper 2023-08-17 10:52:10 +02:00
Serge
1e7bd816f2 Config overrides https://github.com/seerge/g-helper/issues/1105 2023-08-17 10:52:09 +02:00
Serge
592c4aa07a Update README.md 2023-08-16 14:57:06 +02:00
Serge
59f3aa9af4 Merge pull request #1096 from IceStormNG/main
AniMeMatrix fix for GU604
2023-08-15 23:52:43 +02:00
IceStormNG
8df825e250 AniMeMatrix fix for GU604 2023-08-15 23:27:14 +02:00
Serge
a985cc5bbb Darktheme fix https://github.com/seerge/g-helper/issues/1092
ACPI modes support for Vivobook https://github.com/seerge/g-helper/issues/1089
2023-08-15 13:59:07 +02:00
Serge
bd7985e817 Merge pull request #1093 from seerge/l10n_main
New Crowdin updates
2023-08-15 13:57:22 +02:00
Serge
8706f9f03c New translations Strings.resx (Ukrainian) 2023-08-15 12:53:23 +02:00
Serge
5c6a587745 App dark/light theme detection https://github.com/seerge/g-helper/issues/1092 2023-08-15 12:00:08 +02:00
Serge
de4905f84f Power mode saving https://github.com/seerge/g-helper/issues/1091 2023-08-15 11:21:20 +02:00
Serge
121a9224e9 Power mode saving 2023-08-15 11:19:10 +02:00
Serge
af9626e385 Version bump 2023-08-14 17:32:15 +02:00
Serge
6b3db926fc GPU Aura Mode 2023-08-14 17:19:22 +02:00
Serge
8f8be7a13e Single Color Modes 2023-08-14 16:55:25 +02:00
Serge
12450dbba4 Merge pull request #1084 from seerge/gpu_clock_limit
Gpu clock limit
2023-08-14 16:51:45 +02:00
Serge
4f6de3c6a3 GPU Mode Backlight 2023-08-14 16:48:16 +02:00
Serge
d89420e0f1 Merge pull request #1074 from seerge/l10n_main
New Crowdin updates
2023-08-14 12:06:32 +02:00
Serge
ddc13e0dec New translations Strings.resx (Korean) 2023-08-14 10:07:50 +02:00
Serge
61a3d782e8 New translations Strings.resx (Korean) 2023-08-14 08:37:33 +02:00
Serge
b1c8aa97c8 New translations Strings.resx (Korean) 2023-08-14 07:06:19 +02:00
Serge
3a50ee1784 New translations Strings.resx (Korean) 2023-08-14 05:31:39 +02:00
Serge
a69ce3592f New translations Strings.resx (Polish) 2023-08-13 18:48:23 +02:00
Serge
b49ae96dfe New translations Strings.resx (Polish) 2023-08-13 17:48:00 +02:00
Serge
4c989c9d75 Clock Limit tweaks 2023-08-13 15:48:54 +02:00
Serge
2282e56aad GPU Clock Limiting 2023-08-13 12:53:28 +02:00
Serge
982f2e8e32 Merge pull request #1069 from seerge/l10n_main
New Crowdin updates
2023-08-13 12:14:23 +02:00
Serge
e90f19e3e2 New translations Strings.resx (Chinese Simplified) 2023-08-13 05:08:45 +02:00
Serge
6d6a9c68f2 Merge pull request #1063 from seerge/l10n_main
New Crowdin updates
2023-08-12 17:49:57 +02:00
Serge
8138e44cdd New translations Strings.resx (Chinese Traditional) 2023-08-12 17:16:01 +02:00
Serge
ef788798b7 Version Bump 2023-08-12 16:27:51 +02:00
Serge
07d81e6072 Merge pull request #1062 from seerge/power_modes
Power Mode control
2023-08-12 16:23:24 +02:00
Serge
708e3aa40f Update README.md 2023-08-12 16:22:48 +02:00
Serge
3075e22e1e Power Mode control 2023-08-12 16:04:39 +02:00
Serge
b15109d13e Merge branch 'main' of https://github.com/seerge/g-helper 2023-08-11 22:37:17 +02:00
Serge
c491087a29 Set Balanced plan by default 2023-08-11 22:37:14 +02:00
Serge
cf08ae0789 Update README.md 2023-08-11 22:20:25 +02:00
Serge
624f15be65 Merge pull request #1053 from seerge/l10n_main
New Crowdin updates
2023-08-11 21:58:50 +02:00
Serge
4789d0d782 New translations Strings.resx (Spanish) 2023-08-11 17:36:43 +02:00
Serge
f8fd8a9695 New translations Strings.resx (Italian) 2023-08-11 17:36:42 +02:00
Serge
91cfb8d38c New translations Strings.resx (Lithuanian) 2023-08-11 17:36:41 +02:00
34 changed files with 965 additions and 478 deletions

View File

@@ -90,8 +90,6 @@ namespace Starlight.AnimeMatrix
//public int FullEvenRows = -1; //public int FullEvenRows = -1;
public int dx = 0; public int dx = 0;
//Shifts the whole frame to the left or right to align with the diagonal cut
public int frameShiftX = 0;
public int MaxColumns = 34; public int MaxColumns = 34;
private int frameIndex = 0; private int frameIndex = 0;
@@ -124,7 +122,6 @@ namespace Starlight.AnimeMatrix
MaxColumns = 39; MaxColumns = 39;
MaxRows = 92; MaxRows = 92;
LedCount = 1711; LedCount = 1711;
frameShiftX = -5;
UpdatePageLength = 630; UpdatePageLength = 630;
} }
@@ -189,6 +186,10 @@ namespace Starlight.AnimeMatrix
return (y + 1) / 2 - 3; return (y + 1) / 2 - 3;
} }
case AnimeType.GU604: case AnimeType.GU604:
if (y < 9 && y % 2 == 0)
{
return 1;
}
return (int)Math.Ceiling(Math.Max(0, y - 9) / 2F); return (int)Math.Ceiling(Math.Max(0, y - 9) / 2F);
default: default:
@@ -226,6 +227,29 @@ namespace Starlight.AnimeMatrix
default: default:
return 36 - y / 2; return 36 - y / 2;
} }
case AnimeType.GU604:
switch (y)
{
case 0:
case 2:
case 4:
case 6:
case 8:
return 38;
case 1:
case 3:
case 5:
case 7:
case 9:
return 39;
default:
return Width(y) - FirstX(y);
}
default: default:
return Width(y) - FirstX(y); return Width(y) - FirstX(y);
} }
@@ -246,7 +270,7 @@ namespace Starlight.AnimeMatrix
if (!IsRowInRange(y)) return; if (!IsRowInRange(y)) return;
if (x >= FirstX(y) && x < Width(y)) if (x >= FirstX(y) && x < Width(y))
SetLedLinear(RowToLinearAddress(y) - FirstX(y) + x + dx + frameShiftX, value); SetLedLinear(RowToLinearAddress(y) - FirstX(y) + x + dx, value);
} }
public void WakeUp() public void WakeUp()

View File

@@ -79,7 +79,6 @@ public static class AppConfig
public static bool ContainsModel(string contains) public static bool ContainsModel(string contains)
{ {
GetModel(); GetModel();
return (_model is not null && _model.ToLower().Contains(contains.ToLower())); return (_model is not null && _model.ToLower().Contains(contains.ToLower()));
} }
@@ -154,6 +153,11 @@ public static class AppConfig
Write(); Write();
} }
public static void RemoveMode(string name)
{
Remove(name + "_" + Modes.GetCurrent());
}
public static string GgetParamName(AsusFan device, string paramName = "fan_profile") public static string GgetParamName(AsusFan device, string paramName = "fan_profile")
{ {
int mode = Modes.GetCurrent(); int mode = Modes.GetCurrent();
@@ -343,12 +347,13 @@ public static class AppConfig
return return
Is("manual_mode") || Is("manual_mode") ||
ContainsModel("GU604") || ContainsModel("GU604") ||
ContainsModel("G733"); ContainsModel("G733") ||
ContainsModel("FX507Z");
} }
public static bool IsFanRequired() public static bool IsFanRequired()
{ {
return ContainsModel("GA402X") || ContainsModel("G513"); return ContainsModel("GA402X") || ContainsModel("G513") || ContainsModel("G713R");
} }
public static bool IsPowerRequired() public static bool IsPowerRequired()
@@ -358,7 +363,7 @@ public static class AppConfig
public static bool IsGPUFixNeeded() public static bool IsGPUFixNeeded()
{ {
return ContainsModel("GA402X") || ContainsModel("GV302"); return ContainsModel("GA402X") || ContainsModel("GV302") || ContainsModel("FX506") || ContainsModel("GU603V");
} }
public static bool IsGPUFix() public static bool IsGPUFix()

View File

@@ -55,7 +55,8 @@ public class AsusACPI
public const uint GPU_Fan = 0x00110014; public const uint GPU_Fan = 0x00110014;
public const uint Mid_Fan = 0x00110031; public const uint Mid_Fan = 0x00110031;
public const uint PerformanceMode = 0x00120075; // Thermal Control public const uint PerformanceMode = 0x00120075; // Performance modes
public const uint VivoBookMode = 0x00110019; // Vivobook performance modes
public const uint GPUEco = 0x00090020; public const uint GPUEco = 0x00090020;
public const uint GPUXGConnected = 0x00090018; public const uint GPUXGConnected = 0x00090018;

View File

@@ -797,6 +797,10 @@ namespace GHelper
private void VisualizeCurrentDPIProfile() private void VisualizeCurrentDPIProfile()
{ {
AsusMouseDPI dpi = mouse.DpiSettings[mouse.DpiProfile - 1]; AsusMouseDPI dpi = mouse.DpiSettings[mouse.DpiProfile - 1];
if (dpi is null)
{
return;
}
sliderDPI.Value = (int)dpi.DPI; sliderDPI.Value = (int)dpi.DPI;
pictureDPIColor.BackColor = dpi.Color; pictureDPIColor.BackColor = dpi.Color;
} }

View File

@@ -1,5 +1,9 @@
using GHelper.Helpers; using GHelper.Gpu;
using GHelper.Helpers;
using HidLibrary; using HidLibrary;
using NAudio.Gui;
using System.Diagnostics;
using System.Drawing;
using System.Text; using System.Text;
namespace GHelper namespace GHelper
@@ -37,6 +41,7 @@ namespace GHelper
public static class AsusUSB public static class AsusUSB
{ {
public const int HEATMAP = 20; public const int HEATMAP = 20;
public const int GPUMODE = 21;
public const int ASUS_ID = 0x0b05; public const int ASUS_ID = 0x0b05;
@@ -153,33 +158,40 @@ namespace GHelper
}; };
} }
static Dictionary<int, string> _modesSingleColor = new Dictionary<int, string>
{
{ 0, Properties.Strings.AuraStatic },
{ 1, Properties.Strings.AuraBreathe },
{ 10, Properties.Strings.AuraStrobe },
};
static Dictionary<int, string> _modes = new Dictionary<int, string> static Dictionary<int, string> _modes = new Dictionary<int, string>
{ {
{ 0, Properties.Strings.AuraStatic }, { 0, Properties.Strings.AuraStatic },
{ 1, Properties.Strings.AuraBreathe }, { 1, Properties.Strings.AuraBreathe },
{ 2, Properties.Strings.AuraColorCycle }, { 2, Properties.Strings.AuraColorCycle },
{ 3, Properties.Strings.AuraRainbow }, { 3, Properties.Strings.AuraRainbow },
{ 10, Properties.Strings.AuraStrobe }, { 10, Properties.Strings.AuraStrobe },
{ HEATMAP, "Heatmap"} { HEATMAP, "Heatmap"},
}; { GPUMODE, "GPU Mode" }
};
static Dictionary<int, string> _modesStrix = new Dictionary<int, string> static Dictionary<int, string> _modesStrix = new Dictionary<int, string>
{ {
{ 0, Properties.Strings.AuraStatic }, { 0, Properties.Strings.AuraStatic },
{ 1, Properties.Strings.AuraBreathe }, { 1, Properties.Strings.AuraBreathe },
{ 2, Properties.Strings.AuraColorCycle }, { 2, Properties.Strings.AuraColorCycle },
{ 3, Properties.Strings.AuraRainbow }, { 3, Properties.Strings.AuraRainbow },
{ 4, "Star" }, { 4, "Star" },
{ 5, "Rain" }, { 5, "Rain" },
{ 6, "Highlight" }, { 6, "Highlight" },
{ 7, "Laser" }, { 7, "Laser" },
{ 8, "Ripple" }, { 8, "Ripple" },
{ 10, Properties.Strings.AuraStrobe}, { 10, Properties.Strings.AuraStrobe},
{ 11, "Comet" }, { 11, "Comet" },
{ 12, "Flash" }, { 12, "Flash" },
{ HEATMAP, "Heatmap"} { HEATMAP, "Heatmap"}
}; };
public static Dictionary<int, string> GetModes() public static Dictionary<int, string> GetModes()
@@ -191,9 +203,7 @@ namespace GHelper
if (isSingleColor) if (isSingleColor)
{ {
_modes.Remove(2); return _modesSingleColor;
_modes.Remove(3);
_modes.Remove(HEATMAP);
} }
if (AppConfig.IsAdvantageEdition()) if (AppConfig.IsAdvantageEdition())
@@ -380,63 +390,58 @@ namespace GHelper
public static void ApplyAuraPower() public static void ApplyAuraPower()
{ {
Task.Run(async () => AuraPower flags = new();
// Keyboard
flags.AwakeKeyb = AppConfig.IsNotFalse("keyboard_awake");
flags.BootKeyb = AppConfig.IsNotFalse("keyboard_boot");
flags.SleepKeyb = AppConfig.IsNotFalse("keyboard_sleep");
flags.ShutdownKeyb = AppConfig.IsNotFalse("keyboard_shutdown");
// Logo
flags.AwakeLogo = AppConfig.IsNotFalse("keyboard_awake_logo");
flags.BootLogo = AppConfig.IsNotFalse("keyboard_boot_logo");
flags.SleepLogo = AppConfig.IsNotFalse("keyboard_sleep_logo");
flags.ShutdownLogo = AppConfig.IsNotFalse("keyboard_shutdown_logo");
// Lightbar
flags.AwakeBar = AppConfig.IsNotFalse("keyboard_awake_bar");
flags.BootBar = AppConfig.IsNotFalse("keyboard_boot_bar");
flags.SleepBar = AppConfig.IsNotFalse("keyboard_sleep_bar");
flags.ShutdownBar = AppConfig.IsNotFalse("keyboard_shutdown_bar");
// Lid
flags.AwakeLid = AppConfig.IsNotFalse("keyboard_awake_lid");
flags.BootLid = AppConfig.IsNotFalse("keyboard_boot_lid");
flags.SleepLid = AppConfig.IsNotFalse("keyboard_sleep_lid");
flags.ShutdownLid = AppConfig.IsNotFalse("keyboard_shutdown_lid");
// Rear Bar
flags.AwakeRear = AppConfig.IsNotFalse("keyboard_awake_lid");
flags.BootRear = AppConfig.IsNotFalse("keyboard_boot_lid");
flags.SleepRear = AppConfig.IsNotFalse("keyboard_sleep_lid");
flags.ShutdownRear = AppConfig.IsNotFalse("keyboard_shutdown_lid");
var devices = GetHidDevices(deviceIds);
byte[] msg = AuraPowerMessage(flags);
foreach (HidDevice device in devices)
{ {
device.OpenDevice();
AuraPower flags = new(); if (device.ReadFeatureData(out byte[] data, AURA_HID_ID))
// Keyboard
flags.AwakeKeyb = AppConfig.IsNotFalse("keyboard_awake");
flags.BootKeyb = AppConfig.IsNotFalse("keyboard_boot");
flags.SleepKeyb = AppConfig.IsNotFalse("keyboard_sleep");
flags.ShutdownKeyb = AppConfig.IsNotFalse("keyboard_shutdown");
// Logo
flags.AwakeLogo = AppConfig.IsNotFalse("keyboard_awake_logo");
flags.BootLogo = AppConfig.IsNotFalse("keyboard_boot_logo");
flags.SleepLogo = AppConfig.IsNotFalse("keyboard_sleep_logo");
flags.ShutdownLogo = AppConfig.IsNotFalse("keyboard_shutdown_logo");
// Lightbar
flags.AwakeBar = AppConfig.IsNotFalse("keyboard_awake_bar");
flags.BootBar = AppConfig.IsNotFalse("keyboard_boot_bar");
flags.SleepBar = AppConfig.IsNotFalse("keyboard_sleep_bar");
flags.ShutdownBar = AppConfig.IsNotFalse("keyboard_shutdown_bar");
// Lid
flags.AwakeLid = AppConfig.IsNotFalse("keyboard_awake_lid");
flags.BootLid = AppConfig.IsNotFalse("keyboard_boot_lid");
flags.SleepLid = AppConfig.IsNotFalse("keyboard_sleep_lid");
flags.ShutdownLid = AppConfig.IsNotFalse("keyboard_shutdown_lid");
// Rear Bar
flags.AwakeRear = AppConfig.IsNotFalse("keyboard_awake_lid");
flags.BootRear = AppConfig.IsNotFalse("keyboard_boot_lid");
flags.SleepRear = AppConfig.IsNotFalse("keyboard_sleep_lid");
flags.ShutdownRear = AppConfig.IsNotFalse("keyboard_shutdown_lid");
var devices = GetHidDevices(deviceIds);
byte[] msg = AuraPowerMessage(flags);
foreach (HidDevice device in devices)
{ {
device.OpenDevice(); device.WriteFeatureData(msg);
if (device.ReadFeatureData(out byte[] data, AURA_HID_ID)) Logger.WriteLine("USB-KB " + device.Attributes.ProductHexId + ":" + BitConverter.ToString(msg));
{
device.WriteFeatureData(msg);
Logger.WriteLine("USB-KB " + device.Attributes.ProductHexId + ":" + BitConverter.ToString(msg));
}
device.CloseDevice();
} }
device.CloseDevice();
}
if (isTuf) if (isTuf)
Program.acpi.TUFKeyboardPower( Program.acpi.TUFKeyboardPower(
flags.AwakeKeyb, flags.AwakeKeyb,
flags.BootKeyb, flags.BootKeyb,
flags.SleepKeyb, flags.SleepKeyb,
flags.ShutdownKeyb); flags.ShutdownKeyb);
});
} }
@@ -524,6 +529,7 @@ namespace GHelper
else else
{ {
Debug.WriteLine(color.ToString());
auraDevice.Write(AuraMessage(0, color, color, 0)); auraDevice.Write(AuraMessage(0, color, color, 0));
auraDevice.Write(MESSAGE_SET); auraDevice.Write(MESSAGE_SET);
} }
@@ -531,6 +537,27 @@ namespace GHelper
} }
public static void ApplyGPUColor()
{
if (AppConfig.Get("aura_mode") != GPUMODE) return;
Logger.WriteLine(GPUModeControl.gpuMode.ToString());
switch (GPUModeControl.gpuMode)
{
case AsusACPI.GPUModeUltimate:
ApplyColor(Color.Red, true);
break;
case AsusACPI.GPUModeEco:
ApplyColor(Color.Green, true);
break;
default:
ApplyColor(Color.Yellow, true);
break;
}
}
public static void ApplyAura() public static void ApplyAura()
{ {
@@ -539,56 +566,54 @@ namespace GHelper
SetColor(AppConfig.Get("aura_color")); SetColor(AppConfig.Get("aura_color"));
SetColor2(AppConfig.Get("aura_color2")); SetColor2(AppConfig.Get("aura_color2"));
timer.Enabled = false;
if (Mode == HEATMAP) if (Mode == HEATMAP)
{ {
SetHeatmap(true); SetHeatmap(true);
timer.Enabled = true; timer.Enabled = true;
return; return;
} }
else
if (Mode == GPUMODE)
{ {
timer.Enabled = false; ApplyGPUColor();
return;
} }
Task.Run(async () => int _speed;
switch (Speed)
{ {
case 1:
_speed = 0xeb;
break;
case 2:
_speed = 0xf5;
break;
default:
_speed = 0xe1;
break;
}
byte[] msg;
var devices = GetHidDevices(deviceIds);
int _speed; foreach (HidDevice device in devices)
{
switch (Speed) device.OpenDevice();
if (device.ReadFeatureData(out byte[] data, AURA_HID_ID))
{ {
case 1: msg = AuraMessage(Mode, Color1, Color2, _speed, isSingleColor);
_speed = 0xeb; device.WriteFeatureData(msg);
break; device.WriteFeatureData(MESSAGE_APPLY);
case 2: device.WriteFeatureData(MESSAGE_SET);
_speed = 0xf5; Logger.WriteLine("USB-KB " + device.Attributes.Version + device.Description + device.DevicePath + ":" + BitConverter.ToString(msg));
break;
default:
_speed = 0xe1;
break;
} }
device.CloseDevice();
}
byte[] msg; if (isTuf)
var devices = GetHidDevices(deviceIds); Program.acpi.TUFKeyboardRGB(Mode, Color1, _speed);
foreach (HidDevice device in devices)
{
device.OpenDevice();
if (device.ReadFeatureData(out byte[] data, AURA_HID_ID))
{
msg = AuraMessage(Mode, Color1, Color2, _speed, isSingleColor);
device.WriteFeatureData(msg);
device.WriteFeatureData(MESSAGE_APPLY);
device.WriteFeatureData(MESSAGE_SET);
Logger.WriteLine("USB-KB " + device.Attributes.Version + device.Description + device.DevicePath + ":" + BitConverter.ToString(msg));
}
device.CloseDevice();
}
if (isTuf)
Program.acpi.TUFKeyboardRGB(Mode, Color1, _speed);
});
} }

View File

@@ -1,8 +1,35 @@
using System.Runtime.InteropServices; using System.Collections;
using System.Runtime.InteropServices;
using static GHelper.Display.ScreenInterrogatory; using static GHelper.Display.ScreenInterrogatory;
namespace GHelper.Display namespace GHelper.Display
{ {
class DeviceComparer : IComparer
{
public int Compare(object x, object y)
{
uint displayX = ((DISPLAYCONFIG_TARGET_DEVICE_NAME)x).connectorInstance;
uint displayY = ((DISPLAYCONFIG_TARGET_DEVICE_NAME)y).connectorInstance;
if (displayX > displayY)
return 1;
if (displayX < displayY)
return -1;
else
return 0;
}
}
class ScreenComparer : IComparer
{
public int Compare(object x, object y)
{
int displayX = Int32.Parse(((Screen)x).DeviceName.Replace(@"\\.\DISPLAY", ""));
int displayY = Int32.Parse(((Screen)y).DeviceName.Replace(@"\\.\DISPLAY", ""));
return (new CaseInsensitiveComparer()).Compare(displayX, displayY);
}
}
internal class ScreenNative internal class ScreenNative
{ {
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
@@ -118,38 +145,19 @@ namespace GHelper.Display
public const int ENUM_CURRENT_SETTINGS = -1; public const int ENUM_CURRENT_SETTINGS = -1;
public const string defaultDevice = @"\\.\DISPLAY1"; public const string defaultDevice = @"\\.\DISPLAY1";
static bool? _ultimate = null;
static bool isUltimate
{
get
{
if (_ultimate is null) _ultimate = (Program.acpi.DeviceGet(AsusACPI.GPUMux) == 0);
return (bool)_ultimate;
}
}
public static string? FindLaptopScreen(bool log = false) public static string? FindLaptopScreen(bool log = false)
{ {
string? laptopScreen = null; string? laptopScreen = null;
var screens = Screen.AllScreens; var screens = Screen.AllScreens;
/*
if (!isUltimate)
{
foreach (var screen in screens )
{
if (log) Logger.WriteLine(screen.DeviceName);
if (screen.DeviceName == defaultDevice) return defaultDevice;
}
}
*/
try try
{ {
var devices = GetAllDevices().ToArray(); var devices = GetAllDevices().ToArray();
int count = 0, displayNum = -1; Array.Sort(devices, new DeviceComparer());
Array.Sort(screens, new ScreenComparer());
int count = 0;
string internalName = AppConfig.GetString("internal_display"); string internalName = AppConfig.GetString("internal_display");
@@ -159,21 +167,23 @@ namespace GHelper.Display
device.outputTechnology == DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY.DISPLAYCONFIG_OUTPUT_TECHNOLOGY_DISPLAYPORT_EMBEDDED || device.outputTechnology == DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY.DISPLAYCONFIG_OUTPUT_TECHNOLOGY_DISPLAYPORT_EMBEDDED ||
device.monitorFriendlyDeviceName == internalName) device.monitorFriendlyDeviceName == internalName)
{ {
displayNum = count;
AppConfig.Set("internal_display", device.monitorFriendlyDeviceName); AppConfig.Set("internal_display", device.monitorFriendlyDeviceName);
if (count < screens.Length)
{
laptopScreen = screens[count].DeviceName;
}
else
{
laptopScreen = defaultDevice;
}
} }
if (log) Logger.WriteLine(device.monitorFriendlyDeviceName + ":" + device.outputTechnology.ToString() + ": " + ((count < screens.Length) ? screens[count].DeviceName : ""));
if (log) Logger.WriteLine(device.monitorFriendlyDeviceName + ":" + device.outputTechnology.ToString() + device.connectorInstance.ToString() + ": " + ((count < screens.Length) ? screens[count].DeviceName : ""));
count++; count++;
} }
count = 0;
foreach (var screen in screens)
{
if (count == displayNum) laptopScreen = screen.DeviceName;
count++;
}
if (displayNum > 0 && count == 0) laptopScreen = defaultDevice;
} }
catch (Exception ex) catch (Exception ex)
{ {

24
app/Extra.Designer.cs generated
View File

@@ -103,7 +103,6 @@ namespace GHelper
labelSettings = new Label(); labelSettings = new Label();
panelSettings = new Panel(); panelSettings = new Panel();
checkAutoToggleClamshellMode = new CheckBox(); checkAutoToggleClamshellMode = new CheckBox();
checkAutoApplyWindowsPowerMode = new CheckBox();
checkTopmost = new CheckBox(); checkTopmost = new CheckBox();
checkNoOverdrive = new CheckBox(); checkNoOverdrive = new CheckBox();
checkUSBC = new CheckBox(); checkUSBC = new CheckBox();
@@ -146,7 +145,7 @@ namespace GHelper
panelServices.Controls.Add(labelServices); panelServices.Controls.Add(labelServices);
panelServices.Controls.Add(buttonServices); panelServices.Controls.Add(buttonServices);
panelServices.Dock = DockStyle.Top; panelServices.Dock = DockStyle.Top;
panelServices.Location = new Point(15, 1321); panelServices.Location = new Point(15, 1279);
panelServices.Name = "panelServices"; panelServices.Name = "panelServices";
panelServices.Size = new Size(983, 75); panelServices.Size = new Size(983, 75);
panelServices.TabIndex = 5; panelServices.TabIndex = 5;
@@ -1062,7 +1061,6 @@ namespace GHelper
panelSettings.AutoSize = true; panelSettings.AutoSize = true;
panelSettings.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelSettings.AutoSizeMode = AutoSizeMode.GrowAndShrink;
panelSettings.Controls.Add(checkAutoToggleClamshellMode); panelSettings.Controls.Add(checkAutoToggleClamshellMode);
panelSettings.Controls.Add(checkAutoApplyWindowsPowerMode);
panelSettings.Controls.Add(checkTopmost); panelSettings.Controls.Add(checkTopmost);
panelSettings.Controls.Add(checkNoOverdrive); panelSettings.Controls.Add(checkNoOverdrive);
panelSettings.Controls.Add(checkUSBC); panelSettings.Controls.Add(checkUSBC);
@@ -1073,14 +1071,14 @@ namespace GHelper
panelSettings.Location = new Point(15, 921); panelSettings.Location = new Point(15, 921);
panelSettings.Name = "panelSettings"; panelSettings.Name = "panelSettings";
panelSettings.Padding = new Padding(20, 5, 11, 5); panelSettings.Padding = new Padding(20, 5, 11, 5);
panelSettings.Size = new Size(983, 346); panelSettings.Size = new Size(983, 304);
panelSettings.TabIndex = 3; panelSettings.TabIndex = 3;
// //
// checkAutoToggleClamshellMode // checkAutoToggleClamshellMode
// //
checkAutoToggleClamshellMode.AutoSize = true; checkAutoToggleClamshellMode.AutoSize = true;
checkAutoToggleClamshellMode.Dock = DockStyle.Top; checkAutoToggleClamshellMode.Dock = DockStyle.Top;
checkAutoToggleClamshellMode.Location = new Point(20, 299); checkAutoToggleClamshellMode.Location = new Point(20, 257);
checkAutoToggleClamshellMode.Name = "checkAutoToggleClamshellMode"; checkAutoToggleClamshellMode.Name = "checkAutoToggleClamshellMode";
checkAutoToggleClamshellMode.Padding = new Padding(3); checkAutoToggleClamshellMode.Padding = new Padding(3);
checkAutoToggleClamshellMode.Size = new Size(952, 42); checkAutoToggleClamshellMode.Size = new Size(952, 42);
@@ -1088,19 +1086,6 @@ namespace GHelper
checkAutoToggleClamshellMode.Text = "Auto Toggle Clamshell Mode"; checkAutoToggleClamshellMode.Text = "Auto Toggle Clamshell Mode";
checkAutoToggleClamshellMode.UseVisualStyleBackColor = true; checkAutoToggleClamshellMode.UseVisualStyleBackColor = true;
// //
// checkAutoApplyWindowsPowerMode
//
checkAutoApplyWindowsPowerMode.AutoSize = true;
checkAutoApplyWindowsPowerMode.Dock = DockStyle.Top;
checkAutoApplyWindowsPowerMode.Location = new Point(20, 257);
checkAutoApplyWindowsPowerMode.Margin = new Padding(4, 3, 4, 3);
checkAutoApplyWindowsPowerMode.Name = "checkAutoApplyWindowsPowerMode";
checkAutoApplyWindowsPowerMode.Padding = new Padding(3);
checkAutoApplyWindowsPowerMode.Size = new Size(952, 42);
checkAutoApplyWindowsPowerMode.TabIndex = 7;
checkAutoApplyWindowsPowerMode.Text = "Auto Adjust Windows Power Mode";
checkAutoApplyWindowsPowerMode.UseVisualStyleBackColor = true;
//
// checkTopmost // checkTopmost
// //
checkTopmost.AutoSize = true; checkTopmost.AutoSize = true;
@@ -1185,7 +1170,7 @@ namespace GHelper
panelPower.Controls.Add(labelHibernateAfter); panelPower.Controls.Add(labelHibernateAfter);
panelPower.Controls.Add(pictureHibernate); panelPower.Controls.Add(pictureHibernate);
panelPower.Dock = DockStyle.Top; panelPower.Dock = DockStyle.Top;
panelPower.Location = new Point(15, 1267); panelPower.Location = new Point(15, 1225);
panelPower.Name = "panelPower"; panelPower.Name = "panelPower";
panelPower.Size = new Size(983, 54); panelPower.Size = new Size(983, 54);
panelPower.TabIndex = 4; panelPower.TabIndex = 4;
@@ -1348,7 +1333,6 @@ namespace GHelper
private PictureBox pictureSettings; private PictureBox pictureSettings;
private Label labelSettings; private Label labelSettings;
private Panel panelSettings; private Panel panelSettings;
private CheckBox checkAutoApplyWindowsPowerMode;
private CheckBox checkTopmost; private CheckBox checkTopmost;
private CheckBox checkNoOverdrive; private CheckBox checkNoOverdrive;
private CheckBox checkUSBC; private CheckBox checkUSBC;

View File

@@ -118,7 +118,6 @@ namespace GHelper
checkNoOverdrive.Text = Properties.Strings.DisableOverdrive; checkNoOverdrive.Text = Properties.Strings.DisableOverdrive;
checkTopmost.Text = Properties.Strings.WindowTop; checkTopmost.Text = Properties.Strings.WindowTop;
checkUSBC.Text = Properties.Strings.OptimizedUSBC; checkUSBC.Text = Properties.Strings.OptimizedUSBC;
checkAutoApplyWindowsPowerMode.Text = Properties.Strings.ApplyWindowsPowerPlan;
checkAutoToggleClamshellMode.Text = Properties.Strings.ToggleClamshellMode; checkAutoToggleClamshellMode.Text = Properties.Strings.ToggleClamshellMode;
labelBacklightKeyboard.Text = Properties.Strings.Keyboard; labelBacklightKeyboard.Text = Properties.Strings.Keyboard;
@@ -184,7 +183,6 @@ namespace GHelper
SetKeyCombo(comboFNF4, textFNF4, "paddle"); SetKeyCombo(comboFNF4, textFNF4, "paddle");
} }
else else
{ {
SetKeyCombo(comboM1, textM1, "m1"); SetKeyCombo(comboM1, textM1, "m1");
@@ -198,6 +196,10 @@ namespace GHelper
SetKeyCombo(comboFNE, textFNE, "fne"); SetKeyCombo(comboFNE, textFNE, "fne");
} }
if (AppConfig.IsStrix())
{
labelM4.Text = "M5/ROG";
}
InitTheme(); InitTheme();
@@ -293,9 +295,6 @@ namespace GHelper
checkUSBC.Checked = AppConfig.Is("optimized_usbc"); checkUSBC.Checked = AppConfig.Is("optimized_usbc");
checkUSBC.CheckedChanged += CheckUSBC_CheckedChanged; checkUSBC.CheckedChanged += CheckUSBC_CheckedChanged;
checkAutoApplyWindowsPowerMode.Checked = (AppConfig.Get("auto_apply_power_plan") != 0);
checkAutoApplyWindowsPowerMode.CheckedChanged += checkAutoApplyWindowsPowerMode_CheckedChanged;
sliderBrightness.Value = InputDispatcher.GetBacklight(); sliderBrightness.Value = InputDispatcher.GetBacklight();
sliderBrightness.ValueChanged += SliderBrightness_ValueChanged; sliderBrightness.ValueChanged += SliderBrightness_ValueChanged;
@@ -335,16 +334,10 @@ namespace GHelper
{ {
try try
{ {
Task.Run(() => int hibernate = PowerNative.GetHibernateAfter();
{ if (hibernate < 0 || hibernate > numericHibernateAfter.Maximum) hibernate = 0;
int hibernate = PowerNative.GetHibernateAfter(); numericHibernateAfter.Value = hibernate;
if (hibernate < 0 || hibernate > numericHibernateAfter.Maximum) hibernate = 0; numericHibernateAfter.ValueChanged += NumericHibernateAfter_ValueChanged;
BeginInvoke(delegate
{
numericHibernateAfter.Value = hibernate;
numericHibernateAfter.ValueChanged += NumericHibernateAfter_ValueChanged;
});
});
} }
catch (Exception ex) catch (Exception ex)
@@ -563,10 +556,6 @@ namespace GHelper
Left = Program.settingsForm.Left - Width - 5; Left = Program.settingsForm.Left - Width - 5;
} }
private void checkAutoApplyWindowsPowerMode_CheckedChanged(object? sender, EventArgs e)
{
AppConfig.Set("auto_apply_power_plan", checkAutoApplyWindowsPowerMode.Checked ? 1 : 0);
}
private void checkAutoToggleClamshellMode_CheckedChanged(object? sender, EventArgs e) private void checkAutoToggleClamshellMode_CheckedChanged(object? sender, EventArgs e)
{ {

221
app/Fans.Designer.cs generated
View File

@@ -31,14 +31,14 @@ namespace GHelper
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
ChartArea chartArea1 = new ChartArea(); ChartArea chartArea9 = new ChartArea();
Title title1 = new Title(); Title title9 = new Title();
ChartArea chartArea2 = new ChartArea(); ChartArea chartArea10 = new ChartArea();
Title title2 = new Title(); Title title10 = new Title();
ChartArea chartArea3 = new ChartArea(); ChartArea chartArea11 = new ChartArea();
Title title3 = new Title(); Title title11 = new Title();
ChartArea chartArea4 = new ChartArea(); ChartArea chartArea12 = new ChartArea();
Title title4 = new Title(); Title title12 = new Title();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Fans)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Fans));
panelFans = new Panel(); panelFans = new Panel();
labelTip = new Label(); labelTip = new Label();
@@ -106,6 +106,11 @@ namespace GHelper
panelBoostTitle = new Panel(); panelBoostTitle = new Panel();
pictureBoost = new PictureBox(); pictureBoost = new PictureBox();
labelBoost = new Label(); labelBoost = new Label();
panelPowerMode = new Panel();
comboPowerMode = new RComboBox();
panelPowerModeTItle = new Panel();
picturePowerMode = new PictureBox();
labelPowerModeTitle = new Label();
panelGPU = new Panel(); panelGPU = new Panel();
panelGPUTemp = new Panel(); panelGPUTemp = new Panel();
labelGPUTemp = new Label(); labelGPUTemp = new Label();
@@ -131,6 +136,10 @@ namespace GHelper
buttonAdvanced = new RButton(); buttonAdvanced = new RButton();
buttonGPU = new RButton(); buttonGPU = new RButton();
buttonCPU = new RButton(); buttonCPU = new RButton();
panelGPUClockLimit = new Panel();
labelGPUClockLimit = new Label();
trackGPUClockLimit = new TrackBar();
labelGPUClockLimitTitle = new Label();
panelFans.SuspendLayout(); panelFans.SuspendLayout();
tableFanCharts.SuspendLayout(); tableFanCharts.SuspendLayout();
((System.ComponentModel.ISupportInitialize)chartGPU).BeginInit(); ((System.ComponentModel.ISupportInitialize)chartGPU).BeginInit();
@@ -167,6 +176,9 @@ namespace GHelper
panelBoost.SuspendLayout(); panelBoost.SuspendLayout();
panelBoostTitle.SuspendLayout(); panelBoostTitle.SuspendLayout();
((System.ComponentModel.ISupportInitialize)pictureBoost).BeginInit(); ((System.ComponentModel.ISupportInitialize)pictureBoost).BeginInit();
panelPowerMode.SuspendLayout();
panelPowerModeTItle.SuspendLayout();
((System.ComponentModel.ISupportInitialize)picturePowerMode).BeginInit();
panelGPU.SuspendLayout(); panelGPU.SuspendLayout();
panelGPUTemp.SuspendLayout(); panelGPUTemp.SuspendLayout();
((System.ComponentModel.ISupportInitialize)trackGPUTemp).BeginInit(); ((System.ComponentModel.ISupportInitialize)trackGPUTemp).BeginInit();
@@ -180,6 +192,8 @@ namespace GHelper
((System.ComponentModel.ISupportInitialize)pictureGPU).BeginInit(); ((System.ComponentModel.ISupportInitialize)pictureGPU).BeginInit();
panelNav.SuspendLayout(); panelNav.SuspendLayout();
tableNav.SuspendLayout(); tableNav.SuspendLayout();
panelGPUClockLimit.SuspendLayout();
((System.ComponentModel.ISupportInitialize)trackGPUClockLimit).BeginInit();
SuspendLayout(); SuspendLayout();
// //
// panelFans // panelFans
@@ -236,8 +250,8 @@ namespace GHelper
// //
// chartGPU // chartGPU
// //
chartArea1.Name = "ChartArea1"; chartArea9.Name = "ChartArea1";
chartGPU.ChartAreas.Add(chartArea1); chartGPU.ChartAreas.Add(chartArea9);
chartGPU.Dock = DockStyle.Fill; chartGPU.Dock = DockStyle.Fill;
chartGPU.Location = new Point(12, 491); chartGPU.Location = new Point(12, 491);
chartGPU.Margin = new Padding(2, 10, 2, 10); chartGPU.Margin = new Padding(2, 10, 2, 10);
@@ -245,13 +259,13 @@ namespace GHelper
chartGPU.Size = new Size(782, 461); chartGPU.Size = new Size(782, 461);
chartGPU.TabIndex = 17; chartGPU.TabIndex = 17;
chartGPU.Text = "chartGPU"; chartGPU.Text = "chartGPU";
title1.Name = "Title1"; title9.Name = "Title1";
chartGPU.Titles.Add(title1); chartGPU.Titles.Add(title9);
// //
// chartCPU // chartCPU
// //
chartArea2.Name = "ChartArea1"; chartArea10.Name = "ChartArea1";
chartCPU.ChartAreas.Add(chartArea2); chartCPU.ChartAreas.Add(chartArea10);
chartCPU.Dock = DockStyle.Fill; chartCPU.Dock = DockStyle.Fill;
chartCPU.Location = new Point(12, 10); chartCPU.Location = new Point(12, 10);
chartCPU.Margin = new Padding(2, 10, 2, 10); chartCPU.Margin = new Padding(2, 10, 2, 10);
@@ -259,13 +273,13 @@ namespace GHelper
chartCPU.Size = new Size(782, 461); chartCPU.Size = new Size(782, 461);
chartCPU.TabIndex = 14; chartCPU.TabIndex = 14;
chartCPU.Text = "chartCPU"; chartCPU.Text = "chartCPU";
title2.Name = "Title1"; title10.Name = "Title1";
chartCPU.Titles.Add(title2); chartCPU.Titles.Add(title10);
// //
// chartXGM // chartXGM
// //
chartArea3.Name = "ChartAreaXGM"; chartArea11.Name = "ChartAreaXGM";
chartXGM.ChartAreas.Add(chartArea3); chartXGM.ChartAreas.Add(chartArea11);
chartXGM.Dock = DockStyle.Fill; chartXGM.Dock = DockStyle.Fill;
chartXGM.Location = new Point(12, 1453); chartXGM.Location = new Point(12, 1453);
chartXGM.Margin = new Padding(2, 10, 2, 10); chartXGM.Margin = new Padding(2, 10, 2, 10);
@@ -273,14 +287,14 @@ namespace GHelper
chartXGM.Size = new Size(782, 464); chartXGM.Size = new Size(782, 464);
chartXGM.TabIndex = 14; chartXGM.TabIndex = 14;
chartXGM.Text = "chartXGM"; chartXGM.Text = "chartXGM";
title3.Name = "Title4"; title11.Name = "Title4";
chartXGM.Titles.Add(title3); chartXGM.Titles.Add(title11);
chartXGM.Visible = false; chartXGM.Visible = false;
// //
// chartMid // chartMid
// //
chartArea4.Name = "ChartArea3"; chartArea12.Name = "ChartArea3";
chartMid.ChartAreas.Add(chartArea4); chartMid.ChartAreas.Add(chartArea12);
chartMid.Dock = DockStyle.Fill; chartMid.Dock = DockStyle.Fill;
chartMid.Location = new Point(12, 972); chartMid.Location = new Point(12, 972);
chartMid.Margin = new Padding(2, 10, 2, 10); chartMid.Margin = new Padding(2, 10, 2, 10);
@@ -288,8 +302,8 @@ namespace GHelper
chartMid.Size = new Size(782, 461); chartMid.Size = new Size(782, 461);
chartMid.TabIndex = 14; chartMid.TabIndex = 14;
chartMid.Text = "chartMid"; chartMid.Text = "chartMid";
title4.Name = "Title3"; title12.Name = "Title3";
chartMid.Titles.Add(title4); chartMid.Titles.Add(title12);
chartMid.Visible = false; chartMid.Visible = false;
// //
// panelTitleFans // panelTitleFans
@@ -491,7 +505,7 @@ namespace GHelper
panelAdvanced.Controls.Add(panelTemperature); panelAdvanced.Controls.Add(panelTemperature);
panelAdvanced.Controls.Add(panelTitleTemp); panelAdvanced.Controls.Add(panelTitleTemp);
panelAdvanced.Dock = DockStyle.Top; panelAdvanced.Dock = DockStyle.Top;
panelAdvanced.Location = new Point(10, 1272); panelAdvanced.Location = new Point(10, 1520);
panelAdvanced.Name = "panelAdvanced"; panelAdvanced.Name = "panelAdvanced";
panelAdvanced.Size = new Size(520, 888); panelAdvanced.Size = new Size(520, 888);
panelAdvanced.TabIndex = 14; panelAdvanced.TabIndex = 14;
@@ -786,11 +800,13 @@ namespace GHelper
panelPower.Controls.Add(panelTitleCPU); panelPower.Controls.Add(panelTitleCPU);
panelPower.Controls.Add(panelBoost); panelPower.Controls.Add(panelBoost);
panelPower.Controls.Add(panelBoostTitle); panelPower.Controls.Add(panelBoostTitle);
panelPower.Controls.Add(panelPowerMode);
panelPower.Controls.Add(panelPowerModeTItle);
panelPower.Dock = DockStyle.Top; panelPower.Dock = DockStyle.Top;
panelPower.Location = new Point(10, 640); panelPower.Location = new Point(10, 764);
panelPower.Margin = new Padding(4); panelPower.Margin = new Padding(4);
panelPower.Name = "panelPower"; panelPower.Name = "panelPower";
panelPower.Size = new Size(520, 632); panelPower.Size = new Size(520, 756);
panelPower.TabIndex = 43; panelPower.TabIndex = 43;
// //
// panelApplyPower // panelApplyPower
@@ -798,7 +814,7 @@ namespace GHelper
panelApplyPower.AutoSize = true; panelApplyPower.AutoSize = true;
panelApplyPower.Controls.Add(checkApplyPower); panelApplyPower.Controls.Add(checkApplyPower);
panelApplyPower.Dock = DockStyle.Top; panelApplyPower.Dock = DockStyle.Top;
panelApplyPower.Location = new Point(0, 556); panelApplyPower.Location = new Point(0, 680);
panelApplyPower.Name = "panelApplyPower"; panelApplyPower.Name = "panelApplyPower";
panelApplyPower.Padding = new Padding(15); panelApplyPower.Padding = new Padding(15);
panelApplyPower.Size = new Size(520, 76); panelApplyPower.Size = new Size(520, 76);
@@ -825,7 +841,7 @@ namespace GHelper
panelB0.Controls.Add(labelLeftB0); panelB0.Controls.Add(labelLeftB0);
panelB0.Controls.Add(trackB0); panelB0.Controls.Add(trackB0);
panelB0.Dock = DockStyle.Top; panelB0.Dock = DockStyle.Top;
panelB0.Location = new Point(0, 432); panelB0.Location = new Point(0, 556);
panelB0.Margin = new Padding(4); panelB0.Margin = new Padding(4);
panelB0.MaximumSize = new Size(0, 124); panelB0.MaximumSize = new Size(0, 124);
panelB0.Name = "panelB0"; panelB0.Name = "panelB0";
@@ -874,7 +890,7 @@ namespace GHelper
panelC1.Controls.Add(labelLeftC1); panelC1.Controls.Add(labelLeftC1);
panelC1.Controls.Add(trackC1); panelC1.Controls.Add(trackC1);
panelC1.Dock = DockStyle.Top; panelC1.Dock = DockStyle.Top;
panelC1.Location = new Point(0, 308); panelC1.Location = new Point(0, 432);
panelC1.Margin = new Padding(4); panelC1.Margin = new Padding(4);
panelC1.MaximumSize = new Size(0, 124); panelC1.MaximumSize = new Size(0, 124);
panelC1.Name = "panelC1"; panelC1.Name = "panelC1";
@@ -923,7 +939,7 @@ namespace GHelper
panelA0.Controls.Add(labelLeftA0); panelA0.Controls.Add(labelLeftA0);
panelA0.Controls.Add(trackA0); panelA0.Controls.Add(trackA0);
panelA0.Dock = DockStyle.Top; panelA0.Dock = DockStyle.Top;
panelA0.Location = new Point(0, 184); panelA0.Location = new Point(0, 308);
panelA0.Margin = new Padding(4); panelA0.Margin = new Padding(4);
panelA0.MaximumSize = new Size(0, 124); panelA0.MaximumSize = new Size(0, 124);
panelA0.Name = "panelA0"; panelA0.Name = "panelA0";
@@ -971,7 +987,7 @@ namespace GHelper
panelTitleCPU.Controls.Add(pictureBoxCPU); panelTitleCPU.Controls.Add(pictureBoxCPU);
panelTitleCPU.Controls.Add(labelPowerLimits); panelTitleCPU.Controls.Add(labelPowerLimits);
panelTitleCPU.Dock = DockStyle.Top; panelTitleCPU.Dock = DockStyle.Top;
panelTitleCPU.Location = new Point(0, 124); panelTitleCPU.Location = new Point(0, 248);
panelTitleCPU.Margin = new Padding(4); panelTitleCPU.Margin = new Padding(4);
panelTitleCPU.Name = "panelTitleCPU"; panelTitleCPU.Name = "panelTitleCPU";
panelTitleCPU.Size = new Size(520, 60); panelTitleCPU.Size = new Size(520, 60);
@@ -1004,7 +1020,7 @@ namespace GHelper
// //
panelBoost.Controls.Add(comboBoost); panelBoost.Controls.Add(comboBoost);
panelBoost.Dock = DockStyle.Top; panelBoost.Dock = DockStyle.Top;
panelBoost.Location = new Point(0, 60); panelBoost.Location = new Point(0, 184);
panelBoost.Margin = new Padding(4); panelBoost.Margin = new Padding(4);
panelBoost.Name = "panelBoost"; panelBoost.Name = "panelBoost";
panelBoost.Size = new Size(520, 64); panelBoost.Size = new Size(520, 64);
@@ -1017,7 +1033,7 @@ namespace GHelper
panelBoostTitle.Controls.Add(pictureBoost); panelBoostTitle.Controls.Add(pictureBoost);
panelBoostTitle.Controls.Add(labelBoost); panelBoostTitle.Controls.Add(labelBoost);
panelBoostTitle.Dock = DockStyle.Top; panelBoostTitle.Dock = DockStyle.Top;
panelBoostTitle.Location = new Point(0, 0); panelBoostTitle.Location = new Point(0, 124);
panelBoostTitle.Margin = new Padding(4); panelBoostTitle.Margin = new Padding(4);
panelBoostTitle.Name = "panelBoostTitle"; panelBoostTitle.Name = "panelBoostTitle";
panelBoostTitle.Size = new Size(520, 60); panelBoostTitle.Size = new Size(520, 60);
@@ -1046,6 +1062,66 @@ namespace GHelper
labelBoost.TabIndex = 39; labelBoost.TabIndex = 39;
labelBoost.Text = "CPU Boost"; labelBoost.Text = "CPU Boost";
// //
// panelPowerMode
//
panelPowerMode.Controls.Add(comboPowerMode);
panelPowerMode.Dock = DockStyle.Top;
panelPowerMode.Location = new Point(0, 60);
panelPowerMode.Margin = new Padding(4);
panelPowerMode.Name = "panelPowerMode";
panelPowerMode.Size = new Size(520, 64);
panelPowerMode.TabIndex = 49;
//
// comboPowerMode
//
comboPowerMode.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
comboPowerMode.BorderColor = Color.White;
comboPowerMode.ButtonColor = Color.FromArgb(255, 255, 255);
comboPowerMode.DropDownStyle = ComboBoxStyle.DropDownList;
comboPowerMode.FormattingEnabled = true;
comboPowerMode.Items.AddRange(new object[] { "Disabled", "Enabled", "Aggressive", "Efficient Enabled", "Efficient Aggressive", "Aggressive at Guaranteed", "Efficient at Guaranteed" });
comboPowerMode.Location = new Point(13, 12);
comboPowerMode.Margin = new Padding(4);
comboPowerMode.Name = "comboPowerMode";
comboPowerMode.Size = new Size(329, 40);
comboPowerMode.TabIndex = 42;
//
// panelPowerModeTItle
//
panelPowerModeTItle.AutoSize = true;
panelPowerModeTItle.AutoSizeMode = AutoSizeMode.GrowAndShrink;
panelPowerModeTItle.Controls.Add(picturePowerMode);
panelPowerModeTItle.Controls.Add(labelPowerModeTitle);
panelPowerModeTItle.Dock = DockStyle.Top;
panelPowerModeTItle.Location = new Point(0, 0);
panelPowerModeTItle.Margin = new Padding(4);
panelPowerModeTItle.Name = "panelPowerModeTItle";
panelPowerModeTItle.Size = new Size(520, 60);
panelPowerModeTItle.TabIndex = 50;
//
// picturePowerMode
//
picturePowerMode.BackgroundImage = Properties.Resources.icons8_gauge_32;
picturePowerMode.BackgroundImageLayout = ImageLayout.Zoom;
picturePowerMode.InitialImage = null;
picturePowerMode.Location = new Point(10, 18);
picturePowerMode.Margin = new Padding(4, 2, 4, 10);
picturePowerMode.Name = "picturePowerMode";
picturePowerMode.Size = new Size(32, 32);
picturePowerMode.TabIndex = 40;
picturePowerMode.TabStop = false;
//
// labelPowerModeTitle
//
labelPowerModeTitle.AutoSize = true;
labelPowerModeTitle.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
labelPowerModeTitle.Location = new Point(46, 18);
labelPowerModeTitle.Margin = new Padding(4, 0, 4, 0);
labelPowerModeTitle.Name = "labelPowerModeTitle";
labelPowerModeTitle.Size = new Size(271, 32);
labelPowerModeTitle.TabIndex = 39;
labelPowerModeTitle.Text = "Windows Power Mode";
//
// panelGPU // panelGPU
// //
panelGPU.AutoSize = true; panelGPU.AutoSize = true;
@@ -1053,13 +1129,14 @@ namespace GHelper
panelGPU.Controls.Add(panelGPUBoost); panelGPU.Controls.Add(panelGPUBoost);
panelGPU.Controls.Add(panelGPUMemory); panelGPU.Controls.Add(panelGPUMemory);
panelGPU.Controls.Add(panelGPUCore); panelGPU.Controls.Add(panelGPUCore);
panelGPU.Controls.Add(panelGPUClockLimit);
panelGPU.Controls.Add(panelTitleGPU); panelGPU.Controls.Add(panelTitleGPU);
panelGPU.Dock = DockStyle.Top; panelGPU.Dock = DockStyle.Top;
panelGPU.Location = new Point(10, 66); panelGPU.Location = new Point(10, 66);
panelGPU.Margin = new Padding(4); panelGPU.Margin = new Padding(4);
panelGPU.Name = "panelGPU"; panelGPU.Name = "panelGPU";
panelGPU.Padding = new Padding(0, 0, 0, 18); panelGPU.Padding = new Padding(0, 0, 0, 18);
panelGPU.Size = new Size(520, 574); panelGPU.Size = new Size(520, 698);
panelGPU.TabIndex = 44; panelGPU.TabIndex = 44;
panelGPU.Visible = false; panelGPU.Visible = false;
// //
@@ -1071,7 +1148,7 @@ namespace GHelper
panelGPUTemp.Controls.Add(labelGPUTempTitle); panelGPUTemp.Controls.Add(labelGPUTempTitle);
panelGPUTemp.Controls.Add(trackGPUTemp); panelGPUTemp.Controls.Add(trackGPUTemp);
panelGPUTemp.Dock = DockStyle.Top; panelGPUTemp.Dock = DockStyle.Top;
panelGPUTemp.Location = new Point(0, 432); panelGPUTemp.Location = new Point(0, 556);
panelGPUTemp.Margin = new Padding(4); panelGPUTemp.Margin = new Padding(4);
panelGPUTemp.MaximumSize = new Size(0, 124); panelGPUTemp.MaximumSize = new Size(0, 124);
panelGPUTemp.Name = "panelGPUTemp"; panelGPUTemp.Name = "panelGPUTemp";
@@ -1120,7 +1197,7 @@ namespace GHelper
panelGPUBoost.Controls.Add(labelGPUBoostTitle); panelGPUBoost.Controls.Add(labelGPUBoostTitle);
panelGPUBoost.Controls.Add(trackGPUBoost); panelGPUBoost.Controls.Add(trackGPUBoost);
panelGPUBoost.Dock = DockStyle.Top; panelGPUBoost.Dock = DockStyle.Top;
panelGPUBoost.Location = new Point(0, 308); panelGPUBoost.Location = new Point(0, 432);
panelGPUBoost.Margin = new Padding(4); panelGPUBoost.Margin = new Padding(4);
panelGPUBoost.MaximumSize = new Size(0, 124); panelGPUBoost.MaximumSize = new Size(0, 124);
panelGPUBoost.Name = "panelGPUBoost"; panelGPUBoost.Name = "panelGPUBoost";
@@ -1169,7 +1246,7 @@ namespace GHelper
panelGPUMemory.Controls.Add(labelGPUMemoryTitle); panelGPUMemory.Controls.Add(labelGPUMemoryTitle);
panelGPUMemory.Controls.Add(trackGPUMemory); panelGPUMemory.Controls.Add(trackGPUMemory);
panelGPUMemory.Dock = DockStyle.Top; panelGPUMemory.Dock = DockStyle.Top;
panelGPUMemory.Location = new Point(0, 184); panelGPUMemory.Location = new Point(0, 308);
panelGPUMemory.Margin = new Padding(4); panelGPUMemory.Margin = new Padding(4);
panelGPUMemory.MaximumSize = new Size(0, 124); panelGPUMemory.MaximumSize = new Size(0, 124);
panelGPUMemory.Name = "panelGPUMemory"; panelGPUMemory.Name = "panelGPUMemory";
@@ -1218,7 +1295,7 @@ namespace GHelper
panelGPUCore.Controls.Add(trackGPUCore); panelGPUCore.Controls.Add(trackGPUCore);
panelGPUCore.Controls.Add(labelGPUCoreTitle); panelGPUCore.Controls.Add(labelGPUCoreTitle);
panelGPUCore.Dock = DockStyle.Top; panelGPUCore.Dock = DockStyle.Top;
panelGPUCore.Location = new Point(0, 60); panelGPUCore.Location = new Point(0, 184);
panelGPUCore.Margin = new Padding(4); panelGPUCore.Margin = new Padding(4);
panelGPUCore.MaximumSize = new Size(0, 124); panelGPUCore.MaximumSize = new Size(0, 124);
panelGPUCore.Name = "panelGPUCore"; panelGPUCore.Name = "panelGPUCore";
@@ -1382,6 +1459,56 @@ namespace GHelper
buttonCPU.TextImageRelation = TextImageRelation.ImageBeforeText; buttonCPU.TextImageRelation = TextImageRelation.ImageBeforeText;
buttonCPU.UseVisualStyleBackColor = false; buttonCPU.UseVisualStyleBackColor = false;
// //
// panelGPUClockLimit
//
panelGPUClockLimit.AutoSize = true;
panelGPUClockLimit.AutoSizeMode = AutoSizeMode.GrowAndShrink;
panelGPUClockLimit.Controls.Add(labelGPUClockLimit);
panelGPUClockLimit.Controls.Add(trackGPUClockLimit);
panelGPUClockLimit.Controls.Add(labelGPUClockLimitTitle);
panelGPUClockLimit.Dock = DockStyle.Top;
panelGPUClockLimit.Location = new Point(0, 60);
panelGPUClockLimit.Margin = new Padding(4);
panelGPUClockLimit.MaximumSize = new Size(0, 124);
panelGPUClockLimit.Name = "panelGPUClockLimit";
panelGPUClockLimit.Size = new Size(520, 124);
panelGPUClockLimit.TabIndex = 48;
//
// labelGPUClockLimit
//
labelGPUClockLimit.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
labelGPUClockLimit.Location = new Point(326, 16);
labelGPUClockLimit.Margin = new Padding(4, 0, 4, 0);
labelGPUClockLimit.Name = "labelGPUClockLimit";
labelGPUClockLimit.Size = new Size(176, 32);
labelGPUClockLimit.TabIndex = 29;
labelGPUClockLimit.Text = "1500 MHz";
labelGPUClockLimit.TextAlign = ContentAlignment.TopRight;
//
// trackGPUClockLimit
//
trackGPUClockLimit.LargeChange = 100;
trackGPUClockLimit.Location = new Point(6, 48);
trackGPUClockLimit.Margin = new Padding(4, 2, 4, 2);
trackGPUClockLimit.Maximum = 3000;
trackGPUClockLimit.Name = "trackGPUClockLimit";
trackGPUClockLimit.RightToLeft = RightToLeft.No;
trackGPUClockLimit.Size = new Size(496, 90);
trackGPUClockLimit.SmallChange = 10;
trackGPUClockLimit.TabIndex = 18;
trackGPUClockLimit.TickFrequency = 50;
trackGPUClockLimit.TickStyle = TickStyle.TopLeft;
//
// labelGPUClockLimitTitle
//
labelGPUClockLimitTitle.AutoSize = true;
labelGPUClockLimitTitle.Location = new Point(10, 16);
labelGPUClockLimitTitle.Margin = new Padding(4, 0, 4, 0);
labelGPUClockLimitTitle.Name = "labelGPUClockLimitTitle";
labelGPUClockLimitTitle.Size = new Size(188, 32);
labelGPUClockLimitTitle.TabIndex = 17;
labelGPUClockLimitTitle.Text = "Core Clock Limit";
//
// Fans // Fans
// //
AutoScaleDimensions = new SizeF(192F, 192F); AutoScaleDimensions = new SizeF(192F, 192F);
@@ -1452,6 +1579,10 @@ namespace GHelper
panelBoostTitle.ResumeLayout(false); panelBoostTitle.ResumeLayout(false);
panelBoostTitle.PerformLayout(); panelBoostTitle.PerformLayout();
((System.ComponentModel.ISupportInitialize)pictureBoost).EndInit(); ((System.ComponentModel.ISupportInitialize)pictureBoost).EndInit();
panelPowerMode.ResumeLayout(false);
panelPowerModeTItle.ResumeLayout(false);
panelPowerModeTItle.PerformLayout();
((System.ComponentModel.ISupportInitialize)picturePowerMode).EndInit();
panelGPU.ResumeLayout(false); panelGPU.ResumeLayout(false);
panelGPU.PerformLayout(); panelGPU.PerformLayout();
panelGPUTemp.ResumeLayout(false); panelGPUTemp.ResumeLayout(false);
@@ -1471,6 +1602,9 @@ namespace GHelper
((System.ComponentModel.ISupportInitialize)pictureGPU).EndInit(); ((System.ComponentModel.ISupportInitialize)pictureGPU).EndInit();
panelNav.ResumeLayout(false); panelNav.ResumeLayout(false);
tableNav.ResumeLayout(false); tableNav.ResumeLayout(false);
panelGPUClockLimit.ResumeLayout(false);
panelGPUClockLimit.PerformLayout();
((System.ComponentModel.ISupportInitialize)trackGPUClockLimit).EndInit();
ResumeLayout(false); ResumeLayout(false);
PerformLayout(); PerformLayout();
} }
@@ -1568,5 +1702,14 @@ namespace GHelper
private TrackBar trackTemp; private TrackBar trackTemp;
private Panel panelAdvancedAlways; private Panel panelAdvancedAlways;
private RCheckBox checkApplyUV; private RCheckBox checkApplyUV;
private Panel panelPowerMode;
private RComboBox comboPowerMode;
private Panel panelPowerModeTItle;
private PictureBox picturePowerMode;
private Label labelPowerModeTitle;
private Panel panelGPUClockLimit;
private Label labelGPUClockLimit;
private TrackBar trackGPUClockLimit;
private Label labelGPUClockLimitTitle;
} }
} }

View File

@@ -109,6 +109,9 @@ namespace GHelper
checkApplyFans.Click += CheckApplyFans_Click; checkApplyFans.Click += CheckApplyFans_Click;
checkApplyPower.Click += CheckApplyPower_Click; checkApplyPower.Click += CheckApplyPower_Click;
trackGPUClockLimit.Minimum = NvidiaGpuControl.MinClockLimit;
trackGPUClockLimit.Maximum = NvidiaGpuControl.MaxClockLimit;
trackGPUCore.Minimum = NvidiaGpuControl.MinCoreOffset; trackGPUCore.Minimum = NvidiaGpuControl.MinCoreOffset;
trackGPUCore.Maximum = NvidiaGpuControl.MaxCoreOffset; trackGPUCore.Maximum = NvidiaGpuControl.MaxCoreOffset;
@@ -121,6 +124,7 @@ namespace GHelper
trackGPUTemp.Minimum = AsusACPI.MinGPUTemp; trackGPUTemp.Minimum = AsusACPI.MinGPUTemp;
trackGPUTemp.Maximum = AsusACPI.MaxGPUTemp; trackGPUTemp.Maximum = AsusACPI.MaxGPUTemp;
trackGPUClockLimit.Scroll += trackGPUClockLimit_Scroll;
trackGPUCore.Scroll += trackGPU_Scroll; trackGPUCore.Scroll += trackGPU_Scroll;
trackGPUMemory.Scroll += trackGPU_Scroll; trackGPUMemory.Scroll += trackGPU_Scroll;
@@ -131,6 +135,7 @@ namespace GHelper
trackGPUMemory.MouseUp += TrackGPU_MouseUp; trackGPUMemory.MouseUp += TrackGPU_MouseUp;
trackGPUBoost.MouseUp += TrackGPU_MouseUp; trackGPUBoost.MouseUp += TrackGPU_MouseUp;
trackGPUTemp.MouseUp += TrackGPU_MouseUp; trackGPUTemp.MouseUp += TrackGPU_MouseUp;
trackGPUClockLimit.MouseUp += TrackGPU_MouseUp;
//labelInfo.MaximumSize = new Size(280, 0); //labelInfo.MaximumSize = new Size(280, 0);
labelFansResult.Visible = false; labelFansResult.Visible = false;
@@ -145,11 +150,17 @@ namespace GHelper
trackTemp.Minimum = RyzenControl.MinTemp; trackTemp.Minimum = RyzenControl.MinTemp;
trackTemp.Maximum = RyzenControl.MaxTemp; trackTemp.Maximum = RyzenControl.MaxTemp;
comboPowerMode.DropDownStyle = ComboBoxStyle.DropDownList;
comboPowerMode.DataSource = new BindingSource(PowerNative.powerModes, null);
comboPowerMode.DisplayMember = "Value";
comboPowerMode.ValueMember = "Key";
FillModes(); FillModes();
InitAll(); InitAll();
comboBoost.SelectedValueChanged += ComboBoost_Changed; comboBoost.SelectedValueChanged += ComboBoost_Changed;
comboPowerMode.SelectedValueChanged += ComboPowerMode_Changed;
comboModes.SelectionChangeCommitted += ComboModes_SelectedValueChanged; comboModes.SelectionChangeCommitted += ComboModes_SelectedValueChanged;
comboModes.TextChanged += ComboModes_TextChanged; comboModes.TextChanged += ComboModes_TextChanged;
@@ -201,7 +212,7 @@ namespace GHelper
InitMode(); InitMode();
InitFans(); InitFans();
InitPower(); InitPower();
InitBoost(); InitPowerPlan();
InitUV(); InitUV();
InitGPU(); InitGPU();
} }
@@ -429,24 +440,29 @@ namespace GHelper
int gpu_boost = AppConfig.GetMode("gpu_boost"); int gpu_boost = AppConfig.GetMode("gpu_boost");
int gpu_temp = AppConfig.GetMode("gpu_temp"); int gpu_temp = AppConfig.GetMode("gpu_temp");
int core = AppConfig.GetMode("gpu_core"); int core = AppConfig.GetMode("gpu_core");
int memory = AppConfig.GetMode("gpu_memory"); int memory = AppConfig.GetMode("gpu_memory");
int clock_limit = AppConfig.GetMode("gpu_clock_limit");
if (gpu_boost < 0) gpu_boost = AsusACPI.MaxGPUBoost; if (gpu_boost < 0) gpu_boost = AsusACPI.MaxGPUBoost;
if (gpu_temp < 0) gpu_temp = AsusACPI.MaxGPUTemp; if (gpu_temp < 0) gpu_temp = AsusACPI.MaxGPUTemp;
if (core == -1) core = 0; if (core == -1) core = 0;
if (memory == -1) memory = 0; if (memory == -1) memory = 0;
if (clock_limit == -1) clock_limit = NvidiaGpuControl.MaxClockLimit;
//if (readClocks) if (nvControl.GetClocks(out int current_core, out int current_memory))
//{
int status = nvControl.GetClocks(out int current_core, out int current_memory);
if (status != -1)
{ {
core = current_core; core = current_core;
memory = current_memory; memory = current_memory;
} }
int _clockLimit = nvControl.GetMaxGPUCLock();
if (_clockLimit == 0) clock_limit = NvidiaGpuControl.MaxClockLimit;
else if (_clockLimit > 0) clock_limit = _clockLimit;
try try
{ {
labelGPU.Text = nvControl.FullName; labelGPU.Text = nvControl.FullName;
@@ -457,6 +473,7 @@ namespace GHelper
} }
//} //}
trackGPUClockLimit.Value = Math.Max(Math.Min(clock_limit, NvidiaGpuControl.MaxClockLimit), NvidiaGpuControl.MinClockLimit);
trackGPUCore.Value = Math.Max(Math.Min(core, NvidiaGpuControl.MaxCoreOffset), NvidiaGpuControl.MinCoreOffset); trackGPUCore.Value = Math.Max(Math.Min(core, NvidiaGpuControl.MaxCoreOffset), NvidiaGpuControl.MinCoreOffset);
trackGPUMemory.Value = Math.Max(Math.Min(memory, NvidiaGpuControl.MaxMemoryOffset), NvidiaGpuControl.MinMemoryOffset); trackGPUMemory.Value = Math.Max(Math.Min(memory, NvidiaGpuControl.MaxMemoryOffset), NvidiaGpuControl.MinMemoryOffset);
@@ -482,8 +499,24 @@ namespace GHelper
{ {
labelGPUCore.Text = $"{trackGPUCore.Value} MHz"; labelGPUCore.Text = $"{trackGPUCore.Value} MHz";
labelGPUMemory.Text = $"{trackGPUMemory.Value} MHz"; labelGPUMemory.Text = $"{trackGPUMemory.Value} MHz";
labelGPUBoost.Text = $"{trackGPUBoost.Value}W"; labelGPUBoost.Text = $"{trackGPUBoost.Value}W";
labelGPUTemp.Text = $"{trackGPUTemp.Value}°C"; labelGPUTemp.Text = $"{trackGPUTemp.Value}°C";
if (trackGPUClockLimit.Value >= NvidiaGpuControl.MaxClockLimit)
labelGPUClockLimit.Text = "Default";
else
labelGPUClockLimit.Text = $"{trackGPUClockLimit.Value} MHz";
}
private void trackGPUClockLimit_Scroll(object? sender, EventArgs e)
{
int maxClock = (int)Math.Round((float)trackGPUClockLimit.Value / 50) * 50;
trackGPUClockLimit.Value = maxClock;
AppConfig.SetMode("gpu_clock_limit", maxClock);
VisualiseGPUSettings();
} }
private void trackGPU_Scroll(object? sender, EventArgs e) private void trackGPU_Scroll(object? sender, EventArgs e)
@@ -495,6 +528,7 @@ namespace GHelper
AppConfig.SetMode("gpu_core", trackGPUCore.Value); AppConfig.SetMode("gpu_core", trackGPUCore.Value);
AppConfig.SetMode("gpu_memory", trackGPUMemory.Value); AppConfig.SetMode("gpu_memory", trackGPUMemory.Value);
VisualiseGPUSettings(); VisualiseGPUSettings();
} }
@@ -512,7 +546,7 @@ namespace GHelper
if (percentage == 0) return "OFF"; if (percentage == 0) return "OFF";
int Max = MaxRPM; int Max = MaxRPM;
if (device == AsusFan.XGM ) Max = 72; if (device == AsusFan.XGM) Max = 72;
return (200 * Math.Round((float)(MinRPM * 100 + (Max - MinRPM) * percentage) / 200)).ToString() + unit; return (200 * Math.Round((float)(MinRPM * 100 + (Max - MinRPM) * percentage) / 200)).ToString() + unit;
} }
@@ -594,11 +628,26 @@ namespace GHelper
} }
public void InitBoost() public void InitPowerPlan()
{ {
int boost = PowerNative.GetCPUBoost(); int boost = PowerNative.GetCPUBoost();
if (boost >= 0) if (boost >= 0)
comboBoost.SelectedIndex = Math.Min(boost, comboBoost.Items.Count - 1); comboBoost.SelectedIndex = Math.Min(boost, comboBoost.Items.Count - 1);
string powerMode = PowerNative.GetPowerMode();
comboPowerMode.SelectedValue = powerMode;
}
private void ComboPowerMode_Changed(object? sender, EventArgs e)
{
string powerMode = (string)comboPowerMode.SelectedValue;
PowerNative.SetPowerMode(powerMode);
if (PowerNative.GetDefaultPowerMode(Modes.GetCurrentBase()) != powerMode)
AppConfig.SetMode("powermode", powerMode);
else
AppConfig.RemoveMode("powermode");
} }
private void ComboBoost_Changed(object? sender, EventArgs e) private void ComboBoost_Changed(object? sender, EventArgs e)
@@ -871,18 +920,24 @@ namespace GHelper
modeControl.ResetPerformanceMode(); modeControl.ResetPerformanceMode();
InitPowerPlan();
if (Program.acpi.IsXGConnected()) AsusUSB.ResetXGM(); if (Program.acpi.IsXGConnected()) AsusUSB.ResetXGM();
if (gpuVisible) if (gpuVisible)
{ {
trackGPUClockLimit.Value = NvidiaGpuControl.MaxClockLimit;
trackGPUCore.Value = 0; trackGPUCore.Value = 0;
trackGPUMemory.Value = 0; trackGPUMemory.Value = 0;
trackGPUBoost.Value = AsusACPI.MaxGPUBoost; trackGPUBoost.Value = AsusACPI.MaxGPUBoost;
trackGPUTemp.Value = AsusACPI.MaxGPUTemp; trackGPUTemp.Value = AsusACPI.MaxGPUTemp;
AppConfig.SetMode("gpu_clock_limit", trackGPUClockLimit.Value);
AppConfig.SetMode("gpu_boost", trackGPUBoost.Value); AppConfig.SetMode("gpu_boost", trackGPUBoost.Value);
AppConfig.SetMode("gpu_temp", trackGPUTemp.Value); AppConfig.SetMode("gpu_temp", trackGPUTemp.Value);
AppConfig.SetMode("gpu_core", trackGPUCore.Value); AppConfig.SetMode("gpu_core", trackGPUCore.Value);
AppConfig.SetMode("gpu_memory", trackGPUMemory.Value); AppConfig.SetMode("gpu_memory", trackGPUMemory.Value);

View File

@@ -18,7 +18,7 @@
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing"">Blue</data> <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value> <value>[base64 mime encoded serialized .NET Framework object]</value>
</data> </data>

View File

@@ -15,7 +15,7 @@
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
<ProduceReferenceAssembly>False</ProduceReferenceAssembly> <ProduceReferenceAssembly>False</ProduceReferenceAssembly>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks> <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<AssemblyVersion>0.109</AssemblyVersion> <AssemblyVersion>0.113</AssemblyVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">

View File

@@ -10,6 +10,8 @@ namespace GHelper.Gpu
SettingsForm settings; SettingsForm settings;
ScreenControl screenControl = new ScreenControl(); ScreenControl screenControl = new ScreenControl();
public static int gpuMode;
public GPUModeControl(SettingsForm settingsForm) public GPUModeControl(SettingsForm settingsForm)
{ {
settings = settingsForm; settings = settingsForm;
@@ -23,18 +25,16 @@ namespace GHelper.Gpu
Logger.WriteLine("Eco flag : " + eco); Logger.WriteLine("Eco flag : " + eco);
Logger.WriteLine("Mux flag : " + mux); Logger.WriteLine("Mux flag : " + mux);
int GpuMode;
if (mux == 0) if (mux == 0)
{ {
GpuMode = AsusACPI.GPUModeUltimate; gpuMode = AsusACPI.GPUModeUltimate;
} }
else else
{ {
if (eco == 1) if (eco == 1)
GpuMode = AsusACPI.GPUModeEco; gpuMode = AsusACPI.GPUModeEco;
else else
GpuMode = AsusACPI.GPUModeStandard; gpuMode = AsusACPI.GPUModeStandard;
// Ultimate mode not supported // Ultimate mode not supported
if (mux != 1) settings.HideUltimateMode(); if (mux != 1) settings.HideUltimateMode();
@@ -42,10 +42,13 @@ namespace GHelper.Gpu
if (eco < 0 && mux < 0) settings.HideGPUModes(); if (eco < 0 && mux < 0) settings.HideGPUModes();
} }
AppConfig.Set("gpu_mode", GpuMode); AppConfig.Set("gpu_mode", gpuMode);
InitXGM(); InitXGM();
settings.VisualiseGPUMode(GpuMode); settings.VisualiseGPUMode(gpuMode);
AsusUSB.ApplyGPUColor();
} }

View File

@@ -18,6 +18,9 @@ public class NvidiaGpuControl : IGpuControl
public const int MinCoreOffset = -250; public const int MinCoreOffset = -250;
public const int MinMemoryOffset = -250; public const int MinMemoryOffset = -250;
public const int MinClockLimit = 1000;
public const int MaxClockLimit = 3000;
private static PhysicalGPU? _internalGpu; private static PhysicalGPU? _internalGpu;
public NvidiaGpuControl() public NvidiaGpuControl()
@@ -76,7 +79,7 @@ public class NvidiaGpuControl : IGpuControl
} }
public int GetClocks(out int core, out int memory) public bool GetClocks(out int core, out int memory)
{ {
PhysicalGPU internalGpu = _internalGpu!; PhysicalGPU internalGpu = _internalGpu!;
@@ -95,28 +98,24 @@ public class NvidiaGpuControl : IGpuControl
Logger.WriteLine("GPU VOLT:" + delta.IsEditable + " - " + delta.ValueDeltaInMicroVolt.DeltaValue); Logger.WriteLine("GPU VOLT:" + delta.IsEditable + " - " + delta.ValueDeltaInMicroVolt.DeltaValue);
} }
return 0; return true;
} }
catch (Exception ex) catch (Exception ex)
{ {
Logger.WriteLine("GET GPU CLOCKS:" + ex.Message); Logger.WriteLine("GET GPU CLOCKS:" + ex.Message);
core = memory = 0; core = memory = 0;
return -1; return false;
} }
} }
public bool RestartGPU() private bool RunPowershellCommand(string script)
{ {
try try
{ {
string script = @"$device = Get-PnpDevice | Where-Object { $_.FriendlyName -imatch 'NVIDIA' -and $_.Class -eq 'Display' }; Disable-PnpDevice $device.InstanceId -Confirm:$false; Start-Sleep -Seconds 5; Enable-PnpDevice $device.InstanceId -Confirm:$false";
Logger.WriteLine(script);
ProcessHelper.RunCMD("powershell", script); ProcessHelper.RunCMD("powershell", script);
//Thread.Sleep(2000);
return true; return true;
} }
catch (Exception ex) catch (Exception ex)
@@ -124,27 +123,71 @@ public class NvidiaGpuControl : IGpuControl
Logger.WriteLine(ex.ToString()); Logger.WriteLine(ex.ToString());
return false; return false;
} }
} }
public int SetClocksFromConfig() public int GetMaxGPUCLock()
{ {
int core = AppConfig.Get("gpu_core", 0); PhysicalGPU internalGpu = _internalGpu!;
int memory = AppConfig.Get("gpu_memory", 0); try
int status = SetClocks(core, memory); {
return status; PrivateClockBoostLockV2 data = GPUApi.GetClockBoostLock(internalGpu.Handle);
int limit = (int)data.ClockBoostLocks[0].VoltageInMicroV / 1000;
Logger.WriteLine("GET CLOCK LIMIT: " + limit);
return limit;
}
catch (Exception ex)
{
Logger.WriteLine("GET CLOCK LIMIT: " + ex.Message);
return -1;
}
} }
public int SetClocks(int core, int memory, int voltage = 0)
public int SetMaxGPUClock(int clock)
{
if (clock < MinClockLimit || clock >= MaxClockLimit) clock = 0;
int _clockLimit = GetMaxGPUCLock();
if (_clockLimit != clock)
{
if (clock > 0) RunPowershellCommand($"nvidia-smi -lgc 0,{clock}");
else RunPowershellCommand($"nvidia-smi -rgc");
return 1;
}
else
{
return 0;
}
}
public bool RestartGPU()
{
return RunPowershellCommand(@"$device = Get-PnpDevice | Where-Object { $_.FriendlyName -imatch 'NVIDIA' -and $_.Class -eq 'Display' }; Disable-PnpDevice $device.InstanceId -Confirm:$false; Start-Sleep -Seconds 5; Enable-PnpDevice $device.InstanceId -Confirm:$false");
}
public int SetClocks(int core, int memory)
{ {
if (core < MinCoreOffset || core > MaxCoreOffset) return 0; if (core < MinCoreOffset || core > MaxCoreOffset) return 0;
if (memory < MinMemoryOffset || memory > MaxMemoryOffset) return 0; if (memory < MinMemoryOffset || memory > MaxMemoryOffset) return 0;
if (GetClocks(out int currentCore, out int currentMemory))
{
if (Math.Abs(core - currentCore) < 5 && Math.Abs(memory - currentMemory) < 5) return 0;
}
PhysicalGPU internalGpu = _internalGpu!; PhysicalGPU internalGpu = _internalGpu!;
var coreClock = new PerformanceStates20ClockEntryV1(PublicClockDomain.Graphics, new PerformanceStates20ParameterDelta(core * 1000)); var coreClock = new PerformanceStates20ClockEntryV1(PublicClockDomain.Graphics, new PerformanceStates20ParameterDelta(core * 1000));
var memoryClock = new PerformanceStates20ClockEntryV1(PublicClockDomain.Memory, new PerformanceStates20ParameterDelta(memory * 1000)); var memoryClock = new PerformanceStates20ClockEntryV1(PublicClockDomain.Memory, new PerformanceStates20ParameterDelta(memory * 1000));
var voltageEntry = new PerformanceStates20BaseVoltageEntryV1(PerformanceVoltageDomain.Core, new PerformanceStates20ParameterDelta(voltage)); //var voltageEntry = new PerformanceStates20BaseVoltageEntryV1(PerformanceVoltageDomain.Core, new PerformanceStates20ParameterDelta(voltage));
PerformanceStates20ClockEntryV1[] clocks = { coreClock, memoryClock }; PerformanceStates20ClockEntryV1[] clocks = { coreClock, memoryClock };
PerformanceStates20BaseVoltageEntryV1[] voltages = { }; PerformanceStates20BaseVoltageEntryV1[] voltages = { };
@@ -164,8 +207,6 @@ public class NvidiaGpuControl : IGpuControl
return -1; return -1;
} }
return 1; return 1;
} }

View File

@@ -132,7 +132,12 @@ namespace GHelper.Helpers
cmd.StartInfo.FileName = name; cmd.StartInfo.FileName = name;
cmd.StartInfo.Arguments = args; cmd.StartInfo.Arguments = args;
cmd.Start(); cmd.Start();
Logger.WriteLine(cmd.StandardOutput.ReadToEnd());
string result = cmd.StandardOutput.ReadToEnd().Replace(Environment.NewLine, " ").Trim(' ');
Logger.WriteLine(args);
Logger.WriteLine(result);
cmd.WaitForExit(); cmd.WaitForExit();
} }

View File

@@ -46,7 +46,12 @@ namespace GHelper.Mode
public void ResetPerformanceMode() public void ResetPerformanceMode()
{ {
ResetRyzen(); ResetRyzen();
Program.acpi.DeviceSet(AsusACPI.PerformanceMode, Modes.GetCurrentBase(), "Mode"); Program.acpi.DeviceSet(AsusACPI.PerformanceMode, Modes.GetCurrentBase(), "Mode");
// Default power mode
AppConfig.RemoveMode("powermode");
PowerNative.SetPowerMode(Modes.GetCurrentBase());
} }
public void SetPerformanceMode(int mode = -1, bool notify = false) public void SetPerformanceMode(int mode = -1, bool notify = false)
@@ -65,7 +70,13 @@ namespace GHelper.Mode
Modes.SetCurrent(mode); Modes.SetCurrent(mode);
Program.acpi.DeviceSet(AsusACPI.PerformanceMode, AppConfig.IsManualModeRequired() ? AsusACPI.PerformanceManual : Modes.GetBase(mode), "Mode"); int status = Program.acpi.DeviceSet(AsusACPI.PerformanceMode, AppConfig.IsManualModeRequired() ? AsusACPI.PerformanceManual : Modes.GetBase(mode), "Mode");
// Vivobook fallback
if (status != 1)
{
Program.acpi.DeviceSet(AsusACPI.VivoBookMode, Modes.GetBase(mode), "VivoMode");
}
if (AppConfig.Is("xgm_fan") && Program.acpi.IsXGConnected()) AsusUSB.ResetXGM(); if (AppConfig.Is("xgm_fan") && Program.acpi.IsXGConnected()) AsusUSB.ResetXGM();
@@ -76,18 +87,21 @@ namespace GHelper.Mode
AutoFans(); AutoFans();
AutoPower(1000); AutoPower(1000);
if (AppConfig.Get("auto_apply_power_plan") != 0) // Power plan from config or defaulting to balanced
{ if (AppConfig.GetModeString("scheme") is not null)
if (AppConfig.GetModeString("scheme") is not null) PowerNative.SetPowerPlan(AppConfig.GetModeString("scheme"));
PowerNative.SetPowerScheme(AppConfig.GetModeString("scheme")); else
else PowerNative.SetBalancedPowerPlan();
PowerNative.SetPowerScheme(Modes.GetBase(mode));
}
// Windows power mode
if (AppConfig.GetModeString("powermode") is not null)
PowerNative.SetPowerMode(AppConfig.GetModeString("powermode"));
else
PowerNative.SetPowerMode(Modes.GetBase(mode));
// CPU Boost setting override
if (AppConfig.GetMode("auto_boost") != -1) if (AppConfig.GetMode("auto_boost") != -1)
{
PowerNative.SetCPUBoost(AppConfig.GetMode("auto_boost")); PowerNative.SetCPUBoost(AppConfig.GetMode("auto_boost"));
}
//BatteryControl.SetBatteryChargeLimit(); //BatteryControl.SetBatteryChargeLimit();
@@ -280,35 +294,35 @@ namespace GHelper.Mode
public void SetGPUClocks(bool launchAsAdmin = true) public void SetGPUClocks(bool launchAsAdmin = true)
{ {
Task.Run(() =>
int gpu_core = AppConfig.GetMode("gpu_core");
int gpu_memory = AppConfig.GetMode("gpu_memory");
if (gpu_core == -1 && gpu_memory == -1) return;
//if ((gpu_core > -5 && gpu_core < 5) && (gpu_memory > -5 && gpu_memory < 5)) launchAsAdmin = false;
if (Program.acpi.DeviceGet(AsusACPI.GPUEco) == 1) return;
if (HardwareControl.GpuControl is null) return;
if (!HardwareControl.GpuControl!.IsNvidia) return;
using NvidiaGpuControl nvControl = (NvidiaGpuControl)HardwareControl.GpuControl;
try
{ {
int getStatus = nvControl.GetClocks(out int current_core, out int current_memory);
if (getStatus != -1) int core = AppConfig.GetMode("gpu_core");
int memory = AppConfig.GetMode("gpu_memory");
int clock_limit = AppConfig.GetMode("gpu_clock_limit");
if (core == -1 && memory == -1) return;
//if ((gpu_core > -5 && gpu_core < 5) && (gpu_memory > -5 && gpu_memory < 5)) launchAsAdmin = false;
if (Program.acpi.DeviceGet(AsusACPI.GPUEco) == 1) return;
if (HardwareControl.GpuControl is null) return;
if (!HardwareControl.GpuControl!.IsNvidia) return;
using NvidiaGpuControl nvControl = (NvidiaGpuControl)HardwareControl.GpuControl;
try
{ {
if (Math.Abs(gpu_core - current_core) < 5 && Math.Abs(gpu_memory - current_memory) < 5) return; int statusLimit = nvControl.SetMaxGPUClock(clock_limit);
int statusClocks = nvControl.SetClocks(core, memory);
if ((statusLimit != 0 || statusClocks != 0) && launchAsAdmin) ProcessHelper.RunAsAdmin("gpu");
}
catch (Exception ex)
{
Logger.WriteLine(ex.ToString());
} }
int setStatus = nvControl.SetClocks(gpu_core, gpu_memory); settings.GPUInit();
if (launchAsAdmin && setStatus == -1) ProcessHelper.RunAsAdmin("gpu"); });
}
catch (Exception ex)
{
Logger.WriteLine(ex.ToString());
}
} }
public void SetGPUPower() public void SetGPUPower()

View File

@@ -51,7 +51,8 @@
"gpu_memory", "gpu_memory",
"auto_boost", "auto_boost",
"auto_apply", "auto_apply",
"auto_apply_power" "auto_apply_power",
"powermode"
}; };
foreach (string clean in cleanup) foreach (string clean in cleanup)

View File

@@ -72,7 +72,24 @@ namespace GHelper.Mode
[DllImportAttribute("powrprof.dll", EntryPoint = "PowerSetActiveOverlayScheme")] [DllImportAttribute("powrprof.dll", EntryPoint = "PowerSetActiveOverlayScheme")]
public static extern uint PowerSetActiveOverlayScheme(Guid OverlaySchemeGuid); public static extern uint PowerSetActiveOverlayScheme(Guid OverlaySchemeGuid);
const string POWER_SILENT = "961cc777-2547-4f9d-8174-7d86181b8a7a";
const string POWER_BALANCED = "00000000-0000-0000-0000-000000000000";
const string POWER_TURBO = "ded574b5-45a0-4f42-8737-46345c09c238";
const string POWER_BETTERPERFORMANCE = "ded574b5-45a0-4f42-8737-46345c09c238";
static List<string> overlays = new() {
POWER_BALANCED,
POWER_TURBO,
POWER_SILENT,
POWER_BETTERPERFORMANCE
};
public static Dictionary<string, string> powerModes = new Dictionary<string, string>
{
{ POWER_SILENT, "Best Power Efficiency" },
{ POWER_BALANCED, "Balanced" },
{ POWER_TURBO, "Best Performance" },
};
static Guid GetActiveScheme() static Guid GetActiveScheme()
{ {
IntPtr pActiveSchemeGuid; IntPtr pActiveSchemeGuid;
@@ -122,51 +139,67 @@ namespace GHelper.Mode
Logger.WriteLine("Boost " + boost); Logger.WriteLine("Boost " + boost);
} }
public static void SetPowerScheme(string scheme) public static string GetPowerMode()
{ {
List<string> overlays = new() { PowerGetEffectiveOverlayScheme(out Guid activeScheme);
"00000000-0000-0000-0000-000000000000", return activeScheme.ToString();
"ded574b5-45a0-4f42-8737-46345c09c238", }
"961cc777-2547-4f9d-8174-7d86181b8a7a",
"3af9B8d9-7c97-431d-ad78-34a8bfea439f" public static void SetPowerMode(string scheme)
}; {
if (!overlays.Contains(scheme)) return;
Guid guidScheme = new Guid(scheme); Guid guidScheme = new Guid(scheme);
if (overlays.Contains(scheme)) uint status = PowerGetEffectiveOverlayScheme(out Guid activeScheme);
if (status != 0 || activeScheme != guidScheme)
{ {
uint status = PowerGetEffectiveOverlayScheme(out Guid activeScheme); status = PowerSetActiveOverlayScheme(guidScheme);
if (status != 0 || activeScheme != guidScheme) Logger.WriteLine("Power Mode " + scheme + ":" + (status == 0 ? "OK" : status));
{
PowerSetActiveOverlayScheme(guidScheme);
Logger.WriteLine("Power mode: " + scheme);
}
} }
else
{
PowerSetActiveScheme(IntPtr.Zero, guidScheme);
Logger.WriteLine("Power plan: " + scheme);
}
} }
public static void SetPowerScheme(int mode) public static void SetBalancedPowerPlan()
{
Guid activeSchemeGuid = GetActiveScheme();
string balanced = "381b4222-f694-41f0-9685-ff5bb260df2e";
if (activeSchemeGuid.ToString() != balanced && !AppConfig.Is("skip_power_plan"))
{
SetPowerPlan(balanced);
}
}
public static void SetPowerPlan(string scheme)
{
// Skipping power modes
if (overlays.Contains(scheme)) return;
Guid guidScheme = new Guid(scheme);
uint status = PowerSetActiveScheme(IntPtr.Zero, guidScheme);
Logger.WriteLine("Power Plan " + scheme + ":" + (status == 0 ? "OK" : status));
}
public static string GetDefaultPowerMode(int mode)
{ {
switch (mode) switch (mode)
{ {
case 0: // balanced
SetPowerScheme("00000000-0000-0000-0000-000000000000");
break;
case 1: // turbo case 1: // turbo
SetPowerScheme("ded574b5-45a0-4f42-8737-46345c09c238"); return POWER_TURBO;
break;
case 2: //silent case 2: //silent
SetPowerScheme("961cc777-2547-4f9d-8174-7d86181b8a7a"); return POWER_SILENT;
break; default: // balanced
return POWER_BALANCED;
} }
} }
public static void SetPowerMode(int mode)
{
SetPowerMode(GetDefaultPowerMode(mode));
}
public static int GetLidAction(bool ac) public static int GetLidAction(bool ac)
{ {
Guid activeSchemeGuid = GetActiveScheme(); Guid activeSchemeGuid = GetActiveScheme();

View File

@@ -0,0 +1,106 @@
namespace GHelper.Peripherals.Mouse.Models
{
//P709_Wireless
public class KerisWirelssAimpoint : AsusMouse
{
public KerisWirelssAimpoint() : base(0x0B05, 0x1A68, "mi_00", true)
{
}
protected KerisWirelssAimpoint(ushort vendorId, bool wireless) : base(0x0B05, vendorId, "mi_00", wireless)
{
}
public override int DPIProfileCount()
{
return 4;
}
public override string GetDisplayName()
{
return "ROG Keris Wireless Aimpoint (Wireless)";
}
public override PollingRate[] SupportedPollingrates()
{
return new PollingRate[] {
PollingRate.PR125Hz,
PollingRate.PR250Hz,
PollingRate.PR500Hz,
PollingRate.PR1000Hz
};
}
public override int ProfileCount()
{
return 5;
}
public override int MaxDPI()
{
return 36_000;
}
public override bool HasXYDPI()
{
return true;
}
public override bool HasDebounceSetting()
{
return true;
}
public override bool HasLiftOffSetting()
{
return true;
}
public override bool HasRGB()
{
return true;
}
public override LightingZone[] SupportedLightingZones()
{
return new LightingZone[] { LightingZone.Logo };
}
public override bool HasAutoPowerOff()
{
return true;
}
public override bool HasAngleSnapping()
{
return true;
}
public override bool HasAngleTuning()
{
return true;
}
public override bool HasLowBatteryWarning()
{
return true;
}
public override bool HasDPIColors()
{
return true;
}
}
public class KerisWirelssAimpointWired : KerisWirelssAimpoint
{
public KerisWirelssAimpointWired() : base(0x1A66, false)
{
}
public override string GetDisplayName()
{
return "ROG Keris Wireless Aimpoint (Wired)";
}
}
}

View File

@@ -197,6 +197,8 @@ namespace GHelper.Peripherals
DetectMouse(new GladiusIII()); DetectMouse(new GladiusIII());
DetectMouse(new GladiusIIIWired()); DetectMouse(new GladiusIIIWired());
DetectMouse(new TUFM3()); DetectMouse(new TUFM3());
DetectMouse(new KerisWirelssAimpoint());
DetectMouse(new KerisWirelssAimpointWired());
} }
public static void DetectMouse(AsusMouse am) public static void DetectMouse(AsusMouse am)

View File

@@ -199,10 +199,12 @@ namespace GHelper
private static void SystemEvents_PowerModeChanged(object sender, PowerModeChangedEventArgs e) private static void SystemEvents_PowerModeChanged(object sender, PowerModeChangedEventArgs e)
{ {
Logger.WriteLine("Power Mode:" + e.Mode.ToString());
if (e.Mode == PowerModes.Suspend) gpuControl.StandardModeFix(); if (e.Mode == PowerModes.Suspend)
{
Logger.WriteLine("Power Mode:" + e.Mode.ToString());
gpuControl.StandardModeFix();
}
if (SystemInformation.PowerStatus.PowerLineStatus == isPlugged) return; if (SystemInformation.PowerStatus.PowerLineStatus == isPlugged) return;
SetAutoModes(true); SetAutoModes(true);

View File

@@ -286,7 +286,7 @@
<value>Descargando</value> <value>Descargando</value>
</data> </data>
<data name="DownloadUpdate" xml:space="preserve"> <data name="DownloadUpdate" xml:space="preserve">
<value>Download</value> <value>Descargar</value>
</data> </data>
<data name="DriverAndSoftware" xml:space="preserve"> <data name="DriverAndSoftware" xml:space="preserve">
<value>Drivers y Software</value> <value>Drivers y Software</value>
@@ -540,7 +540,7 @@
<value>Quitar</value> <value>Quitar</value>
</data> </data>
<data name="RestartGPU" xml:space="preserve"> <data name="RestartGPU" xml:space="preserve">
<value>Something is using dGPU and preventing Eco mode. Let G-Helper try to restart dGPU in device manager? (Please proceed at your own risk)</value> <value>Algo está usando la dGPU e impide el modo Eco. ¿Reiniciar dGPU en el administrador de dispositivos? (Proceda bajo su propio riesgo)</value>
</data> </data>
<data name="RPM" xml:space="preserve"> <data name="RPM" xml:space="preserve">
<value>RPM</value> <value>RPM</value>

View File

@@ -286,7 +286,7 @@
<value>Scaricamento</value> <value>Scaricamento</value>
</data> </data>
<data name="DownloadUpdate" xml:space="preserve"> <data name="DownloadUpdate" xml:space="preserve">
<value>Download</value> <value>Scarica</value>
</data> </data>
<data name="DriverAndSoftware" xml:space="preserve"> <data name="DriverAndSoftware" xml:space="preserve">
<value>Driver e Software</value> <value>Driver e Software</value>
@@ -306,7 +306,7 @@ Sei sicuro di voler continuare?</value>
<value>Modalità schermo NVIDIA non impostata su Optimus</value> <value>Modalità schermo NVIDIA non impostata su Optimus</value>
</data> </data>
<data name="EnergySettings" xml:space="preserve"> <data name="EnergySettings" xml:space="preserve">
<value>Energy Settings</value> <value>Risparmio Energia</value>
</data> </data>
<data name="Extra" xml:space="preserve"> <data name="Extra" xml:space="preserve">
<value>Extra</value> <value>Extra</value>
@@ -540,7 +540,7 @@ Sei sicuro di voler continuare?</value>
<value>Esci</value> <value>Esci</value>
</data> </data>
<data name="RestartGPU" xml:space="preserve"> <data name="RestartGPU" xml:space="preserve">
<value>Something is using dGPU and preventing Eco mode. Let G-Helper try to restart dGPU in device manager? (Please proceed at your own risk)</value> <value>Qualcosa sta utilizzando la dGPU e impedisce il passaggio alla modalità Eco. Vuoi che G-Helper provi a riavviare la dGPU in gestione dispositivi? (Procedi a tuo rischio)</value>
</data> </data>
<data name="RPM" xml:space="preserve"> <data name="RPM" xml:space="preserve">
<value>RPM</value> <value>RPM</value>

View File

@@ -163,64 +163,64 @@
<value>실행중인 Asus 서비스</value> <value>실행중인 Asus 서비스</value>
</data> </data>
<data name="AuraBatteryState" xml:space="preserve"> <data name="AuraBatteryState" xml:space="preserve">
<value>Battery State</value> <value>배터리 상태</value>
</data> </data>
<data name="AuraBreathe" xml:space="preserve"> <data name="AuraBreathe" xml:space="preserve">
<value>Breathe</value> <value>숨쉬기</value>
</data> </data>
<data name="AuraClockwise" xml:space="preserve"> <data name="AuraClockwise" xml:space="preserve">
<value>Clockwise</value> <value>시계 방향</value>
</data> </data>
<data name="AuraColorCycle" xml:space="preserve"> <data name="AuraColorCycle" xml:space="preserve">
<value>Color Cycle</value> <value>색 순환</value>
</data> </data>
<data name="AuraComet" xml:space="preserve"> <data name="AuraComet" xml:space="preserve">
<value>Comet</value> <value>혜성</value>
</data> </data>
<data name="AuraCounterClockwise" xml:space="preserve"> <data name="AuraCounterClockwise" xml:space="preserve">
<value>Counterclockwise</value> <value>반시계 방향</value>
</data> </data>
<data name="AuraFast" xml:space="preserve"> <data name="AuraFast" xml:space="preserve">
<value>빠르게</value> <value>빠르게</value>
</data> </data>
<data name="AuraLightingMode" xml:space="preserve"> <data name="AuraLightingMode" xml:space="preserve">
<value>Lighting Mode</value> <value>조명 모드</value>
</data> </data>
<data name="AuraNormal" xml:space="preserve"> <data name="AuraNormal" xml:space="preserve">
<value>보통</value> <value>보통</value>
</data> </data>
<data name="AuraRainbow" xml:space="preserve"> <data name="AuraRainbow" xml:space="preserve">
<value>Rainbow</value> <value>무지개</value>
</data> </data>
<data name="AuraRandomColor" xml:space="preserve"> <data name="AuraRandomColor" xml:space="preserve">
<value>Random</value> <value>랜덤</value>
</data> </data>
<data name="AuraReact" xml:space="preserve"> <data name="AuraReact" xml:space="preserve">
<value>React</value> <value>반응</value>
</data> </data>
<data name="AuraSlow" xml:space="preserve"> <data name="AuraSlow" xml:space="preserve">
<value>느리게</value> <value>느리게</value>
</data> </data>
<data name="AuraStatic" xml:space="preserve"> <data name="AuraStatic" xml:space="preserve">
<value>Static</value> <value>정적</value>
</data> </data>
<data name="AuraStrobe" xml:space="preserve"> <data name="AuraStrobe" xml:space="preserve">
<value>Strobe</value> <value>섬광</value>
</data> </data>
<data name="AuraZoneAll" xml:space="preserve"> <data name="AuraZoneAll" xml:space="preserve">
<value>All</value> <value>전체</value>
</data> </data>
<data name="AuraZoneDock" xml:space="preserve"> <data name="AuraZoneDock" xml:space="preserve">
<value>Dock</value> <value></value>
</data> </data>
<data name="AuraZoneLogo" xml:space="preserve"> <data name="AuraZoneLogo" xml:space="preserve">
<value>Logo</value> <value>로고</value>
</data> </data>
<data name="AuraZoneScroll" xml:space="preserve"> <data name="AuraZoneScroll" xml:space="preserve">
<value>Scrollwheel</value> <value>스크롤 휠</value>
</data> </data>
<data name="AuraZoneUnderglow" xml:space="preserve"> <data name="AuraZoneUnderglow" xml:space="preserve">
<value>Underglow</value> <value>하단 조명</value>
</data> </data>
<data name="AutoApply" xml:space="preserve"> <data name="AutoApply" xml:space="preserve">
<value>자동 적용</value> <value>자동 적용</value>
@@ -232,28 +232,28 @@
<value>배터리 사용 중에만 60Hz 설정</value> <value>배터리 사용 중에만 60Hz 설정</value>
</data> </data>
<data name="Awake" xml:space="preserve"> <data name="Awake" xml:space="preserve">
<value>Awake</value> <value>절전 모드 해제</value>
</data> </data>
<data name="BacklightTimeout" xml:space="preserve"> <data name="BacklightTimeout" xml:space="preserve">
<value>전원 연결 / 배터리 사용 중 자동 꺼짐 시간 (0 - 항상 켜짐)</value> <value>전원 / 배터리 사용 중 자동 꺼짐 시간 (0 - 항상 켜짐)</value>
</data> </data>
<data name="Balanced" xml:space="preserve"> <data name="Balanced" xml:space="preserve">
<value>균형</value> <value>균형</value>
</data> </data>
<data name="BatteryCharge" xml:space="preserve"> <data name="BatteryCharge" xml:space="preserve">
<value>Charge</value> <value>잔량</value>
</data> </data>
<data name="BatteryChargeLimit" xml:space="preserve"> <data name="BatteryChargeLimit" xml:space="preserve">
<value>배터리 충전 제한</value> <value>배터리 충전 제한</value>
</data> </data>
<data name="BatteryHealth" xml:space="preserve"> <data name="BatteryHealth" xml:space="preserve">
<value>Battery Health</value> <value>배터리 수명</value>
</data> </data>
<data name="BiosAndDriverUpdates" xml:space="preserve"> <data name="BiosAndDriverUpdates" xml:space="preserve">
<value>바이오스/드라이버 업데이트</value> <value>바이오스/드라이버 업데이트</value>
</data> </data>
<data name="Boot" xml:space="preserve"> <data name="Boot" xml:space="preserve">
<value>Boot</value> <value>부팅</value>
</data> </data>
<data name="Brightness" xml:space="preserve"> <data name="Brightness" xml:space="preserve">
<value>밝기</value> <value>밝기</value>
@@ -265,7 +265,7 @@
<value>밝기 증가</value> <value>밝기 증가</value>
</data> </data>
<data name="Charging" xml:space="preserve"> <data name="Charging" xml:space="preserve">
<value>Charging</value> <value>충전 중</value>
</data> </data>
<data name="Color" xml:space="preserve"> <data name="Color" xml:space="preserve">
<value>색상</value> <value>색상</value>
@@ -286,7 +286,7 @@
<value>방전 중</value> <value>방전 중</value>
</data> </data>
<data name="DownloadUpdate" xml:space="preserve"> <data name="DownloadUpdate" xml:space="preserve">
<value>Download</value> <value>다운로드</value>
</data> </data>
<data name="DriverAndSoftware" xml:space="preserve"> <data name="DriverAndSoftware" xml:space="preserve">
<value>드라이버와 소프트웨어</value> <value>드라이버와 소프트웨어</value>
@@ -336,7 +336,7 @@
<value>팬 속도/전력</value> <value>팬 속도/전력</value>
</data> </data>
<data name="FanSpeed" xml:space="preserve"> <data name="FanSpeed" xml:space="preserve">
<value>Fan</value> <value></value>
</data> </data>
<data name="FansPower" xml:space="preserve"> <data name="FansPower" xml:space="preserve">
<value>팬 + 전력</value> <value>팬 + 전력</value>
@@ -375,10 +375,10 @@
<value>목표 온도</value> <value>목표 온도</value>
</data> </data>
<data name="HibernateAfter" xml:space="preserve"> <data name="HibernateAfter" xml:space="preserve">
<value>Minutes till Hibernation in sleep on battery (0 - OFF)</value> <value>최대 절전 모드 전환 시간 (0 - 꺼짐)</value>
</data> </data>
<data name="High" xml:space="preserve"> <data name="High" xml:space="preserve">
<value>High</value> <value>높게</value>
</data> </data>
<data name="KeyBindings" xml:space="preserve"> <data name="KeyBindings" xml:space="preserve">
<value>키 설정</value> <value>키 설정</value>
@@ -405,13 +405,13 @@
<value>라이트바</value> <value>라이트바</value>
</data> </data>
<data name="Lighting" xml:space="preserve"> <data name="Lighting" xml:space="preserve">
<value>Lighting</value> <value>조명</value>
</data> </data>
<data name="Logo" xml:space="preserve"> <data name="Logo" xml:space="preserve">
<value>로고</value> <value>로고</value>
</data> </data>
<data name="Low" xml:space="preserve"> <data name="Low" xml:space="preserve">
<value>Low</value> <value>낮게</value>
</data> </data>
<data name="MatrixAudio" xml:space="preserve"> <data name="MatrixAudio" xml:space="preserve">
<value>오디오 비주얼라이저</value> <value>오디오 비주얼라이저</value>
@@ -447,31 +447,31 @@
<value>60Hz 주사율 설정</value> <value>60Hz 주사율 설정</value>
</data> </data>
<data name="Minute" xml:space="preserve"> <data name="Minute" xml:space="preserve">
<value>Minute</value> <value>분 후</value>
</data> </data>
<data name="Minutes" xml:space="preserve"> <data name="Minutes" xml:space="preserve">
<value>Minutes</value> <value>분 후</value>
</data> </data>
<data name="MouseAngleSnapping" xml:space="preserve"> <data name="MouseAngleSnapping" xml:space="preserve">
<value>Angle Snapping</value> <value>직선 보정</value>
</data> </data>
<data name="MouseAutoPowerOff" xml:space="preserve"> <data name="MouseAutoPowerOff" xml:space="preserve">
<value>Auto Power Off After</value> <value>자동 전원 꺼짐</value>
</data> </data>
<data name="MouseButtonResponse" xml:space="preserve"> <data name="MouseButtonResponse" xml:space="preserve">
<value>Button Response</value> <value>버튼 응답</value>
</data> </data>
<data name="MouseLiftOffDistance" xml:space="preserve"> <data name="MouseLiftOffDistance" xml:space="preserve">
<value>Lift Off Distance</value> <value>들어올림 거리</value>
</data> </data>
<data name="MouseLowBatteryWarning" xml:space="preserve"> <data name="MouseLowBatteryWarning" xml:space="preserve">
<value>Low Battery Warning at</value> <value>배터리 부족 경고 알림</value>
</data> </data>
<data name="MousePerformance" xml:space="preserve"> <data name="MousePerformance" xml:space="preserve">
<value>Performance</value> <value>성능</value>
</data> </data>
<data name="MouseSynchronize" xml:space="preserve"> <data name="MouseSynchronize" xml:space="preserve">
<value>Synchronize with mouse</value> <value>마우스와 동기화</value>
</data> </data>
<data name="Multizone" xml:space="preserve"> <data name="Multizone" xml:space="preserve">
<value>멀티존</value> <value>멀티존</value>
@@ -480,7 +480,7 @@
<value>마이크 음소거</value> <value>마이크 음소거</value>
</data> </data>
<data name="Never" xml:space="preserve"> <data name="Never" xml:space="preserve">
<value>Never</value> <value>사용 안함</value>
</data> </data>
<data name="NewUpdates" xml:space="preserve"> <data name="NewUpdates" xml:space="preserve">
<value>새 업데이트</value> <value>새 업데이트</value>
@@ -489,7 +489,7 @@
<value>새 업데이트 없음</value> <value>새 업데이트 없음</value>
</data> </data>
<data name="NotConnected" xml:space="preserve"> <data name="NotConnected" xml:space="preserve">
<value>Not Connected</value> <value>연결되지 않음</value>
</data> </data>
<data name="OpenGHelper" xml:space="preserve"> <data name="OpenGHelper" xml:space="preserve">
<value>G-Helper 열기</value> <value>G-Helper 열기</value>
@@ -513,7 +513,7 @@
<value>성능 모드</value> <value>성능 모드</value>
</data> </data>
<data name="Peripherals" xml:space="preserve"> <data name="Peripherals" xml:space="preserve">
<value>Peripherals</value> <value>주변 장치</value>
</data> </data>
<data name="PictureGif" xml:space="preserve"> <data name="PictureGif" xml:space="preserve">
<value>사진 / Gif</value> <value>사진 / Gif</value>
@@ -522,7 +522,7 @@
<value>재생 / 정지</value> <value>재생 / 정지</value>
</data> </data>
<data name="PollingRate" xml:space="preserve"> <data name="PollingRate" xml:space="preserve">
<value>Polling Rate</value> <value>폴링레이트</value>
</data> </data>
<data name="PowerLimits" xml:space="preserve"> <data name="PowerLimits" xml:space="preserve">
<value>전력 제한</value> <value>전력 제한</value>
@@ -534,13 +534,13 @@
<value>PrintScreen</value> <value>PrintScreen</value>
</data> </data>
<data name="Profile" xml:space="preserve"> <data name="Profile" xml:space="preserve">
<value>Profile</value> <value>프로필</value>
</data> </data>
<data name="Quit" xml:space="preserve"> <data name="Quit" xml:space="preserve">
<value>종료</value> <value>종료</value>
</data> </data>
<data name="RestartGPU" xml:space="preserve"> <data name="RestartGPU" xml:space="preserve">
<value>Something is using dGPU and preventing Eco mode. Let G-Helper try to restart dGPU in device manager? (Please proceed at your own risk)</value> <value>dGPU가 사용중이기 때문에 Eco 모드로 전환할 수 없습니다. 장치 관리자에서 dGPU를 재시작하시겠습니까?</value>
</data> </data>
<data name="RPM" xml:space="preserve"> <data name="RPM" xml:space="preserve">
<value>RPM</value> <value>RPM</value>
@@ -555,13 +555,13 @@
<value>Screenpad 밝기 증가</value> <value>Screenpad 밝기 증가</value>
</data> </data>
<data name="Shutdown" xml:space="preserve"> <data name="Shutdown" xml:space="preserve">
<value>꺼짐</value> <value>시스템 종료</value>
</data> </data>
<data name="Silent" xml:space="preserve"> <data name="Silent" xml:space="preserve">
<value>조용</value> <value>조용</value>
</data> </data>
<data name="Sleep" xml:space="preserve"> <data name="Sleep" xml:space="preserve">
<value>Sleep</value> <value>절전 모드</value>
</data> </data>
<data name="StandardGPUTooltip" xml:space="preserve"> <data name="StandardGPUTooltip" xml:space="preserve">
<value>Standard 모드에서 dGPU 켜기</value> <value>Standard 모드에서 dGPU 켜기</value>
@@ -588,19 +588,19 @@
<value>서비스 중지 중</value> <value>서비스 중지 중</value>
</data> </data>
<data name="ToggleAura" xml:space="preserve"> <data name="ToggleAura" xml:space="preserve">
<value>Aura 토글 키</value> <value>Aura 전환 키</value>
</data> </data>
<data name="ToggleClamshellMode" xml:space="preserve"> <data name="ToggleClamshellMode" xml:space="preserve">
<value>Auto Toggle Clamshell Mode</value> <value>클램쉘 모드 자동 전환</value>
</data> </data>
<data name="ToggleFnLock" xml:space="preserve"> <data name="ToggleFnLock" xml:space="preserve">
<value>Fn-Lock 토글 키</value> <value>Fn-Lock 전환 키</value>
</data> </data>
<data name="ToggleMiniled" xml:space="preserve"> <data name="ToggleMiniled" xml:space="preserve">
<value>Miniled 토글 키 (지원하는 기기만)</value> <value>Miniled 전환 키 (지원하는 기기만)</value>
</data> </data>
<data name="ToggleScreen" xml:space="preserve"> <data name="ToggleScreen" xml:space="preserve">
<value>화면 토글 키</value> <value>화면 전환 키</value>
</data> </data>
<data name="Turbo" xml:space="preserve"> <data name="Turbo" xml:space="preserve">
<value>터보</value> <value>터보</value>
@@ -618,7 +618,7 @@
<value>Ultimate</value> <value>Ultimate</value>
</data> </data>
<data name="UndervoltingRisky" xml:space="preserve"> <data name="UndervoltingRisky" xml:space="preserve">
<value>언더볼팅은 실험적이며 위험한 기능입니다. 적용 값이 너무 낮은 경우 시스템이 불안정해지고, 종료되거나 데이터 손상을 유발할 수 있습니다. 은 값부터 적용하여 잘 작동하는지 확인해 보십시오.</value> <value>언더볼팅은 실험적이며 위험한 기능입니다. 적용 값이 너무 낮은 경우 시스템이 불안정해지고, 강제 종료되거나 데이터 손상을 유발할 수 있습니다. 은 값부터 적용하여 잘 작동하는지 확인해 보십시오.</value>
</data> </data>
<data name="Updates" xml:space="preserve"> <data name="Updates" xml:space="preserve">
<value>업데이트</value> <value>업데이트</value>

View File

@@ -286,7 +286,7 @@
<value>Iškrovimas</value> <value>Iškrovimas</value>
</data> </data>
<data name="DownloadUpdate" xml:space="preserve"> <data name="DownloadUpdate" xml:space="preserve">
<value>Download</value> <value>Atsisiųsti</value>
</data> </data>
<data name="DriverAndSoftware" xml:space="preserve"> <data name="DriverAndSoftware" xml:space="preserve">
<value>Tvarkyklės ir programinė įranga</value> <value>Tvarkyklės ir programinė įranga</value>

View File

@@ -286,7 +286,7 @@
<value>Zużycie mocy</value> <value>Zużycie mocy</value>
</data> </data>
<data name="DownloadUpdate" xml:space="preserve"> <data name="DownloadUpdate" xml:space="preserve">
<value>Download</value> <value>Pobierz</value>
</data> </data>
<data name="DriverAndSoftware" xml:space="preserve"> <data name="DriverAndSoftware" xml:space="preserve">
<value>Sterowniki i oprogramowanie</value> <value>Sterowniki i oprogramowanie</value>
@@ -375,7 +375,7 @@ Nadal chcesz kontynuować?</value>
<value>Temperatura docelowa</value> <value>Temperatura docelowa</value>
</data> </data>
<data name="HibernateAfter" xml:space="preserve"> <data name="HibernateAfter" xml:space="preserve">
<value>Minutes till Hibernation in sleep on battery (0 - OFF)</value> <value>Czas przejścia w hibernację na baterii (0 - wcale)</value>
</data> </data>
<data name="High" xml:space="preserve"> <data name="High" xml:space="preserve">
<value>Wysoka</value> <value>Wysoka</value>
@@ -540,13 +540,13 @@ Nadal chcesz kontynuować?</value>
<value>Zamknij</value> <value>Zamknij</value>
</data> </data>
<data name="RestartGPU" xml:space="preserve"> <data name="RestartGPU" xml:space="preserve">
<value>Something is using dGPU and preventing Eco mode. Let G-Helper try to restart dGPU in device manager? (Please proceed at your own risk)</value> <value>Coś korzysta z dGPU, uniemożliwiając włączenie trybu Eco. Czy G-Helper ma zresetować dGPU w Menadżerze Urządzeń? (Korzystasz na własne ryzyko)</value>
</data> </data>
<data name="RPM" xml:space="preserve"> <data name="RPM" xml:space="preserve">
<value>RPM</value> <value>RPM</value>
</data> </data>
<data name="RunOnStartup" xml:space="preserve"> <data name="RunOnStartup" xml:space="preserve">
<value>Uruchom przy starcie systemu</value> <value>Uruchom przy starcie</value>
</data> </data>
<data name="ScreenPadDown" xml:space="preserve"> <data name="ScreenPadDown" xml:space="preserve">
<value>Zmniejsz jasność ScreenPad</value> <value>Zmniejsz jasność ScreenPad</value>

View File

@@ -133,7 +133,7 @@
<value>Ультимативний режим потребує перезавантаження</value> <value>Ультимативний режим потребує перезавантаження</value>
</data> </data>
<data name="AlertUltimateTitle" xml:space="preserve"> <data name="AlertUltimateTitle" xml:space="preserve">
<value>Перезавантажитися зараз?</value> <value>Перезавантажити зараз?</value>
</data> </data>
<data name="AnimationSpeed" xml:space="preserve"> <data name="AnimationSpeed" xml:space="preserve">
<value>Швидкість Анімації</value> <value>Швидкість Анімації</value>
@@ -286,7 +286,7 @@
<value>Розрядка</value> <value>Розрядка</value>
</data> </data>
<data name="DownloadUpdate" xml:space="preserve"> <data name="DownloadUpdate" xml:space="preserve">
<value>Download</value> <value>Завантажити</value>
</data> </data>
<data name="DriverAndSoftware" xml:space="preserve"> <data name="DriverAndSoftware" xml:space="preserve">
<value>Драйвери та програми</value> <value>Драйвери та програми</value>
@@ -375,7 +375,7 @@
<value>Temperature Target</value> <value>Temperature Target</value>
</data> </data>
<data name="HibernateAfter" xml:space="preserve"> <data name="HibernateAfter" xml:space="preserve">
<value>Minutes till Hibernation in sleep on battery (0 - OFF)</value> <value>Хвилин до режиму глибокого сну з акумулятором (0 - Вимкнено)</value>
</data> </data>
<data name="High" xml:space="preserve"> <data name="High" xml:space="preserve">
<value>Висока</value> <value>Висока</value>
@@ -540,7 +540,7 @@
<value>Вихід</value> <value>Вихід</value>
</data> </data>
<data name="RestartGPU" xml:space="preserve"> <data name="RestartGPU" xml:space="preserve">
<value>Something is using dGPU and preventing Eco mode. Let G-Helper try to restart dGPU in device manager? (Please proceed at your own risk)</value> <value>Щось використовує dGPU та запобігає Еко-режиму. Дозвольте G-Helper спробувати перезапустити dGPU у менеджері пристрою? (Будь ласка, продовжуйте на власний ризик)</value>
</data> </data>
<data name="RPM" xml:space="preserve"> <data name="RPM" xml:space="preserve">
<value>Оберти</value> <value>Оберти</value>

View File

@@ -151,7 +151,7 @@
<value>应用</value> <value>应用</value>
</data> </data>
<data name="ApplyFanCurve" xml:space="preserve"> <data name="ApplyFanCurve" xml:space="preserve">
<value>应用自定义扇曲线</value> <value>应用自定义扇曲线</value>
</data> </data>
<data name="ApplyPowerLimits" xml:space="preserve"> <data name="ApplyPowerLimits" xml:space="preserve">
<value>应用功率限制</value> <value>应用功率限制</value>
@@ -286,7 +286,7 @@
<value>正在放电</value> <value>正在放电</value>
</data> </data>
<data name="DownloadUpdate" xml:space="preserve"> <data name="DownloadUpdate" xml:space="preserve">
<value>Download</value> <value>下载</value>
</data> </data>
<data name="DriverAndSoftware" xml:space="preserve"> <data name="DriverAndSoftware" xml:space="preserve">
<value>驱动程序和软件</value> <value>驱动程序和软件</value>
@@ -540,7 +540,7 @@
<value>退出</value> <value>退出</value>
</data> </data>
<data name="RestartGPU" xml:space="preserve"> <data name="RestartGPU" xml:space="preserve">
<value>Something is using dGPU and preventing Eco mode. Let G-Helper try to restart dGPU in device manager? (Please proceed at your own risk)</value> <value>有程序正在使用独显并阻止进入集显模式。要让 G-Helper 在设备管理器中重新启动独显吗?(请自行承担风险)</value>
</data> </data>
<data name="RPM" xml:space="preserve"> <data name="RPM" xml:space="preserve">
<value>转/分钟</value> <value>转/分钟</value>

View File

@@ -286,7 +286,7 @@
<value>正在釋放電力</value> <value>正在釋放電力</value>
</data> </data>
<data name="DownloadUpdate" xml:space="preserve"> <data name="DownloadUpdate" xml:space="preserve">
<value>Download</value> <value>下載</value>
</data> </data>
<data name="DriverAndSoftware" xml:space="preserve"> <data name="DriverAndSoftware" xml:space="preserve">
<value>驅動程式與軟體</value> <value>驅動程式與軟體</value>
@@ -540,7 +540,7 @@
<value>退出</value> <value>退出</value>
</data> </data>
<data name="RestartGPU" xml:space="preserve"> <data name="RestartGPU" xml:space="preserve">
<value>Something is using dGPU and preventing Eco mode. Let G-Helper try to restart dGPU in device manager? (Please proceed at your own risk)</value> <value>有其他程式正在使用獨顯導致無法切換至節能模式. 是否讓G-Helper重新啟動獨顯? * 請自行評估風險</value>
</data> </data>
<data name="RPM" xml:space="preserve"> <data name="RPM" xml:space="preserve">
<value>每分鐘轉數</value> <value>每分鐘轉數</value>

View File

@@ -11,13 +11,13 @@ namespace Ryzen
internal class RyzenControl internal class RyzenControl
{ {
public const int MinCPUUV = -30; public static int MinCPUUV => AppConfig.Get("min_uv", -30);
public const int MaxCPUUV = 0; public const int MaxCPUUV = 0;
public const int MinIGPUUV = -20; public const int MinIGPUUV = -20;
public const int MaxIGPUUV = 0; public const int MaxIGPUUV = 0;
public const int MinTemp = 75; public static int MinTemp => AppConfig.Get("min_temp", 75);
public const int MaxTemp = 98; public const int MaxTemp = 98;
public static string[] FAM = { "RAVEN", "PICASSO", "DALI", "RENOIR/LUCIENNE", "MATISSE", "VANGOGH", "VERMEER", "CEZANNE/BARCELO", "REMBRANDT", "PHOENIX", "RAPHAEL/DRAGON RANGE" }; public static string[] FAM = { "RAVEN", "PICASSO", "DALI", "RENOIR/LUCIENNE", "MATISSE", "VANGOGH", "VERMEER", "CEZANNE/BARCELO", "REMBRANDT", "PHOENIX", "RAPHAEL/DRAGON RANGE" };

View File

@@ -376,7 +376,7 @@ namespace GHelper
//contextMenuStrip.ShowCheckMargin = true; //contextMenuStrip.ShowCheckMargin = true;
contextMenuStrip.RenderMode = ToolStripRenderMode.System; contextMenuStrip.RenderMode = ToolStripRenderMode.System;
if (CheckSystemDarkModeStatus()) if (darkTheme)
{ {
contextMenuStrip.BackColor = this.BackColor; contextMenuStrip.BackColor = this.BackColor;
contextMenuStrip.ForeColor = this.ForeColor; contextMenuStrip.ForeColor = this.ForeColor;
@@ -551,8 +551,7 @@ namespace GHelper
if (colorDlg.ShowDialog() == DialogResult.OK) if (colorDlg.ShowDialog() == DialogResult.OK)
{ {
AppConfig.Set("aura_color2", colorDlg.Color.ToArgb()); AppConfig.Set("aura_color2", colorDlg.Color.ToArgb());
AsusUSB.ApplyAura(); SetAura();
VisualiseAura();
} }
} }
@@ -582,6 +581,14 @@ namespace GHelper
}); });
} }
public void GPUInit()
{
Invoke(delegate
{
if (fans != null && fans.Text != "") fans.InitGPU();
});
}
public void FansToggle(int index = 0) public void FansToggle(int index = 0)
{ {
if (fans == null || fans.Text == "") if (fans == null || fans.Text == "")
@@ -617,8 +624,7 @@ namespace GHelper
if (colorDlg.ShowDialog() == DialogResult.OK) if (colorDlg.ShowDialog() == DialogResult.OK)
{ {
AppConfig.Set("aura_color", colorDlg.Color.ToArgb()); AppConfig.Set("aura_color", colorDlg.Color.ToArgb());
AsusUSB.ApplyAura(); SetAura();
VisualiseAura();
} }
} }
@@ -651,11 +657,23 @@ namespace GHelper
} }
public void SetAura()
{
Task.Run(() =>
{
AsusUSB.ApplyAura();
VisualiseAura();
});
}
public void VisualiseAura() public void VisualiseAura()
{ {
pictureColor.BackColor = AsusUSB.Color1; Invoke(delegate
pictureColor2.BackColor = AsusUSB.Color2; {
pictureColor2.Visible = AsusUSB.HasSecondColor(); pictureColor.BackColor = AsusUSB.Color1;
pictureColor2.BackColor = AsusUSB.Color2;
pictureColor2.Visible = AsusUSB.HasSecondColor();
});
} }
public void InitMatrix() public void InitMatrix()
@@ -687,8 +705,7 @@ namespace GHelper
private void ComboKeyboard_SelectedValueChanged(object? sender, EventArgs e) private void ComboKeyboard_SelectedValueChanged(object? sender, EventArgs e)
{ {
AppConfig.Set("aura_mode", (int)comboKeyboard.SelectedValue); AppConfig.Set("aura_mode", (int)comboKeyboard.SelectedValue);
AsusUSB.ApplyAura(); SetAura();
VisualiseAura();
} }

View File

@@ -71,7 +71,7 @@ namespace GHelper.UI
public bool InitTheme(bool setDPI = false) public bool InitTheme(bool setDPI = false)
{ {
bool newDarkTheme = CheckSystemDarkModeStatus(); bool newDarkTheme = IsDarkTheme();
bool changed = darkTheme != newDarkTheme; bool changed = darkTheme != newDarkTheme;
darkTheme = newDarkTheme; darkTheme = newDarkTheme;

View File

@@ -7,7 +7,7 @@ using System.Text.Json;
namespace GHelper namespace GHelper
{ {
struct DriverDownload public struct DriverDownload
{ {
public string categoryName; public string categoryName;
public string title; public string title;
@@ -140,7 +140,63 @@ namespace GHelper
} }
} }
public async void DriversAsync(string url, int type, TableLayoutPanel table) public void VisualiseDriver(DriverDownload driver, TableLayoutPanel table)
{
Invoke(delegate
{
string versionText = driver.version.Replace("latest version at the ", "");
Label versionLabel = new Label { Text = versionText, Anchor = AnchorStyles.Left, AutoSize = true };
versionLabel.Cursor = Cursors.Hand;
versionLabel.Font = new Font(versionLabel.Font, FontStyle.Underline);
versionLabel.ForeColor = colorEco;
versionLabel.Padding = new Padding(5, 5, 5, 5);
versionLabel.Click += delegate
{
Process.Start(new ProcessStartInfo(driver.downloadUrl) { UseShellExecute = true });
};
table.RowStyles.Add(new RowStyle(SizeType.AutoSize));
table.Controls.Add(new Label { Text = driver.categoryName, Anchor = AnchorStyles.Left, Dock = DockStyle.Fill, Padding = new Padding(5, 5, 5, 5) }, 0, table.RowCount);
table.Controls.Add(new Label { Text = driver.title, Anchor = AnchorStyles.Left, Dock = DockStyle.Fill, Padding = new Padding(5, 5, 5, 5) }, 1, table.RowCount);
table.Controls.Add(versionLabel, 2, table.RowCount);
table.RowCount++;
});
}
public void ShowTable(TableLayoutPanel table)
{
Invoke(delegate
{
table.Visible = true;
ResumeLayout(false);
PerformLayout();
});
}
public void VisualiseNewDriver(int position, TableLayoutPanel table)
{
var label = table.GetControlFromPosition(2, position) as Label;
if (label != null)
{
Invoke(delegate
{
label.Font = new Font(label.Font, FontStyle.Underline | FontStyle.Bold);
label.ForeColor = colorTurbo;
});
}
}
public void VisualiseNewCount(int updatesCount, TableLayoutPanel table)
{
Invoke(delegate
{
labelUpdates.Text = $"{Properties.Strings.NewUpdates}: {updatesCount}";
labelUpdates.ForeColor = colorTurbo;
labelUpdates.Font = new Font(labelUpdates.Font, FontStyle.Bold);
});
}
public async void DriversAsync(string url, int type, TableLayoutPanel table)
{ {
try try
@@ -185,39 +241,14 @@ namespace GHelper
driver.hardwares = file.GetProperty("HardwareInfoList"); driver.hardwares = file.GetProperty("HardwareInfoList");
drivers.Add(driver); drivers.Add(driver);
VisualiseDriver(driver, table);
Invoke(delegate
{
string versionText = driver.version.Replace("latest version at the ", "");
Label versionLabel = new Label { Text = versionText, Anchor = AnchorStyles.Left, AutoSize = true };
versionLabel.Cursor = Cursors.Hand;
versionLabel.Font = new Font(versionLabel.Font, FontStyle.Underline);
versionLabel.ForeColor = colorEco;
versionLabel.Padding = new Padding(5, 5, 5, 5);
versionLabel.Click += delegate
{
Process.Start(new ProcessStartInfo(driver.downloadUrl) { UseShellExecute = true });
};
table.RowStyles.Add(new RowStyle(SizeType.AutoSize));
table.Controls.Add(new Label { Text = driver.categoryName, Anchor = AnchorStyles.Left, Dock = DockStyle.Fill, Padding = new Padding(5, 5, 5, 5) }, 0, table.RowCount);
table.Controls.Add(new Label { Text = driver.title, Anchor = AnchorStyles.Left, Dock = DockStyle.Fill, Padding = new Padding(5, 5, 5, 5) }, 1, table.RowCount);
table.Controls.Add(versionLabel, 2, table.RowCount);
table.RowCount++;
});
} }
oldTitle = title; oldTitle = title;
} }
} }
ShowTable(table);
Invoke(delegate
{
table.Visible = true;
ResumeLayout(false);
PerformLayout();
});
Dictionary<string, string> devices = new(); Dictionary<string, string> devices = new();
@@ -246,20 +277,9 @@ namespace GHelper
if (newer > 0) if (newer > 0)
{ {
var label = table.GetControlFromPosition(2, count) as Label; updatesCount++;
if (label != null) VisualiseNewDriver(count, table);
{ VisualiseNewCount(updatesCount, table);
Invoke(delegate
{
updatesCount++;
label.Font = new Font(label.Font, FontStyle.Underline | FontStyle.Bold);
label.ForeColor = colorTurbo;
labelUpdates.Text = $"{Properties.Strings.NewUpdates}: {updatesCount}";
labelUpdates.ForeColor = colorTurbo;
labelUpdates.Font = new Font(label.Font, FontStyle.Bold);
});
}
} }
count++; count++;

View File

@@ -1,7 +1,7 @@
# G-Helper - Lightweight control tool for Asus laptops # G-Helper - Lightweight control tool for Asus laptops
[![United24](https://raw.githubusercontent.com/seerge/g-helper/main/docs/ua.png)](https://u24.gov.ua/) [![United24](https://raw.githubusercontent.com/seerge/g-helper/main/docs/ua.png)](https://u24.gov.ua/)
[![GitHub release](https://img.shields.io/github/release/seerge/g-helper.svg)](https://GitHub.com/seerge/g-helper/releases/) [![GitHub release](https://img.shields.io/github/release/seerge/g-helper.svg?style=flat-square)](https://GitHub.com/seerge/g-helper/releases/)
[![Github all releases](https://img.shields.io/github/downloads/seerge/g-helper/total.svg)](https://GitHub.com/seerge/g-helper/releases/) [![GitHub stars](https://img.shields.io/github/stars/seerge/g-helper.svg?style=social&label=Star)](https://GitHub.com/seerge/g-helper/stargazers/) <sup> Language: English | <a href="https://github.com/seerge/g-helper/blob/main/docs/README.zh-CN.md">[中文]</a></sup> [![Github all releases](https://img.shields.io/github/downloads/seerge/g-helper/total.svg?style=flat-square)](https://GitHub.com/seerge/g-helper/releases/) [![GitHub stars](https://img.shields.io/github/stars/seerge/g-helper.svg?style=social)](https://GitHub.com/seerge/g-helper/stargazers/) <sup> Language: English | <a href="https://github.com/seerge/g-helper/blob/main/docs/README.zh-CN.md">[中文]</a></sup>
Small and lightweight Armoury Crate alternative for Asus laptops offering almost same functionality without extra bloat and unnecessary services. Works on all popular models, such as ROG Zephyrus G14, G15, G16, M16, Flow X13, Flow X16, Flow Z13, TUF Series, Strix / Scar Series, ProArt, VivoBook and many more! Small and lightweight Armoury Crate alternative for Asus laptops offering almost same functionality without extra bloat and unnecessary services. Works on all popular models, such as ROG Zephyrus G14, G15, G16, M16, Flow X13, Flow X16, Flow Z13, TUF Series, Strix / Scar Series, ProArt, VivoBook and many more!
@@ -52,13 +52,15 @@ _To keep auto switching and hotkeys working the app needs to stay running in the
### :rocket: Performance Modes ### :rocket: Performance Modes
<img align="right" width="200" src="https://github.com/seerge/g-helper/assets/5920850/3e119674-db8d-486b-aa65-2bf9b61f9aa6"> <img align="right" width="300" src="https://github.com/seerge/g-helper/assets/5920850/3e119674-db8d-486b-aa65-2bf9b61f9aa6">
All Modes are **baked in BIOS** along with default fan curves and power limits. They are the **same** as in the Armoury Crate. All Modes are **baked in BIOS** along with default fan curves and power limits and they are the **same** as in the Armoury Crate.
1. **Silent** in BIOS + **Best power efficiency** setting in Windows Each BIOS mode is paired with matching Windows Power Mode. You can adjust this setting under ``Fans + Power``
2. **Balanced** (Performance in AC) in BIOS + **Balanced** setting in Windows
3. **Turbo** in BIOS + **Best performance** setting in Windows 1. **Silent** in BIOS + **Best power efficiency** power mode
2. **Balanced** (Performance in AC) in BIOS + **Balanced** power mode
3. **Turbo** in BIOS + **Best performance** power mode
### :video_game: GPU Modes ### :video_game: GPU Modes
@@ -76,7 +78,8 @@ All Modes are **baked in BIOS** along with default fan curves and power limits.
Stop ``ArmouryCrateControlInterface`` service under windows Services app or you can stop all asus services from ``Extra`` -> ``Stop services`` Stop ``ArmouryCrateControlInterface`` service under windows Services app or you can stop all asus services from ``Extra`` -> ``Stop services``
#### Battery charge limiter is not working #### Battery charge limiter is not working
It could be that Asus services are overwriting this limit after. You may want to stop them by clicking "Stop" in the Asus Services section (under Extra). It could be that Asus services are overwriting this limit after. You may want to stop them by clicking "Stop" in the Asus Services section (under Extra).
Please note: For some devices not every charge limit % may be working. Try to set standard **80%** to be sure.
#### I don't see GPU modes section #### I don't see GPU modes section
Some older models (for example G14 2020) don't support disabling GPU on hardware level, therefore GPU section makes no sense for them and will be hidden Some older models (for example G14 2020) don't support disabling GPU on hardware level, therefore GPU section makes no sense for them and will be hidden
@@ -225,16 +228,16 @@ By default the app will use your windows language setting. But you can set langu
### Custom windows power plans with each mode ### Custom windows power plans with each mode
You can manually assign a custom power plan (or power mode) GUID to each mode. It can be either "real" power plan that can be switched or "overlay" power plan like the ones g-helper sets by default. You can manually assign a custom power plan GUID to each mode.
Format is following : ``"scheme_<mode>" : "GUID" `` Format is following : ``"scheme_<mode>" : "GUID" ``
Where ``mode = 0 (balanced), 1 (turbo), 2 (silent)`` Where ``mode = 0 (balanced), 1 (turbo), 2 (silent)``
Default behavior is : Example (for default windows "balanced" power plan):
``` ```
"scheme_0": "00000000-0000-0000-0000-000000000000", "scheme_0": "381b4222-f694-41f0-9685-ff5bb260df2e",
"scheme_1": "ded574b5-45a0-4f42-8737-46345c09c238", "scheme_1": "381b4222-f694-41f0-9685-ff5bb260df2e",
"scheme_2": "961cc777-2547-4f9d-8174-7d86181b8a7a", "scheme_2": "381b4222-f694-41f0-9685-ff5bb260df2e",
``` ```
### Disable OSD ### Disable OSD