Compare commits

...

11 Commits
v0.72 ... v0.73

Author SHA1 Message Date
Serge
8eb923a703 PPT labels 2023-05-30 22:43:42 +02:00
Serge
59548be543 PPT UI tweaks 2023-05-30 21:35:21 +02:00
Serge
1596ce84e8 PPT labels fixes 2023-05-30 18:58:44 +02:00
Serge
f670b9e0dc Merge branch 'main' of https://github.com/seerge/g-helper 2023-05-30 14:55:52 +02:00
Serge
52c2987c88 UI tweaks 2023-05-30 14:55:50 +02:00
Serge
c9aa910035 Merge pull request #485 from marcelomijas/main
Update Spanish translation
2023-05-30 12:19:58 +02:00
Marcelo Moreno
22f648a23f Update Spanish translation 2023-05-30 12:18:31 +02:00
Serge
9255a8554d Merge branch 'main' of https://github.com/seerge/g-helper 2023-05-30 00:33:27 +02:00
Serge
859f4f55c3 GPU sliders fix 2023-05-30 00:33:24 +02:00
Serge
7e3872939b Update README.md 2023-05-29 23:54:59 +02:00
Serge
2556583451 Update README.md 2023-05-29 23:53:19 +02:00
10 changed files with 447 additions and 321 deletions

View File

