mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Compare commits
6 Commits
power_mode
...
gpu_clock_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4f6de3c6a3 | ||
|
|
4c989c9d75 | ||
|
|
2282e56aad | ||
|
|
ef788798b7 | ||
|
|
07d81e6072 | ||
|
|
708e3aa40f |
@@ -348,7 +348,8 @@ 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()
|
||||||
@@ -363,7 +364,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()
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
using GHelper.Helpers;
|
using GHelper.Gpu;
|
||||||
|
using GHelper.Helpers;
|
||||||
using HidLibrary;
|
using HidLibrary;
|
||||||
|
using NAudio.Gui;
|
||||||
|
using System.Drawing;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace GHelper
|
namespace GHelper
|
||||||
@@ -37,6 +40,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;
|
||||||
|
|
||||||
@@ -161,7 +165,8 @@ namespace GHelper
|
|||||||
{ 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>
|
||||||
@@ -194,6 +199,7 @@ namespace GHelper
|
|||||||
_modes.Remove(2);
|
_modes.Remove(2);
|
||||||
_modes.Remove(3);
|
_modes.Remove(3);
|
||||||
_modes.Remove(HEATMAP);
|
_modes.Remove(HEATMAP);
|
||||||
|
_modes.Remove(GPUMODE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (AppConfig.IsAdvantageEdition())
|
if (AppConfig.IsAdvantageEdition())
|
||||||
@@ -531,6 +537,25 @@ namespace GHelper
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void ApplyGPUColor()
|
||||||
|
{
|
||||||
|
if (AppConfig.Get("aura_mode") != GPUMODE) return;
|
||||||
|
|
||||||
|
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,17 +564,22 @@ 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 () =>
|
Task.Run(async () =>
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
14
app/Extra.cs
14
app/Extra.cs
@@ -331,16 +331,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)
|
||||||
|
|||||||
210
app/Fans.Designer.cs
generated
210
app/Fans.Designer.cs
generated
@@ -103,11 +103,14 @@ namespace GHelper
|
|||||||
pictureBoxCPU = new PictureBox();
|
pictureBoxCPU = new PictureBox();
|
||||||
labelPowerLimits = new Label();
|
labelPowerLimits = new Label();
|
||||||
panelBoost = new Panel();
|
panelBoost = new Panel();
|
||||||
panelPowerMode = new Panel();
|
|
||||||
comboPowerMode = new RComboBox();
|
|
||||||
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();
|
||||||
@@ -133,9 +136,10 @@ namespace GHelper
|
|||||||
buttonAdvanced = new RButton();
|
buttonAdvanced = new RButton();
|
||||||
buttonGPU = new RButton();
|
buttonGPU = new RButton();
|
||||||
buttonCPU = new RButton();
|
buttonCPU = new RButton();
|
||||||
panelPowerModeTItle = new Panel();
|
panelGPUClockLimit = new Panel();
|
||||||
picturePowerMode = new PictureBox();
|
labelGPUClockLimit = new Label();
|
||||||
labelPowerModeTitle = 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();
|
||||||
@@ -170,9 +174,11 @@ namespace GHelper
|
|||||||
panelTitleCPU.SuspendLayout();
|
panelTitleCPU.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)pictureBoxCPU).BeginInit();
|
((System.ComponentModel.ISupportInitialize)pictureBoxCPU).BeginInit();
|
||||||
panelBoost.SuspendLayout();
|
panelBoost.SuspendLayout();
|
||||||
panelPowerMode.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();
|
||||||
@@ -186,8 +192,8 @@ namespace GHelper
|
|||||||
((System.ComponentModel.ISupportInitialize)pictureGPU).BeginInit();
|
((System.ComponentModel.ISupportInitialize)pictureGPU).BeginInit();
|
||||||
panelNav.SuspendLayout();
|
panelNav.SuspendLayout();
|
||||||
tableNav.SuspendLayout();
|
tableNav.SuspendLayout();
|
||||||
panelPowerModeTItle.SuspendLayout();
|
panelGPUClockLimit.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)picturePowerMode).BeginInit();
|
((System.ComponentModel.ISupportInitialize)trackGPUClockLimit).BeginInit();
|
||||||
SuspendLayout();
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// panelFans
|
// panelFans
|
||||||
@@ -499,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, 1396);
|
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;
|
||||||
@@ -797,7 +803,7 @@ namespace GHelper
|
|||||||
panelPower.Controls.Add(panelPowerMode);
|
panelPower.Controls.Add(panelPowerMode);
|
||||||
panelPower.Controls.Add(panelPowerModeTItle);
|
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, 756);
|
panelPower.Size = new Size(520, 756);
|
||||||
@@ -1020,30 +1026,6 @@ namespace GHelper
|
|||||||
panelBoost.Size = new Size(520, 64);
|
panelBoost.Size = new Size(520, 64);
|
||||||
panelBoost.TabIndex = 13;
|
panelBoost.TabIndex = 13;
|
||||||
//
|
//
|
||||||
// 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;
|
|
||||||
//
|
|
||||||
// panelBoostTitle
|
// panelBoostTitle
|
||||||
//
|
//
|
||||||
panelBoostTitle.AutoSize = true;
|
panelBoostTitle.AutoSize = true;
|
||||||
@@ -1080,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;
|
||||||
@@ -1087,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;
|
||||||
//
|
//
|
||||||
@@ -1105,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";
|
||||||
@@ -1154,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";
|
||||||
@@ -1203,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";
|
||||||
@@ -1252,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";
|
||||||
@@ -1416,41 +1459,55 @@ namespace GHelper
|
|||||||
buttonCPU.TextImageRelation = TextImageRelation.ImageBeforeText;
|
buttonCPU.TextImageRelation = TextImageRelation.ImageBeforeText;
|
||||||
buttonCPU.UseVisualStyleBackColor = false;
|
buttonCPU.UseVisualStyleBackColor = false;
|
||||||
//
|
//
|
||||||
// panelPowerModeTItle
|
// panelGPUClockLimit
|
||||||
//
|
//
|
||||||
panelPowerModeTItle.AutoSize = true;
|
panelGPUClockLimit.AutoSize = true;
|
||||||
panelPowerModeTItle.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
panelGPUClockLimit.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||||
panelPowerModeTItle.Controls.Add(picturePowerMode);
|
panelGPUClockLimit.Controls.Add(labelGPUClockLimit);
|
||||||
panelPowerModeTItle.Controls.Add(labelPowerModeTitle);
|
panelGPUClockLimit.Controls.Add(trackGPUClockLimit);
|
||||||
panelPowerModeTItle.Dock = DockStyle.Top;
|
panelGPUClockLimit.Controls.Add(labelGPUClockLimitTitle);
|
||||||
panelPowerModeTItle.Location = new Point(0, 0);
|
panelGPUClockLimit.Dock = DockStyle.Top;
|
||||||
panelPowerModeTItle.Margin = new Padding(4);
|
panelGPUClockLimit.Location = new Point(0, 60);
|
||||||
panelPowerModeTItle.Name = "panelPowerModeTItle";
|
panelGPUClockLimit.Margin = new Padding(4);
|
||||||
panelPowerModeTItle.Size = new Size(520, 60);
|
panelGPUClockLimit.MaximumSize = new Size(0, 124);
|
||||||
panelPowerModeTItle.TabIndex = 50;
|
panelGPUClockLimit.Name = "panelGPUClockLimit";
|
||||||
|
panelGPUClockLimit.Size = new Size(520, 124);
|
||||||
|
panelGPUClockLimit.TabIndex = 48;
|
||||||
//
|
//
|
||||||
// picturePowerMode
|
// labelGPUClockLimit
|
||||||
//
|
//
|
||||||
picturePowerMode.BackgroundImage = Properties.Resources.icons8_gauge_32;
|
labelGPUClockLimit.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||||
picturePowerMode.BackgroundImageLayout = ImageLayout.Zoom;
|
labelGPUClockLimit.Location = new Point(326, 16);
|
||||||
picturePowerMode.InitialImage = null;
|
labelGPUClockLimit.Margin = new Padding(4, 0, 4, 0);
|
||||||
picturePowerMode.Location = new Point(10, 18);
|
labelGPUClockLimit.Name = "labelGPUClockLimit";
|
||||||
picturePowerMode.Margin = new Padding(4, 2, 4, 10);
|
labelGPUClockLimit.Size = new Size(176, 32);
|
||||||
picturePowerMode.Name = "picturePowerMode";
|
labelGPUClockLimit.TabIndex = 29;
|
||||||
picturePowerMode.Size = new Size(32, 32);
|
labelGPUClockLimit.Text = "1500 MHz";
|
||||||
picturePowerMode.TabIndex = 40;
|
labelGPUClockLimit.TextAlign = ContentAlignment.TopRight;
|
||||||
picturePowerMode.TabStop = false;
|
|
||||||
//
|
//
|
||||||
// labelPowerModeTitle
|
// trackGPUClockLimit
|
||||||
//
|
//
|
||||||
labelPowerModeTitle.AutoSize = true;
|
trackGPUClockLimit.LargeChange = 100;
|
||||||
labelPowerModeTitle.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
trackGPUClockLimit.Location = new Point(6, 48);
|
||||||
labelPowerModeTitle.Location = new Point(46, 18);
|
trackGPUClockLimit.Margin = new Padding(4, 2, 4, 2);
|
||||||
labelPowerModeTitle.Margin = new Padding(4, 0, 4, 0);
|
trackGPUClockLimit.Maximum = 3000;
|
||||||
labelPowerModeTitle.Name = "labelPowerModeTitle";
|
trackGPUClockLimit.Name = "trackGPUClockLimit";
|
||||||
labelPowerModeTitle.Size = new Size(271, 32);
|
trackGPUClockLimit.RightToLeft = RightToLeft.No;
|
||||||
labelPowerModeTitle.TabIndex = 39;
|
trackGPUClockLimit.Size = new Size(496, 90);
|
||||||
labelPowerModeTitle.Text = "Windows Power Mode";
|
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
|
||||||
//
|
//
|
||||||
@@ -1519,10 +1576,13 @@ namespace GHelper
|
|||||||
panelTitleCPU.PerformLayout();
|
panelTitleCPU.PerformLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)pictureBoxCPU).EndInit();
|
((System.ComponentModel.ISupportInitialize)pictureBoxCPU).EndInit();
|
||||||
panelBoost.ResumeLayout(false);
|
panelBoost.ResumeLayout(false);
|
||||||
panelPowerMode.ResumeLayout(false);
|
|
||||||
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);
|
||||||
@@ -1542,9 +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);
|
||||||
panelPowerModeTItle.ResumeLayout(false);
|
panelGPUClockLimit.ResumeLayout(false);
|
||||||
panelPowerModeTItle.PerformLayout();
|
panelGPUClockLimit.PerformLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)picturePowerMode).EndInit();
|
((System.ComponentModel.ISupportInitialize)trackGPUClockLimit).EndInit();
|
||||||
ResumeLayout(false);
|
ResumeLayout(false);
|
||||||
PerformLayout();
|
PerformLayout();
|
||||||
}
|
}
|
||||||
@@ -1647,5 +1707,9 @@ namespace GHelper
|
|||||||
private Panel panelPowerModeTItle;
|
private Panel panelPowerModeTItle;
|
||||||
private PictureBox picturePowerMode;
|
private PictureBox picturePowerMode;
|
||||||
private Label labelPowerModeTitle;
|
private Label labelPowerModeTitle;
|
||||||
|
private Panel panelGPUClockLimit;
|
||||||
|
private Label labelGPUClockLimit;
|
||||||
|
private TrackBar trackGPUClockLimit;
|
||||||
|
private Label labelGPUClockLimitTitle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
42
app/Fans.cs
42
app/Fans.cs
@@ -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;
|
||||||
@@ -435,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;
|
||||||
@@ -463,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);
|
||||||
@@ -488,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)
|
||||||
@@ -501,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();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -615,7 +643,7 @@ namespace GHelper
|
|||||||
{
|
{
|
||||||
string powerMode = (string)comboPowerMode.SelectedValue;
|
string powerMode = (string)comboPowerMode.SelectedValue;
|
||||||
PowerNative.SetPowerMode(powerMode);
|
PowerNative.SetPowerMode(powerMode);
|
||||||
|
|
||||||
if (PowerNative.GetDefaultPowerMode(Modes.GetCurrentBase()) != powerMode)
|
if (PowerNative.GetDefaultPowerMode(Modes.GetCurrentBase()) != powerMode)
|
||||||
AppConfig.SetMode("powermode", powerMode);
|
AppConfig.SetMode("powermode", powerMode);
|
||||||
}
|
}
|
||||||
@@ -897,13 +925,17 @@ namespace GHelper
|
|||||||
|
|
||||||
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);
|
||||||
|
|
||||||
|
|||||||
@@ -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.110</AssemblyVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||||
|
|||||||
@@ -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,8 +25,6 @@ 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;
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -291,10 +291,11 @@ namespace GHelper.Mode
|
|||||||
Task.Run(() =>
|
Task.Run(() =>
|
||||||
{
|
{
|
||||||
|
|
||||||
int gpu_core = AppConfig.GetMode("gpu_core");
|
int core = AppConfig.GetMode("gpu_core");
|
||||||
int gpu_memory = AppConfig.GetMode("gpu_memory");
|
int memory = AppConfig.GetMode("gpu_memory");
|
||||||
|
int clock_limit = AppConfig.GetMode("gpu_clock_limit");
|
||||||
|
|
||||||
if (gpu_core == -1 && gpu_memory == -1) return;
|
if (core == -1 && memory == -1) return;
|
||||||
|
|
||||||
//if ((gpu_core > -5 && gpu_core < 5) && (gpu_memory > -5 && gpu_memory < 5)) launchAsAdmin = false;
|
//if ((gpu_core > -5 && gpu_core < 5) && (gpu_memory > -5 && gpu_memory < 5)) launchAsAdmin = false;
|
||||||
|
|
||||||
@@ -305,20 +306,16 @@ namespace GHelper.Mode
|
|||||||
using NvidiaGpuControl nvControl = (NvidiaGpuControl)HardwareControl.GpuControl;
|
using NvidiaGpuControl nvControl = (NvidiaGpuControl)HardwareControl.GpuControl;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
int getStatus = nvControl.GetClocks(out int current_core, out int current_memory);
|
int statusLimit = nvControl.SetMaxGPUClock(clock_limit);
|
||||||
if (getStatus != -1)
|
int statusClocks = nvControl.SetClocks(core, memory);
|
||||||
{
|
if ((statusLimit != 0 || statusClocks != 0) && launchAsAdmin) ProcessHelper.RunAsAdmin("gpu");
|
||||||
if (Math.Abs(gpu_core - current_core) < 5 && Math.Abs(gpu_memory - current_memory) < 5) return;
|
|
||||||
}
|
|
||||||
|
|
||||||
int setStatus = nvControl.SetClocks(gpu_core, gpu_memory);
|
|
||||||
if (launchAsAdmin && setStatus == -1) ProcessHelper.RunAsAdmin("gpu");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Logger.WriteLine(ex.ToString());
|
Logger.WriteLine(ex.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
settings.GPUInit();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -582,6 +582,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 == "")
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ _To keep auto switching and hotkeys working the app needs to stay running in the
|
|||||||
|
|
||||||
All Modes are **baked in BIOS** along with default fan curves and power limits and 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.
|
||||||
|
|
||||||
Each BIOS mode is paired with matching Windows Power Mode. If you don't want app to set Power Modes uncheck ``Extra``->``Auto adjust Windows Power Modes``
|
Each BIOS mode is paired with matching Windows Power Mode. You can adjust this setting under ``Fans + Power``
|
||||||
|
|
||||||
1. **Silent** in BIOS + **Best power efficiency** power mode
|
1. **Silent** in BIOS + **Best power efficiency** power mode
|
||||||
2. **Balanced** (Performance in AC) in BIOS + **Balanced** power mode
|
2. **Balanced** (Performance in AC) in BIOS + **Balanced** power mode
|
||||||
@@ -227,16 +227,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
|
||||||
|
|||||||
Reference in New Issue
Block a user