@@ -1,4 +1,5 @@
using System.Management; using GHelper;
using System.Management;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
public enum AsusFan public enum AsusFan
@@ -65,16 +66,16 @@ public class AsusACPI
public const int Temp_CPU = 0x00120094; public const int Temp_CPU = 0x00120094;
public const int Temp_GPU = 0x00120097; public const int Temp_GPU = 0x00120097;
public const int PPT_TotalA0 = 0x001200A0; // Total PPT on 2022 (PPT_LIMIT_SLOW ) and CPU PPT on 2021 public const int PPT_TotalA0 = 0x001200A0; // SPL (Total limit for all-AMD models)
public const int PPT_EDCA1 = 0x001200A1; // CPU EDC public const int PPT_EDCA1 = 0x001200A1; // CPU EDC
public const int PPT_TDCA2 = 0x001200A2; // CPU TDC public const int PPT_TDCA2 = 0x001200A2; // CPU TDC
public const int PPT_APUA3 = 0x001200A3; // APU PPT ON 2021, doesn't work on 2022 public const int PPT_APUA3 = 0x001200A3; // sPPT (long boost limit)
public const int PPT_CPUB0 = 0x001200B0; // CPU PPT on 2022 (PPT_LIMIT_APU) public const int PPT_CPUB0 = 0x001200B0; // CPU PPT on 2022 (PPT_LIMIT_APU)
public const int PPT_CPUB1 = 0x001200B1; // Total PPT on 2022 (PPT_LIMIT_SLOW) public const int PPT_CPUB1 = 0x001200B1; // Total PPT on 2022 (PPT_LIMIT_SLOW)
public const int PPT_GPUC0 = 0x001200C0; // NVIDIA GPU Boost public const int PPT_GPUC0 = 0x001200C0; // NVIDIA GPU Boost
public const int PPT_APUC1 = 0x001200C1; // Actual Power Limit (PPT_LIMIT_FAST) AND Sustained Power Limit (STAPM_LIMIT) public const int PPT_APUC1 = 0x001200C1; // fPPT (fast boost limit)
public const int PPT_GPUC2 = 0x001200C2; // NVIDIA GPU Temp Target (75.. 87 C) public const int PPT_GPUC2 = 0x001200C2; // NVIDIA GPU Temp Target (75.. 87 C)
public const int TUF_KB_BRIGHTNESS = 0x00050021; public const int TUF_KB_BRIGHTNESS = 0x00050021;
@@ -170,8 +171,8 @@ public class AsusACPI
data[0] = BitConverter.GetBytes(eventHandle.ToInt32())[0]; data[0] = BitConverter.GetBytes(eventHandle.ToInt32())[0];
data[1] = BitConverter.GetBytes(eventHandle.ToInt32())[1]; data[1] = BitConverter.GetBytes(eventHandle.ToInt32())[1];
result = Control(0x222400, data, outBuffer); Control(0x222400, data, outBuffer);
Logger.WriteLine("ACPI " + result + ":" + BitConverter.ToString(data) + "|" + BitConverter.ToString(outBuffer)); Logger.WriteLine("ACPI :" + BitConverter.ToString(data) + "|" + BitConverter.ToString(outBuffer));
while (true) while (true)
{ {
@@ -202,10 +203,11 @@ public class AsusACPI
} }
public bool Control(uint dwIoControlCode, byte[] lpInBuffer, byte[] lpOutBuffer) public void Control(uint dwIoControlCode, byte[] lpInBuffer, byte[] lpOutBuffer)
{ {
uint lpBytesReturned = 0; uint lpBytesReturned = 0;
return DeviceIoControl( DeviceIoControl(
handle, handle,
dwIoControlCode, dwIoControlCode,
lpInBuffer, lpInBuffer,
@@ -412,6 +414,11 @@ public class AsusACPI
return DeviceGet(GPUXGConnected) == 1; return DeviceGet(GPUXGConnected) == 1;
} }
public bool IsAllAmdPPT()
{
return DeviceGet(PPT_CPUB0) >= 0 && DeviceGet(PPT_GPUC0) < 0;
}
public void TUFKeyboardBrightness(int brightness) public void TUFKeyboardBrightness(int brightness)
{ {
int param = 0x80 | (brightness & 0x7F); int param = 0x80 | (brightness & 0x7F);

View File

@@ -124,6 +124,10 @@ namespace GHelper
_modes.Remove(3); _modes.Remove(3);
} }
if (AppConfig.ContainsModel("G513")) {
return _modes;
}
if (AppConfig.ContainsModel("Strix") || AppConfig.ContainsModel("Scar")) if (AppConfig.ContainsModel("Strix") || AppConfig.ContainsModel("Scar"))
{ {
return _modesStrix; return _modesStrix;

336
app/Fans.Designer.cs generated
View File

@@ -60,18 +60,18 @@ namespace GHelper
panelApplyPower = new Panel(); panelApplyPower = new Panel();
checkApplyPower = new RCheckBox(); checkApplyPower = new RCheckBox();
labelInfo = new Label(); labelInfo = new Label();
panelAPU = new Panel(); panelB0 = new Panel();
labelAPU = new Label(); labelB0 = new Label();
labelLeftAPU = new Label(); labelLeftB0 = new Label();
trackAPU = new TrackBar(); trackB0 = new TrackBar();
panelCPU = new Panel(); panelC1 = new Panel();
labelCPU = new Label(); labelC1 = new Label();
labelLeftCPU = new Label(); labelLeftC1 = new Label();
trackCPU = new TrackBar(); trackC1 = new TrackBar();
panelTotal = new Panel(); panelA0 = new Panel();
labelTotal = new Label(); labelA0 = new Label();
labelLeftPlatform = new Label(); labelLeftA0 = new Label();
trackTotal = new TrackBar(); trackA0 = new TrackBar();
panelTitleCPU = new Panel(); panelTitleCPU = new Panel();
pictureBox1 = new PictureBox(); pictureBox1 = new PictureBox();
labelPowerLimits = new Label(); labelPowerLimits = new Label();
@@ -107,12 +107,12 @@ namespace GHelper
panelSliders.SuspendLayout(); panelSliders.SuspendLayout();
panelPower.SuspendLayout(); panelPower.SuspendLayout();
panelApplyPower.SuspendLayout(); panelApplyPower.SuspendLayout();
panelAPU.SuspendLayout(); panelB0.SuspendLayout();
((System.ComponentModel.ISupportInitialize)trackAPU).BeginInit(); ((System.ComponentModel.ISupportInitialize)trackB0).BeginInit();
panelCPU.SuspendLayout(); panelC1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)trackCPU).BeginInit(); ((System.ComponentModel.ISupportInitialize)trackC1).BeginInit();
panelTotal.SuspendLayout(); panelA0.SuspendLayout();
((System.ComponentModel.ISupportInitialize)trackTotal).BeginInit(); ((System.ComponentModel.ISupportInitialize)trackA0).BeginInit();
panelTitleCPU.SuspendLayout(); panelTitleCPU.SuspendLayout();
((System.ComponentModel.ISupportInitialize)pictureBox1).BeginInit(); ((System.ComponentModel.ISupportInitialize)pictureBox1).BeginInit();
panelGPU.SuspendLayout(); panelGPU.SuspendLayout();
@@ -366,9 +366,9 @@ namespace GHelper
panelPower.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelPower.AutoSizeMode = AutoSizeMode.GrowAndShrink;
panelPower.Controls.Add(panelApplyPower); panelPower.Controls.Add(panelApplyPower);
panelPower.Controls.Add(labelInfo); panelPower.Controls.Add(labelInfo);
panelPower.Controls.Add(panelAPU); panelPower.Controls.Add(panelB0);
panelPower.Controls.Add(panelCPU); panelPower.Controls.Add(panelC1);
panelPower.Controls.Add(panelTotal); panelPower.Controls.Add(panelA0);
panelPower.Controls.Add(panelTitleCPU); panelPower.Controls.Add(panelTitleCPU);
panelPower.Dock = DockStyle.Fill; panelPower.Dock = DockStyle.Fill;
panelPower.Location = new Point(10, 652); panelPower.Location = new Point(10, 652);
@@ -411,155 +411,155 @@ namespace GHelper
labelInfo.TabIndex = 43; labelInfo.TabIndex = 43;
labelInfo.Text = "Experimental Feature"; labelInfo.Text = "Experimental Feature";
// //
// panelAPU // panelB0
// //
panelAPU.AutoSize = true; panelB0.AutoSize = true;
panelAPU.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelB0.AutoSizeMode = AutoSizeMode.GrowAndShrink;
panelAPU.Controls.Add(labelAPU); panelB0.Controls.Add(labelB0);
panelAPU.Controls.Add(labelLeftAPU); panelB0.Controls.Add(labelLeftB0);
panelAPU.Controls.Add(trackAPU); panelB0.Controls.Add(trackB0);
panelAPU.Dock = DockStyle.Top; panelB0.Dock = DockStyle.Top;
panelAPU.Location = new Point(0, 342); panelB0.Location = new Point(0, 346);
panelAPU.Margin = new Padding(4); panelB0.Margin = new Padding(4);
panelAPU.Name = "panelAPU"; panelB0.Name = "panelB0";
panelAPU.Size = new Size(523, 140); panelB0.Size = new Size(523, 136);
panelAPU.TabIndex = 45; panelB0.TabIndex = 41;
// //
// labelAPU // labelB0
// //
labelAPU.Anchor = AnchorStyles.Top | AnchorStyles.Right; labelB0.Anchor = AnchorStyles.Top | AnchorStyles.Right;
labelAPU.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point); labelB0.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
labelAPU.Location = new Point(396, 8); labelB0.Location = new Point(398, 8);
labelAPU.Margin = new Padding(4, 0, 4, 0); labelB0.Margin = new Padding(4, 0, 4, 0);
labelAPU.Name = "labelAPU"; labelB0.Name = "labelB0";
labelAPU.Size = new Size(119, 32); labelB0.Size = new Size(120, 32);
labelAPU.TabIndex = 13; labelB0.TabIndex = 13;
labelAPU.Text = "APU"; labelB0.Text = "CPU";
labelAPU.TextAlign = ContentAlignment.TopRight; labelB0.TextAlign = ContentAlignment.TopRight;
// //
// labelLeftAPU // labelLeftB0
// //
labelLeftAPU.AutoSize = true; labelLeftB0.AutoSize = true;
labelLeftAPU.Location = new Point(10, 8); labelLeftB0.Location = new Point(10, 8);
labelLeftAPU.Margin = new Padding(4, 0, 4, 0); labelLeftB0.Margin = new Padding(4, 0, 4, 0);
labelLeftAPU.Name = "labelLeftAPU"; labelLeftB0.Name = "labelLeftB0";
labelLeftAPU.Size = new Size(58, 32); labelLeftB0.Size = new Size(58, 32);
labelLeftAPU.TabIndex = 12; labelLeftB0.TabIndex = 12;
labelLeftAPU.Text = "APU"; labelLeftB0.Text = "CPU";
// //
// trackAPU // trackB0
// //
trackAPU.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; trackB0.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
trackAPU.Location = new Point(6, 48); trackB0.Location = new Point(6, 44);
trackAPU.Margin = new Padding(4, 2, 4, 2); trackB0.Margin = new Padding(4, 2, 4, 2);
trackAPU.Maximum = 85; trackB0.Maximum = 85;
trackAPU.Minimum = 5; trackB0.Minimum = 5;
trackAPU.Name = "trackAPU"; trackB0.Name = "trackB0";
trackAPU.Size = new Size(513, 90); trackB0.Size = new Size(513, 90);
trackAPU.TabIndex = 11; trackB0.TabIndex = 11;
trackAPU.TickFrequency = 5; trackB0.TickFrequency = 5;
trackAPU.TickStyle = TickStyle.TopLeft; trackB0.TickStyle = TickStyle.TopLeft;
trackAPU.Value = 80; trackB0.Value = 80;
// //
// panelCPU // panelC1
// //
panelCPU.AutoSize = true; panelC1.AutoSize = true;
panelCPU.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelC1.AutoSizeMode = AutoSizeMode.GrowAndShrink;
panelCPU.Controls.Add(labelCPU); panelC1.Controls.Add(labelC1);
panelCPU.Controls.Add(labelLeftCPU); panelC1.Controls.Add(labelLeftC1);
panelCPU.Controls.Add(trackCPU); panelC1.Controls.Add(trackC1);
panelCPU.Dock = DockStyle.Top; panelC1.Dock = DockStyle.Top;
panelCPU.Location = new Point(0, 206); panelC1.Location = new Point(0, 206);
panelCPU.Margin = new Padding(4); panelC1.Margin = new Padding(4);
panelCPU.Name = "panelCPU"; panelC1.Name = "panelC1";
panelCPU.Size = new Size(523, 136); panelC1.Size = new Size(523, 140);
panelCPU.TabIndex = 41; panelC1.TabIndex = 45;
// //
// labelCPU // labelC1
// //
labelCPU.Anchor = AnchorStyles.Top | AnchorStyles.Right; labelC1.Anchor = AnchorStyles.Top | AnchorStyles.Right;
labelCPU.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point); labelC1.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
labelCPU.Location = new Point(398, 8); labelC1.Location = new Point(396, 8);
labelCPU.Margin = new Padding(4, 0, 4, 0); labelC1.Margin = new Padding(4, 0, 4, 0);
labelCPU.Name = "labelCPU"; labelC1.Name = "labelC1";
labelCPU.Size = new Size(120, 32); labelC1.Size = new Size(119, 32);
labelCPU.TabIndex = 13; labelC1.TabIndex = 13;
labelCPU.Text = "CPU"; labelC1.Text = "APU";
labelCPU.TextAlign = ContentAlignment.TopRight; labelC1.TextAlign = ContentAlignment.TopRight;
// //
// labelLeftCPU // labelLeftC1
// //
labelLeftCPU.AutoSize = true; labelLeftC1.AutoSize = true;
labelLeftCPU.Location = new Point(10, 8); labelLeftC1.Location = new Point(10, 8);
labelLeftCPU.Margin = new Padding(4, 0, 4, 0); labelLeftC1.Margin = new Padding(4, 0, 4, 0);
labelLeftCPU.Name = "labelLeftCPU"; labelLeftC1.Name = "labelLeftC1";
labelLeftCPU.Size = new Size(58, 32); labelLeftC1.Size = new Size(58, 32);
labelLeftCPU.TabIndex = 12; labelLeftC1.TabIndex = 12;
labelLeftCPU.Text = "CPU"; labelLeftC1.Text = "APU";
// //
// trackCPU // trackC1
// //
trackCPU.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; trackC1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
trackCPU.Location = new Point(6, 44); trackC1.Location = new Point(6, 48);
trackCPU.Margin = new Padding(4, 2, 4, 2); trackC1.Margin = new Padding(4, 2, 4, 2);
trackCPU.Maximum = 85; trackC1.Maximum = 85;
trackCPU.Minimum = 5; trackC1.Minimum = 5;
trackCPU.Name = "trackCPU"; trackC1.Name = "trackC1";
trackCPU.Size = new Size(513, 90); trackC1.Size = new Size(513, 90);
trackCPU.TabIndex = 11; trackC1.TabIndex = 11;
trackCPU.TickFrequency = 5; trackC1.TickFrequency = 5;
trackCPU.TickStyle = TickStyle.TopLeft; trackC1.TickStyle = TickStyle.TopLeft;
trackCPU.Value = 80; trackC1.Value = 80;
// //
// panelTotal // panelA0
// //
panelTotal.AutoSize = true; panelA0.AutoSize = true;
panelTotal.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelA0.AutoSizeMode = AutoSizeMode.GrowAndShrink;
panelTotal.Controls.Add(labelTotal); panelA0.Controls.Add(labelA0);
panelTotal.Controls.Add(labelLeftPlatform); panelA0.Controls.Add(labelLeftA0);
panelTotal.Controls.Add(trackTotal); panelA0.Controls.Add(trackA0);
panelTotal.Dock = DockStyle.Top; panelA0.Dock = DockStyle.Top;
panelTotal.Location = new Point(0, 66); panelA0.Location = new Point(0, 66);
panelTotal.Margin = new Padding(4); panelA0.Margin = new Padding(4);
panelTotal.Name = "panelTotal"; panelA0.Name = "panelA0";
panelTotal.Size = new Size(523, 140); panelA0.Size = new Size(523, 140);
panelTotal.TabIndex = 40; panelA0.TabIndex = 40;
// //
// labelTotal // labelA0
// //
labelTotal.Anchor = AnchorStyles.Top | AnchorStyles.Right; labelA0.Anchor = AnchorStyles.Top | AnchorStyles.Right;
labelTotal.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point); labelA0.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
labelTotal.Location = new Point(396, 10); labelA0.Location = new Point(396, 10);
labelTotal.Margin = new Padding(4, 0, 4, 0); labelA0.Margin = new Padding(4, 0, 4, 0);
labelTotal.Name = "labelTotal"; labelA0.Name = "labelA0";
labelTotal.Size = new Size(122, 32); labelA0.Size = new Size(122, 32);
labelTotal.TabIndex = 12; labelA0.TabIndex = 12;
labelTotal.Text = "Platform"; labelA0.Text = "Platform";
labelTotal.TextAlign = ContentAlignment.TopRight; labelA0.TextAlign = ContentAlignment.TopRight;
// //
// labelLeftPlatform // labelLeftA0
// //
labelLeftPlatform.AutoSize = true; labelLeftA0.AutoSize = true;
labelLeftPlatform.Location = new Point(10, 10); labelLeftA0.Location = new Point(10, 10);
labelLeftPlatform.Margin = new Padding(4, 0, 4, 0); labelLeftA0.Margin = new Padding(4, 0, 4, 0);
labelLeftPlatform.Name = "labelLeftPlatform"; labelLeftA0.Name = "labelLeftA0";
labelLeftPlatform.Size = new Size(104, 32); labelLeftA0.Size = new Size(104, 32);
labelLeftPlatform.TabIndex = 11; labelLeftA0.TabIndex = 11;
labelLeftPlatform.Text = "Platform"; labelLeftA0.Text = "Platform";
// //
// trackTotal // trackA0
// //
trackTotal.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; trackA0.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
trackTotal.Location = new Point(6, 48); trackA0.Location = new Point(6, 48);
trackTotal.Margin = new Padding(4, 2, 4, 2); trackA0.Margin = new Padding(4, 2, 4, 2);
trackTotal.Maximum = 180; trackA0.Maximum = 180;
trackTotal.Minimum = 10; trackA0.Minimum = 10;
trackTotal.Name = "trackTotal"; trackA0.Name = "trackA0";
trackTotal.Size = new Size(513, 90); trackA0.Size = new Size(513, 90);
trackTotal.TabIndex = 10; trackA0.TabIndex = 10;
trackTotal.TickFrequency = 5; trackA0.TickFrequency = 5;
trackTotal.TickStyle = TickStyle.TopLeft; trackA0.TickStyle = TickStyle.TopLeft;
trackTotal.Value = 125; trackA0.Value = 125;
// //
// panelTitleCPU // panelTitleCPU
// //
@@ -873,15 +873,15 @@ namespace GHelper
panelPower.PerformLayout(); panelPower.PerformLayout();
panelApplyPower.ResumeLayout(false); panelApplyPower.ResumeLayout(false);
panelApplyPower.PerformLayout(); panelApplyPower.PerformLayout();
panelAPU.ResumeLayout(false); panelB0.ResumeLayout(false);
panelAPU.PerformLayout(); panelB0.PerformLayout();
((System.ComponentModel.ISupportInitialize)trackAPU).EndInit(); ((System.ComponentModel.ISupportInitialize)trackB0).EndInit();
panelCPU.ResumeLayout(false); panelC1.ResumeLayout(false);
panelCPU.PerformLayout(); panelC1.PerformLayout();
((System.ComponentModel.ISupportInitialize)trackCPU).EndInit(); ((System.ComponentModel.ISupportInitialize)trackC1).EndInit();
panelTotal.ResumeLayout(false); panelA0.ResumeLayout(false);
panelTotal.PerformLayout(); panelA0.PerformLayout();
((System.ComponentModel.ISupportInitialize)trackTotal).EndInit(); ((System.ComponentModel.ISupportInitialize)trackA0).EndInit();
panelTitleCPU.ResumeLayout(false); panelTitleCPU.ResumeLayout(false);
panelTitleCPU.PerformLayout(); panelTitleCPU.PerformLayout();
((System.ComponentModel.ISupportInitialize)pictureBox1).EndInit(); ((System.ComponentModel.ISupportInitialize)pictureBox1).EndInit();
@@ -917,14 +917,14 @@ namespace GHelper
private Label labelTip; private Label labelTip;
private Panel panelPower; private Panel panelPower;
private Label labelInfo; private Label labelInfo;
private Panel panelCPU; private Panel panelB0;
private Label labelCPU; private Label labelB0;
private Label labelLeftCPU; private Label labelLeftB0;
private TrackBar trackCPU; private TrackBar trackB0;
private Panel panelTotal; private Panel panelA0;
private Label labelTotal; private Label labelA0;
private Label labelLeftPlatform; private Label labelLeftA0;
private TrackBar trackTotal; private TrackBar trackA0;
private Panel panelTitleCPU; private Panel panelTitleCPU;
private PictureBox pictureBox1; private PictureBox pictureBox1;
private Label labelPowerLimits; private Label labelPowerLimits;
@@ -959,9 +959,9 @@ namespace GHelper
private RComboBox comboBoost; private RComboBox comboBoost;
private PictureBox picturePerf; private PictureBox picturePerf;
private Label labelFans; private Label labelFans;
private Panel panelAPU; private Panel panelC1;
private Label labelAPU; private Label labelC1;
private Label labelLeftAPU; private Label labelLeftC1;
private TrackBar trackAPU; private TrackBar trackC1;
} }
} }

View File

@@ -77,22 +77,22 @@ namespace GHelper
buttonReset.Click += ButtonReset_Click; buttonReset.Click += ButtonReset_Click;
trackTotal.Maximum = AsusACPI.MaxTotal; trackA0.Maximum = AsusACPI.MaxTotal;
trackTotal.Minimum = AsusACPI.MinTotal; trackA0.Minimum = AsusACPI.MinTotal;
trackCPU.Maximum = AsusACPI.MaxCPU; trackB0.Maximum = AsusACPI.MaxCPU;
trackCPU.Minimum = AsusACPI.MinCPU; trackB0.Minimum = AsusACPI.MinCPU;
trackAPU.Maximum = AsusACPI.MaxCPU; trackC1.Maximum = AsusACPI.MaxTotal;
trackAPU.Minimum = AsusACPI.MinCPU; trackC1.Minimum = AsusACPI.MinTotal;
trackAPU.Scroll += TrackPower_Scroll; trackC1.Scroll += TrackPower_Scroll;
trackCPU.Scroll += TrackPower_Scroll; trackB0.Scroll += TrackPower_Scroll;
trackTotal.Scroll += TrackPower_Scroll; trackA0.Scroll += TrackPower_Scroll;
trackAPU.MouseUp += TrackPower_MouseUp; trackC1.MouseUp += TrackPower_MouseUp;
trackCPU.MouseUp += TrackPower_MouseUp; trackB0.MouseUp += TrackPower_MouseUp;
trackTotal.MouseUp += TrackPower_MouseUp; trackA0.MouseUp += TrackPower_MouseUp;
checkApplyFans.Click += CheckApplyFans_Click; checkApplyFans.Click += CheckApplyFans_Click;
checkApplyPower.Click += CheckApplyPower_Click; checkApplyPower.Click += CheckApplyPower_Click;
@@ -145,6 +145,15 @@ namespace GHelper
public void InitGPU(bool readClocks = false) public void InitGPU(bool readClocks = false)
{ {
if (Program.acpi.DeviceGet(AsusACPI.GPUEco) == 1)
{
gpuVisible = panelGPU.Visible = false;
return;
}
if (HardwareControl.GpuControl is null) HardwareControl.RecreateGpuControl();
if (HardwareControl.GpuControl is not null && HardwareControl.GpuControl.IsNvidia) if (HardwareControl.GpuControl is not null && HardwareControl.GpuControl.IsNvidia)
{ {
nvControl = (NvidiaGpuControl)HardwareControl.GpuControl; nvControl = (NvidiaGpuControl)HardwareControl.GpuControl;
@@ -402,37 +411,45 @@ namespace GHelper
public void InitPower(bool changed = false) public void InitPower(bool changed = false)
{ {
bool cpuAmode = (Program.acpi.DeviceGet(AsusACPI.PPT_TotalA0) >= 0); // 2021 model + bool modeA0 = Program.acpi.DeviceGet(AsusACPI.PPT_TotalA0) >= 0;
bool cpuBmode = (Program.acpi.DeviceGet(AsusACPI.PPT_CPUB0) >= 0); // 2022 model + bool modeB0 = Program.acpi.IsAllAmdPPT();
bool apuMode = (Program.acpi.DeviceGet(AsusACPI.PPT_APUC1) >= 0); bool modeC1 = Program.acpi.DeviceGet(AsusACPI.PPT_APUC1) >= 0;
powerVisible = panelPower.Visible = cpuAmode; powerVisible = panelPower.Visible = modeA0;
panelCPU.Visible = cpuBmode; panelB0.Visible = modeB0;
panelAPU.Visible = apuMode; panelC1.Visible = modeC1;
// Yes, that's stupid, but Total slider on 2021 model actually adjusts CPU PPT
if (!cpuBmode) // All AMD version has B0 but doesn't have C0 (Nvidia GPU) settings
if (modeB0)
{ {
labelLeftPlatform.Text = "CPU"; labelLeftA0.Text = "Platform (CPU + GPU)";
labelLeftB0.Text = "CPU";
panelC1.Visible = false;
}
else
{
labelLeftA0.Text = "CPU Slow (SPL + sPPT)";
labelLeftC1.Text = "CPU Fast (fPPT)";
} }
int limit_total; int limit_total;
int limit_cpu; int limit_cpu;
int limit_apu; int limit_fast;
bool apply = AppConfig.getConfigPerf("auto_apply_power") == 1; bool apply = AppConfig.getConfigPerf("auto_apply_power") == 1;
if (changed) if (changed)
{ {
limit_total = trackTotal.Value; limit_total = trackA0.Value;
limit_cpu = trackCPU.Value; limit_cpu = trackB0.Value;
limit_apu = trackAPU.Value; limit_fast = trackC1.Value;
} }
else else
{ {
limit_total = AppConfig.getConfigPerf("limit_total"); limit_total = AppConfig.getConfigPerf("limit_total");
limit_cpu = AppConfig.getConfigPerf("limit_cpu"); limit_cpu = AppConfig.getConfigPerf("limit_cpu");
limit_apu = AppConfig.getConfigPerf("limit_apu"); limit_fast = AppConfig.getConfigPerf("limit_fast");
} }
if (limit_total < 0) limit_total = AsusACPI.DefaultTotal; if (limit_total < 0) limit_total = AsusACPI.DefaultTotal;
@@ -444,25 +461,23 @@ namespace GHelper
if (limit_cpu < AsusACPI.MinCPU) limit_cpu = AsusACPI.MinCPU; if (limit_cpu < AsusACPI.MinCPU) limit_cpu = AsusACPI.MinCPU;
if (limit_cpu > limit_total) limit_cpu = limit_total; if (limit_cpu > limit_total) limit_cpu = limit_total;
if (limit_apu < 0) limit_apu = AsusACPI.DefaultCPU; if (limit_fast < 0) limit_fast = AsusACPI.DefaultTotal;
if (limit_apu > AsusACPI.MaxCPU) limit_apu = AsusACPI.MaxCPU; if (limit_fast > AsusACPI.MaxTotal) limit_fast = AsusACPI.MaxTotal;
if (limit_apu < AsusACPI.MinCPU) limit_apu = AsusACPI.MinCPU; if (limit_fast < AsusACPI.MinTotal) limit_fast = AsusACPI.MinTotal;
if (limit_apu > limit_total) limit_apu = limit_total;
trackA0.Value = limit_total;
trackTotal.Value = limit_total; trackB0.Value = limit_cpu;
trackCPU.Value = limit_cpu; trackC1.Value = limit_fast;
trackAPU.Value = limit_apu;
checkApplyPower.Checked = apply; checkApplyPower.Checked = apply;
labelTotal.Text = trackTotal.Value.ToString() + "W"; labelA0.Text = trackA0.Value.ToString() + "W";
labelCPU.Text = trackCPU.Value.ToString() + "W"; labelB0.Text = trackB0.Value.ToString() + "W";
labelAPU.Text = trackAPU.Value.ToString() + "W"; labelC1.Text = trackC1.Value.ToString() + "W";
AppConfig.setConfigPerf("limit_total", limit_total); AppConfig.setConfigPerf("limit_total", limit_total);
AppConfig.setConfigPerf("limit_cpu", limit_cpu); AppConfig.setConfigPerf("limit_cpu", limit_cpu);
AppConfig.setConfigPerf("limit_apu", limit_apu); AppConfig.setConfigPerf("limit_fast", limit_fast);
} }

View File

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

View File

@@ -190,7 +190,10 @@
<value>Encendida</value> <value>Encendida</value>
</data> </data>
<data name="BacklightTimeout" xml:space="preserve"> <data name="BacklightTimeout" xml:space="preserve">
<value>Apagar retroiluminación con batería (segundos)</value> <value>Apagar con batería tras (segundos)</value>
</data>
<data name="BacklightTimeoutPlugged" xml:space="preserve">
<value>Apagar cuando está enchufado tras (0 - siempre encendida)</value>
</data> </data>
<data name="Balanced" xml:space="preserve"> <data name="Balanced" xml:space="preserve">
<value>Equilibrado</value> <value>Equilibrado</value>
@@ -303,6 +306,9 @@
<data name="KeyboardAuto" xml:space="preserve"> <data name="KeyboardAuto" xml:space="preserve">
<value>Bajar retroiluminación con batería</value> <value>Bajar retroiluminación con batería</value>
</data> </data>
<data name="KillGpuApps" xml:space="preserve">
<value>Detener todas las aplicaciones que usan la GPU cuando se cambia a Eco</value>
</data>
<data name="LaptopBacklight" xml:space="preserve"> <data name="LaptopBacklight" xml:space="preserve">
<value>Retroiluminación</value> <value>Retroiluminación</value>
</data> </data>

151
app/Settings.Designer.cs generated
View File

@@ -66,9 +66,9 @@ namespace GHelper
tableGPU = new TableLayoutPanel(); tableGPU = new TableLayoutPanel();
buttonEco = new RButton(); buttonEco = new RButton();
buttonStandard = new RButton(); buttonStandard = new RButton();
buttonXGM = new RButton();
buttonOptimized = new RButton(); buttonOptimized = new RButton();
buttonUltimate = new RButton(); buttonUltimate = new RButton();
buttonXGM = new RButton();
panelScreen = new Panel(); panelScreen = new Panel();
labelMidFan = new Label(); labelMidFan = new Label();
labelTipScreen = new Label(); labelTipScreen = new Label();
@@ -81,12 +81,12 @@ namespace GHelper
labelSreen = new Label(); labelSreen = new Label();
panelKeyboard = new Panel(); panelKeyboard = new Panel();
tableLayoutKeyboard = new TableLayoutPanel(); tableLayoutKeyboard = new TableLayoutPanel();
comboKeyboard = new RComboBox(); buttonKeyboard = new RButton();
panelColor = new Panel(); panelColor = new Panel();
pictureColor2 = new PictureBox(); pictureColor2 = new PictureBox();
pictureColor = new PictureBox(); pictureColor = new PictureBox();
buttonKeyboardColor = new RButton(); buttonKeyboardColor = new RButton();
buttonKeyboard = new RButton(); comboKeyboard = new RComboBox();
pictureKeyboard = new PictureBox(); pictureKeyboard = new PictureBox();
labelKeyboard = new Label(); labelKeyboard = new Label();
panelMatrix.SuspendLayout(); panelMatrix.SuspendLayout();
@@ -121,7 +121,7 @@ namespace GHelper
panelMatrix.Controls.Add(pictureMatrix); panelMatrix.Controls.Add(pictureMatrix);
panelMatrix.Controls.Add(labelMatrix); panelMatrix.Controls.Add(labelMatrix);
panelMatrix.Dock = DockStyle.Top; panelMatrix.Dock = DockStyle.Top;
panelMatrix.Location = new Point(10, 758); panelMatrix.Location = new Point(10, 795);
panelMatrix.Margin = new Padding(8); panelMatrix.Margin = new Padding(8);
panelMatrix.Name = "panelMatrix"; panelMatrix.Name = "panelMatrix";
panelMatrix.Padding = new Padding(0, 0, 0, 12); panelMatrix.Padding = new Padding(0, 0, 0, 12);
@@ -158,7 +158,7 @@ namespace GHelper
tableLayoutMatrix.Name = "tableLayoutMatrix"; tableLayoutMatrix.Name = "tableLayoutMatrix";
tableLayoutMatrix.RowCount = 1; tableLayoutMatrix.RowCount = 1;
tableLayoutMatrix.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); tableLayoutMatrix.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
tableLayoutMatrix.Size = new Size(771, 60); tableLayoutMatrix.Size = new Size(771, 59);
tableLayoutMatrix.TabIndex = 43; tableLayoutMatrix.TabIndex = 43;
// //
// comboMatrix // comboMatrix
@@ -202,7 +202,7 @@ namespace GHelper
buttonMatrix.Dock = DockStyle.Top; buttonMatrix.Dock = DockStyle.Top;
buttonMatrix.FlatAppearance.BorderSize = 0; buttonMatrix.FlatAppearance.BorderSize = 0;
buttonMatrix.FlatStyle = FlatStyle.Flat; buttonMatrix.FlatStyle = FlatStyle.Flat;
buttonMatrix.Location = new Point(518, 8); buttonMatrix.Location = new Point(518, 7);
buttonMatrix.Margin = new Padding(4, 7, 4, 7); buttonMatrix.Margin = new Padding(4, 7, 4, 7);
buttonMatrix.Name = "buttonMatrix"; buttonMatrix.Name = "buttonMatrix";
buttonMatrix.Secondary = true; buttonMatrix.Secondary = true;
@@ -231,7 +231,7 @@ namespace GHelper
labelMatrix.Name = "labelMatrix"; labelMatrix.Name = "labelMatrix";
labelMatrix.Size = new Size(170, 32); labelMatrix.Size = new Size(170, 32);
labelMatrix.TabIndex = 38; labelMatrix.TabIndex = 38;
labelMatrix.Text = Properties.Strings.AnimeMatrix; labelMatrix.Text = "Anime Matrix";
// //
// panelBattery // panelBattery
// //
@@ -244,7 +244,7 @@ namespace GHelper
panelBattery.Controls.Add(pictureBattery); panelBattery.Controls.Add(pictureBattery);
panelBattery.Controls.Add(labelBatteryTitle); panelBattery.Controls.Add(labelBatteryTitle);
panelBattery.Dock = DockStyle.Top; panelBattery.Dock = DockStyle.Top;
panelBattery.Location = new Point(10, 926); panelBattery.Location = new Point(10, 963);
panelBattery.Margin = new Padding(8); panelBattery.Margin = new Padding(8);
panelBattery.Name = "panelBattery"; panelBattery.Name = "panelBattery";
panelBattery.Padding = new Padding(0, 0, 0, 12); panelBattery.Padding = new Padding(0, 0, 0, 12);
@@ -276,7 +276,7 @@ namespace GHelper
// //
// labelVersion // labelVersion
// //
labelVersion.AutoSize = false; labelVersion.Cursor = Cursors.Hand;
labelVersion.Font = new Font("Segoe UI", 9F, FontStyle.Underline, GraphicsUnit.Point); labelVersion.Font = new Font("Segoe UI", 9F, FontStyle.Underline, GraphicsUnit.Point);
labelVersion.ForeColor = SystemColors.ControlDark; labelVersion.ForeColor = SystemColors.ControlDark;
labelVersion.Location = new Point(25, 119); labelVersion.Location = new Point(25, 119);
@@ -285,7 +285,6 @@ namespace GHelper
labelVersion.Size = new Size(300, 32); labelVersion.Size = new Size(300, 32);
labelVersion.TabIndex = 37; labelVersion.TabIndex = 37;
labelVersion.Text = "v.0"; labelVersion.Text = "v.0";
labelVersion.Cursor = Cursors.Hand;
// //
// labelBattery // labelBattery
// //
@@ -317,7 +316,7 @@ namespace GHelper
labelBatteryTitle.Name = "labelBatteryTitle"; labelBatteryTitle.Name = "labelBatteryTitle";
labelBatteryTitle.Size = new Size(393, 36); labelBatteryTitle.Size = new Size(393, 36);
labelBatteryTitle.TabIndex = 34; labelBatteryTitle.TabIndex = 34;
labelBatteryTitle.Text = Properties.Strings.BatteryChargeLimit; labelBatteryTitle.Text = "Battery Charge Limit";
// //
// panelFooter // panelFooter
// //
@@ -326,7 +325,7 @@ namespace GHelper
panelFooter.Controls.Add(buttonQuit); panelFooter.Controls.Add(buttonQuit);
panelFooter.Controls.Add(checkStartup); panelFooter.Controls.Add(checkStartup);
panelFooter.Dock = DockStyle.Top; panelFooter.Dock = DockStyle.Top;
panelFooter.Location = new Point(10, 1089); panelFooter.Location = new Point(10, 1126);
panelFooter.Margin = new Padding(8); panelFooter.Margin = new Padding(8);
panelFooter.Name = "panelFooter"; panelFooter.Name = "panelFooter";
panelFooter.Padding = new Padding(0, 0, 0, 10); panelFooter.Padding = new Padding(0, 0, 0, 10);
@@ -398,7 +397,7 @@ namespace GHelper
labelPerf.Name = "labelPerf"; labelPerf.Name = "labelPerf";
labelPerf.Size = new Size(234, 32); labelPerf.Size = new Size(234, 32);
labelPerf.TabIndex = 31; labelPerf.TabIndex = 31;
labelPerf.Text = Properties.Strings.PerformanceMode; labelPerf.Text = "Performance Mode";
// //
// labelCPUFan // labelCPUFan
// //
@@ -572,7 +571,7 @@ namespace GHelper
labelGPU.Name = "labelGPU"; labelGPU.Name = "labelGPU";
labelGPU.Size = new Size(136, 32); labelGPU.Size = new Size(136, 32);
labelGPU.TabIndex = 18; labelGPU.TabIndex = 18;
labelGPU.Text = Properties.Strings.GPUMode; labelGPU.Text = "GPU Mode";
// //
// labelGPUFan // labelGPUFan
// //
@@ -653,6 +652,29 @@ namespace GHelper
buttonStandard.TextImageRelation = TextImageRelation.ImageAboveText; buttonStandard.TextImageRelation = TextImageRelation.ImageAboveText;
buttonStandard.UseVisualStyleBackColor = false; buttonStandard.UseVisualStyleBackColor = false;
// //
// buttonXGM
//
buttonXGM.Activated = false;
buttonXGM.BackColor = SystemColors.ControlLightLight;
buttonXGM.BorderColor = Color.Transparent;
buttonXGM.BorderRadius = 5;
buttonXGM.Dock = DockStyle.Top;
buttonXGM.FlatAppearance.BorderSize = 0;
buttonXGM.FlatStyle = FlatStyle.Flat;
buttonXGM.ForeColor = SystemColors.ControlText;
buttonXGM.Image = Properties.Resources.icons8_video_48;
buttonXGM.ImageAlign = ContentAlignment.BottomCenter;
buttonXGM.Location = new Point(4, 132);
buttonXGM.Margin = new Padding(4);
buttonXGM.Name = "buttonXGM";
buttonXGM.Secondary = false;
buttonXGM.Size = new Size(185, 120);
buttonXGM.TabIndex = 2;
buttonXGM.Text = "XG Mobile";
buttonXGM.TextImageRelation = TextImageRelation.ImageAboveText;
buttonXGM.UseVisualStyleBackColor = false;
buttonXGM.Visible = false;
//
// buttonOptimized // buttonOptimized
// //
buttonOptimized.Activated = false; buttonOptimized.Activated = false;
@@ -696,30 +718,6 @@ namespace GHelper
buttonUltimate.Text = Properties.Strings.UltimateMode; buttonUltimate.Text = Properties.Strings.UltimateMode;
buttonUltimate.TextImageRelation = TextImageRelation.ImageAboveText; buttonUltimate.TextImageRelation = TextImageRelation.ImageAboveText;
buttonUltimate.UseVisualStyleBackColor = false; buttonUltimate.UseVisualStyleBackColor = false;
//
// buttonXGM
//
buttonXGM.Activated = false;
buttonXGM.BackColor = SystemColors.ControlLightLight;
buttonXGM.BorderColor = Color.Transparent;
buttonXGM.BorderRadius = 5;
buttonXGM.Dock = DockStyle.Top;
buttonXGM.FlatAppearance.BorderSize = 0;
buttonXGM.FlatStyle = FlatStyle.Flat;
buttonXGM.ForeColor = SystemColors.ControlText;
buttonXGM.Image = Properties.Resources.icons8_video_48;
buttonXGM.ImageAlign = ContentAlignment.BottomCenter;
buttonXGM.Location = new Point(390, 4);
buttonXGM.Margin = new Padding(4);
buttonXGM.Name = "buttonXGM";
buttonXGM.Secondary = false;
buttonXGM.Size = new Size(185, 120);
buttonXGM.TabIndex = 2;
buttonXGM.Text = "XG Mobile";
buttonXGM.TextImageRelation = TextImageRelation.ImageAboveText;
buttonXGM.UseVisualStyleBackColor = false;
buttonXGM.Visible = false;
// //
// panelScreen // panelScreen
// //
@@ -731,7 +729,7 @@ namespace GHelper
panelScreen.Controls.Add(pictureScreen); panelScreen.Controls.Add(pictureScreen);
panelScreen.Controls.Add(labelSreen); panelScreen.Controls.Add(labelSreen);
panelScreen.Dock = DockStyle.Top; panelScreen.Dock = DockStyle.Top;
panelScreen.Location = new Point(10, 447); panelScreen.Location = new Point(10, 485);
panelScreen.Margin = new Padding(8); panelScreen.Margin = new Padding(8);
panelScreen.Name = "panelScreen"; panelScreen.Name = "panelScreen";
panelScreen.Padding = new Padding(0, 0, 0, 10); panelScreen.Padding = new Padding(0, 0, 0, 10);
@@ -878,7 +876,7 @@ namespace GHelper
labelSreen.Name = "labelSreen"; labelSreen.Name = "labelSreen";
labelSreen.Size = new Size(176, 32); labelSreen.Size = new Size(176, 32);
labelSreen.TabIndex = 21; labelSreen.TabIndex = 21;
labelSreen.Text = Properties.Strings.LaptopScreen; labelSreen.Text = "Laptop Screen";
// //
// panelKeyboard // panelKeyboard
// //
@@ -888,11 +886,11 @@ namespace GHelper
panelKeyboard.Controls.Add(pictureKeyboard); panelKeyboard.Controls.Add(pictureKeyboard);
panelKeyboard.Controls.Add(labelKeyboard); panelKeyboard.Controls.Add(labelKeyboard);
panelKeyboard.Dock = DockStyle.Top; panelKeyboard.Dock = DockStyle.Top;
panelKeyboard.Location = new Point(10, 628); panelKeyboard.Location = new Point(10, 666);
panelKeyboard.Margin = new Padding(8); panelKeyboard.Margin = new Padding(8);
panelKeyboard.Name = "panelKeyboard"; panelKeyboard.Name = "panelKeyboard";
panelKeyboard.Padding = new Padding(0, 0, 0, 12); panelKeyboard.Padding = new Padding(0, 0, 0, 12);
panelKeyboard.Size = new Size(810, 130); panelKeyboard.Size = new Size(810, 129);
panelKeyboard.TabIndex = 39; panelKeyboard.TabIndex = 39;
// //
// tableLayoutKeyboard // tableLayoutKeyboard
@@ -912,25 +910,26 @@ namespace GHelper
tableLayoutKeyboard.Name = "tableLayoutKeyboard"; tableLayoutKeyboard.Name = "tableLayoutKeyboard";
tableLayoutKeyboard.RowCount = 1; tableLayoutKeyboard.RowCount = 1;
tableLayoutKeyboard.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); tableLayoutKeyboard.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
tableLayoutKeyboard.Size = new Size(771, 60); tableLayoutKeyboard.Size = new Size(771, 59);
tableLayoutKeyboard.TabIndex = 39; tableLayoutKeyboard.TabIndex = 39;
// //
// comboKeyboard // buttonKeyboard
// //
comboKeyboard.BorderColor = Color.White; buttonKeyboard.Activated = false;
comboKeyboard.ButtonColor = Color.FromArgb(255, 255, 255); buttonKeyboard.BackColor = SystemColors.ControlLight;
comboKeyboard.Dock = DockStyle.Top; buttonKeyboard.BorderColor = Color.Transparent;
comboKeyboard.FlatStyle = FlatStyle.Flat; buttonKeyboard.BorderRadius = 2;
comboKeyboard.Font = new Font("Segoe UI", 9F, FontStyle.Regular, GraphicsUnit.Point); buttonKeyboard.Dock = DockStyle.Top;
comboKeyboard.FormattingEnabled = true; buttonKeyboard.FlatAppearance.BorderSize = 0;
comboKeyboard.ItemHeight = 32; buttonKeyboard.FlatStyle = FlatStyle.Flat;
comboKeyboard.Items.AddRange(new object[] { "Static", "Breathe", "Rainbow", "Strobe" }); buttonKeyboard.Location = new Point(518, 7);
comboKeyboard.Location = new Point(4, 10); buttonKeyboard.Margin = new Padding(4, 7, 4, 7);
comboKeyboard.Margin = new Padding(4, 10, 4, 8); buttonKeyboard.Name = "buttonKeyboard";
comboKeyboard.Name = "comboKeyboard"; buttonKeyboard.Secondary = true;
comboKeyboard.Size = new Size(249, 44); buttonKeyboard.Size = new Size(249, 45);
comboKeyboard.TabIndex = 35; buttonKeyboard.TabIndex = 37;
comboKeyboard.TabStop = false; buttonKeyboard.Text = Properties.Strings.Extra;
buttonKeyboard.UseVisualStyleBackColor = false;
// //
// panelColor // panelColor
// //
@@ -939,7 +938,7 @@ namespace GHelper
panelColor.Controls.Add(pictureColor); panelColor.Controls.Add(pictureColor);
panelColor.Controls.Add(buttonKeyboardColor); panelColor.Controls.Add(buttonKeyboardColor);
panelColor.Dock = DockStyle.Fill; panelColor.Dock = DockStyle.Fill;
panelColor.Location = new Point(261, 8); panelColor.Location = new Point(261, 7);
panelColor.Margin = new Padding(4, 7, 4, 7); panelColor.Margin = new Padding(4, 7, 4, 7);
panelColor.Name = "panelColor"; panelColor.Name = "panelColor";
panelColor.Size = new Size(249, 45); panelColor.Size = new Size(249, 45);
@@ -983,23 +982,22 @@ namespace GHelper
buttonKeyboardColor.Text = Properties.Strings.Color; buttonKeyboardColor.Text = Properties.Strings.Color;
buttonKeyboardColor.UseVisualStyleBackColor = false; buttonKeyboardColor.UseVisualStyleBackColor = false;
// //
// buttonKeyboard // comboKeyboard
// //
buttonKeyboard.Activated = false; comboKeyboard.BorderColor = Color.White;
buttonKeyboard.BackColor = SystemColors.ControlLight; comboKeyboard.ButtonColor = Color.FromArgb(255, 255, 255);
buttonKeyboard.BorderColor = Color.Transparent; comboKeyboard.Dock = DockStyle.Top;
buttonKeyboard.BorderRadius = 2; comboKeyboard.FlatStyle = FlatStyle.Flat;
buttonKeyboard.Dock = DockStyle.Top; comboKeyboard.Font = new Font("Segoe UI", 9F, FontStyle.Regular, GraphicsUnit.Point);
buttonKeyboard.FlatAppearance.BorderSize = 0; comboKeyboard.FormattingEnabled = true;
buttonKeyboard.FlatStyle = FlatStyle.Flat; comboKeyboard.ItemHeight = 32;
buttonKeyboard.Location = new Point(518, 8); comboKeyboard.Items.AddRange(new object[] { "Static", "Breathe", "Rainbow", "Strobe" });
buttonKeyboard.Margin = new Padding(4, 7, 4, 7); comboKeyboard.Location = new Point(4, 10);
buttonKeyboard.Name = "buttonKeyboard"; comboKeyboard.Margin = new Padding(4, 10, 4, 8);
buttonKeyboard.Secondary = true; comboKeyboard.Name = "comboKeyboard";
buttonKeyboard.Size = new Size(249, 45); comboKeyboard.Size = new Size(249, 40);
buttonKeyboard.TabIndex = 37; comboKeyboard.TabIndex = 35;
buttonKeyboard.Text = Properties.Strings.Extra; comboKeyboard.TabStop = false;
buttonKeyboard.UseVisualStyleBackColor = false;
// //
// pictureKeyboard // pictureKeyboard
// //
@@ -1021,7 +1019,7 @@ namespace GHelper
labelKeyboard.Name = "labelKeyboard"; labelKeyboard.Name = "labelKeyboard";
labelKeyboard.Size = new Size(210, 32); labelKeyboard.Size = new Size(210, 32);
labelKeyboard.TabIndex = 32; labelKeyboard.TabIndex = 32;
labelKeyboard.Text = Properties.Strings.LaptopKeyboard; labelKeyboard.Text = "Laptop Keyboard";
// //
// SettingsForm // SettingsForm
// //
@@ -1053,7 +1051,6 @@ namespace GHelper
tableLayoutMatrix.ResumeLayout(false); tableLayoutMatrix.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)pictureMatrix).EndInit(); ((System.ComponentModel.ISupportInitialize)pictureMatrix).EndInit();
panelBattery.ResumeLayout(false); panelBattery.ResumeLayout(false);
panelBattery.PerformLayout();
((System.ComponentModel.ISupportInitialize)pictureBattery).EndInit(); ((System.ComponentModel.ISupportInitialize)pictureBattery).EndInit();
panelFooter.ResumeLayout(false); panelFooter.ResumeLayout(false);
panelFooter.PerformLayout(); panelFooter.PerformLayout();

View File

@@ -41,6 +41,36 @@ namespace GHelper
InitializeComponent(); InitializeComponent();
InitTheme(true); InitTheme(true);
buttonSilent.Text = Properties.Strings.Silent;
buttonBalanced.Text = Properties.Strings.Balanced;
buttonTurbo.Text = Properties.Strings.Turbo;
buttonFans.Text = Properties.Strings.FansPower;
buttonEco.Text = Properties.Strings.EcoMode;
buttonUltimate.Text = Properties.Strings.UltimateMode;
buttonStandard.Text = Properties.Strings.StandardMode;
buttonOptimized.Text = Properties.Strings.Optimized;
buttonScreenAuto.Text = Properties.Strings.AutoMode;
buttonMiniled.Text = Properties.Strings.Multizone;
buttonKeyboardColor.Text = Properties.Strings.Color;
buttonKeyboard.Text = Properties.Strings.Extra;
labelPerf.Text = Properties.Strings.PerformanceMode;
labelGPU.Text = Properties.Strings.GPUMode;
labelSreen.Text = Properties.Strings.LaptopScreen;
labelKeyboard.Text = Properties.Strings.LaptopKeyboard;
labelMatrix.Text = Properties.Strings.AnimeMatrix;
labelBatteryTitle.Text = Properties.Strings.BatteryChargeLimit;
checkMatrix.Text = Properties.Strings.TurnOffOnBattery;
checkStartup.Text = Properties.Strings.RunOnStartup;
buttonMatrix.Text = Properties.Strings.PictureGif;
buttonQuit.Text = Properties.Strings.Quit;
FormClosing += SettingsForm_FormClosing; FormClosing += SettingsForm_FormClosing;
buttonSilent.BorderColor = colorEco; buttonSilent.BorderColor = colorEco;
@@ -58,7 +88,6 @@ namespace GHelper
buttonScreenAuto.BorderColor = SystemColors.ActiveBorder; buttonScreenAuto.BorderColor = SystemColors.ActiveBorder;
buttonMiniled.BorderColor = colorTurbo; buttonMiniled.BorderColor = colorTurbo;
buttonOptimized.Click += ButtonOptimized_Click;
buttonSilent.Click += ButtonSilent_Click; buttonSilent.Click += ButtonSilent_Click;
buttonBalanced.Click += ButtonBalanced_Click; buttonBalanced.Click += ButtonBalanced_Click;
buttonTurbo.Click += ButtonTurbo_Click; buttonTurbo.Click += ButtonTurbo_Click;
@@ -66,6 +95,7 @@ namespace GHelper
buttonEco.Click += ButtonEco_Click; buttonEco.Click += ButtonEco_Click;
buttonStandard.Click += ButtonStandard_Click; buttonStandard.Click += ButtonStandard_Click;
buttonUltimate.Click += ButtonUltimate_Click; buttonUltimate.Click += ButtonUltimate_Click;
buttonOptimized.Click += ButtonOptimized_Click;
VisibleChanged += SettingsForm_VisibleChanged; VisibleChanged += SettingsForm_VisibleChanged;
@@ -922,21 +952,21 @@ namespace GHelper
HardwareControl.ReadSensors(); HardwareControl.ReadSensors();
if (HardwareControl.cpuTemp > 0) if (HardwareControl.cpuTemp > 0)
cpuTemp = ": " + Math.Round((decimal)HardwareControl.cpuTemp).ToString() + "°C "; cpuTemp = ": " + Math.Round((decimal)HardwareControl.cpuTemp).ToString() + "°C";
if (HardwareControl.batteryDischarge > 0) if (HardwareControl.batteryDischarge > 0)
battery = Properties.Strings.Discharging + ": " + Math.Round((decimal)HardwareControl.batteryDischarge, 1).ToString() + "W"; battery = Properties.Strings.Discharging + ": " + Math.Round((decimal)HardwareControl.batteryDischarge, 1).ToString() + "W";
if (HardwareControl.gpuTemp > 0) if (HardwareControl.gpuTemp > 0)
{ {
gpuTemp = $": {HardwareControl.gpuTemp}°C "; gpuTemp = $": {HardwareControl.gpuTemp}°C";
} }
Program.settingsForm.BeginInvoke(delegate Program.settingsForm.BeginInvoke(delegate
{ {
labelCPUFan.Text = "CPU" + cpuTemp + HardwareControl.cpuFan; labelCPUFan.Text = "CPU" + cpuTemp + " " + HardwareControl.cpuFan;
labelGPUFan.Text = "GPU" + gpuTemp + HardwareControl.gpuFan; labelGPUFan.Text = "GPU" + gpuTemp + " " + HardwareControl.gpuFan;
if (HardwareControl.midFan is not null) if (HardwareControl.midFan is not null)
labelMidFan.Text = "Mid" + HardwareControl.midFan; labelMidFan.Text = "Mid" + HardwareControl.midFan;
@@ -983,7 +1013,7 @@ namespace GHelper
int limit_total = AppConfig.getConfigPerf("limit_total"); int limit_total = AppConfig.getConfigPerf("limit_total");
int limit_cpu = AppConfig.getConfigPerf("limit_cpu"); int limit_cpu = AppConfig.getConfigPerf("limit_cpu");
int limit_apu = AppConfig.getConfigPerf("limit_apu"); int limit_fast = AppConfig.getConfigPerf("limit_fast");
if (limit_total > AsusACPI.MaxTotal) return; if (limit_total > AsusACPI.MaxTotal) return;
if (limit_total < AsusACPI.MinTotal) return; if (limit_total < AsusACPI.MinTotal) return;
@@ -991,9 +1021,10 @@ namespace GHelper
if (limit_cpu > AsusACPI.MaxCPU) return; if (limit_cpu > AsusACPI.MaxCPU) return;
if (limit_cpu < AsusACPI.MinCPU) return; if (limit_cpu < AsusACPI.MinCPU) return;
if (limit_apu > AsusACPI.MaxCPU) return; if (limit_fast > AsusACPI.MaxTotal) return;
if (limit_apu < AsusACPI.MinCPU) return; if (limit_fast < AsusACPI.MinTotal) return;
// SPL + SPPT togeher in one slider
if (Program.acpi.DeviceGet(AsusACPI.PPT_TotalA0) >= 0) if (Program.acpi.DeviceGet(AsusACPI.PPT_TotalA0) >= 0)
{ {
Program.acpi.DeviceSet(AsusACPI.PPT_TotalA0, limit_total, "PowerLimit A0"); Program.acpi.DeviceSet(AsusACPI.PPT_TotalA0, limit_total, "PowerLimit A0");
@@ -1001,17 +1032,18 @@ namespace GHelper
customPower = limit_total; customPower = limit_total;
} }
if (Program.acpi.DeviceGet(AsusACPI.PPT_CPUB0) >= 0) if (Program.acpi.IsAllAmdPPT()) // CPU limit all amd models
{ {
Program.acpi.DeviceSet(AsusACPI.PPT_CPUB0, limit_cpu, "PowerLimit B0"); Program.acpi.DeviceSet(AsusACPI.PPT_CPUB0, limit_cpu, "PowerLimit B0");
customPower = limit_cpu; customPower = limit_cpu;
} }
else if (Program.acpi.DeviceGet(AsusACPI.PPT_APUC1) >= 0) // FPPT boost for non all-amd models
if (Program.acpi.DeviceGet(AsusACPI.PPT_APUC1) >= 0)
{ {
Program.acpi.DeviceSet(AsusACPI.PPT_APUC1, limit_apu, "PowerLimit C1"); Program.acpi.DeviceSet(AsusACPI.PPT_APUC1, limit_fast, "PowerLimit C1");
customPower = limit_fast;
} }
Program.settingsForm.BeginInvoke(SetPerformanceLabel); Program.settingsForm.BeginInvoke(SetPerformanceLabel);
} }
@@ -1505,10 +1537,20 @@ namespace GHelper
protected static void KillGPUApps() protected static void KillGPUApps()
{ {
string[] tokill = { "EADesktop", "RadeonSoftware", "epicgameslauncher" }; string[] tokill = { "EADesktop", "RadeonSoftware", "epicgameslauncher", "nvdisplay.container", "nvcontainer", "nvcplui" };
foreach (string kill in tokill) foreach (string kill in tokill)
foreach (var process in Process.GetProcessesByName(kill)) process.Kill(); foreach (var process in Process.GetProcessesByName(kill))
{
try
{
process.Kill();
Logger.WriteLine($"Stopped: {process.ProcessName}");
} catch (Exception ex)
{
Logger.WriteLine($"Failed to stop: {process.ProcessName} {ex.Message}");
}
}
if (AppConfig.isConfig("kill_gpu_apps") && HardwareControl.GpuControl is not null && HardwareControl.GpuControl.IsNvidia) if (AppConfig.isConfig("kill_gpu_apps") && HardwareControl.GpuControl is not null && HardwareControl.GpuControl.IsNvidia)
{ {
@@ -1531,19 +1573,17 @@ namespace GHelper
Task.Run(async () => Task.Run(async () =>
{ {
int status; int status = 1;
if (eco == 1) KillGPUApps(); if (eco == 1) KillGPUApps();
//if (eco == 1) status = 0; else Logger.WriteLine($"Running eco command {eco}");
status = Program.acpi.SetGPUEco(eco); status = Program.acpi.SetGPUEco(eco);
if (status == 0 && eco == 1 && hardWay) if (status == 0 && eco == 1 && hardWay) RestartGPU();
{
RestartGPU();
}
await Task.Delay(TimeSpan.FromMilliseconds(500)); await Task.Delay(TimeSpan.FromMilliseconds(100));
Program.settingsForm.BeginInvoke(delegate Program.settingsForm.BeginInvoke(delegate
{ {
InitGPUMode(); InitGPUMode();

View File

@@ -1,4 +1,64 @@
<root> <?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, 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="Color1" type="System.Drawing.Color, System.Drawing"">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true"> <xsd:element name="root" msdata:IsDataSet="true">

View File

@@ -1,5 +1,4 @@
# G-Helper (GHelper) # G-Helper (GHelper)
[![Github all releases](https://img.shields.io/github/downloads/seerge/g-helper/total.svg)](https://GitHub.com/seerge/g-helper/releases/) [![GitHub release](https://img.shields.io/github/release/seerge/g-helper.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/) [![Github all releases](https://img.shields.io/github/downloads/seerge/g-helper/total.svg)](https://GitHub.com/seerge/g-helper/releases/) [![GitHub release](https://img.shields.io/github/release/seerge/g-helper.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/)
Language: English | [中文](https://github.com/seerge/g-helper/blob/main/docs/README.zh-CN.md) Language: English | [中文](https://github.com/seerge/g-helper/blob/main/docs/README.zh-CN.md)
@@ -8,7 +7,6 @@ Language: English | [中文](https://github.com/seerge/g-helper/blob/main/docs/R
Lightweight Armoury Crate alternative for Asus lapopts. A small utility that allows you to do almost everything you could do with Armoury Crate but without extra bloat and unnecessary services. Works on all popular models, such as ROG Zephyrus G14, G15, G16, M16, Flow X13, Flow X16, TUF, Strix, Scar, ProArt and many more! Feel free to try :) Lightweight Armoury Crate alternative for Asus lapopts. A small utility that allows you to do almost everything you could do with Armoury Crate but without extra bloat and unnecessary services. Works on all popular models, such as ROG Zephyrus G14, G15, G16, M16, Flow X13, Flow X16, TUF, Strix, Scar, ProArt and many more! Feel free to try :)
## :gift: Main advantages ## :gift: Main advantages
1. Seamless and automatic GPU switching (without asking you to close all apps, etc) 1. Seamless and automatic GPU switching (without asking you to close all apps, etc)
@@ -40,6 +38,8 @@ _If you post about the app - please include a link. Thanks._
10. NVidia GPU overclocking 10. NVidia GPU overclocking
11. XG Mobile Control 11. XG Mobile Control
![Screenshot 2023-04-13 190951](https://user-images.githubusercontent.com/5920850/231859391-c4963af4-491c-4523-95d4-0bdcfd7cfd6f.png)
### :gear: Automatic switching when on battery or plugged in ### :gear: Automatic switching when on battery or plugged in
- Performance modes (app remembers last mode used on battery or when plugged) - Performance modes (app remembers last mode used on battery or when plugged)
- Optimized GPU mode - disables dGPU on battery and enables when plugged - Optimized GPU mode - disables dGPU on battery and enables when plugged
@@ -48,8 +48,6 @@ _If you post about the app - please include a link. Thanks._
To keep auto switching and hotkeys working the app needs to stay running in the tray. It doesn't consume any resources. To keep auto switching and hotkeys working the app needs to stay running in the tray. It doesn't consume any resources.
![Screenshot 2023-05-07 182519](https://user-images.githubusercontent.com/5920850/236697890-26938ac4-8840-4fed-a7b1-9a7b839fb865.png)
### :rocket: Performance Modes ### :rocket: Performance Modes
Modes are **same** as in Armoury Crate as they are stored in bios including default fan curves Modes are **same** as in Armoury Crate as they are stored in bios including default fan curves
@@ -67,7 +65,7 @@ _PPTs are shown for G14 2022, for other models PPTs will be different as they ar
3. Ultimate mode: iGPU and dGPU enabled, but dGPU drives built in display (supported only on G14 2022 model) 3. Ultimate mode: iGPU and dGPU enabled, but dGPU drives built in display (supported only on G14 2022 model)
4. Optimized: disables dGPU on battery (Eco) and enables when plugged (Standard) 4. Optimized: disables dGPU on battery (Eco) and enables when plugged (Standard)
![Screenshot 2023-04-13 190951](https://user-images.githubusercontent.com/5920850/231859391-c4963af4-491c-4523-95d4-0bdcfd7cfd6f.png) ![Screenshot 2023-05-07 182519](https://user-images.githubusercontent.com/5920850/236697890-26938ac4-8840-4fed-a7b1-9a7b839fb865.png)
## :question: FAQ ## :question: FAQ
@@ -156,7 +154,6 @@ It's a lightweight Armoury Crate alternative for Asus laptops. A small utility t
- It is recommended to run app with windows default "balanced" power plan - It is recommended to run app with windows default "balanced" power plan
![Screenshot 2023-05-29 191650](https://github.com/seerge/g-helper/assets/5920850/27719d96-e9ca-4164-ac4a-23b5966fc0ec) ![Screenshot 2023-05-29 191650](https://github.com/seerge/g-helper/assets/5920850/27719d96-e9ca-4164-ac4a-23b5966fc0ec)
------------------------------- -------------------------------
Designed and developed for Asus Zephyrus G14 2022 (with AMD Radeon iGPU and dGPU). But could and should potentially work for G14 of 2021 and 2020, G15, X FLOW, and other ROG models for relevant and supported features. Designed and developed for Asus Zephyrus G14 2022 (with AMD Radeon iGPU and dGPU). But could and should potentially work for G14 of 2021 and 2020, G15, X FLOW, and other ROG models for relevant and supported features.