Compare commits

...

18 Commits
v0.52 ... v0.53

Author SHA1 Message Date
Serge
4acbf5adf1 Merge pull request #256 from lswlc33/main
update readme.md's language switch button
2023-04-16 13:03:47 +02:00
seerge
48ea1b588f Merge branch 'main' of https://github.com/seerge/g-helper 2023-04-16 13:01:36 +02:00
seerge
cb15161fc4 Warning label when custom fan profile is not supported 2023-04-16 13:01:34 +02:00
雪中明月
d95a612788 Update README.md 2023-04-16 18:55:46 +08:00
雪中明月
0a724926ee update readme.md's language switch button 2023-04-16 10:50:20 +00:00
Serge
353ed998db Update README.md 2023-04-16 11:44:23 +02:00
seerge
0afee18f20 Merge branch 'main' of https://github.com/seerge/g-helper 2023-04-15 20:12:35 +02:00
seerge
8154883d49 It's fine 2023-04-15 20:12:33 +02:00
Serge
feb4198c0f Merge pull request #250 from marcelomijas/main
"Keyboard backlight" extra options Spanish translation fix
2023-04-15 19:48:25 +02:00
Marcelo Moreno
6edf2d9447 Add files via upload 2023-04-15 19:42:51 +02:00
seerge
25f0af1103 AdjustAllLevels fixes 2023-04-15 16:02:07 +02:00
Serge
4f9cc4a94e Merge pull request #237 from hungqbui/main
Add fan levels auto-adjust
2023-04-15 01:12:15 +02:00
Serge
e973f09f4e Update README.md 2023-04-15 01:11:40 +02:00
Serge
cd0662e11f Update README.md 2023-04-14 17:58:09 +02:00
seerge
ee43af2824 Clock fix for devices with low DPI 2023-04-14 17:50:26 +02:00
Serge
d620ca010c Update README.md 2023-04-13 21:10:57 +02:00
Hung Bui
99a490996d Fix OutOfBounds error, and correct variables name 2023-04-13 11:23:56 -05:00
Hung Bui
596c47d371 Add fan levels auto-adjust 2023-04-12 19:07:53 -05:00
14 changed files with 159 additions and 51 deletions

View File

@@ -36,17 +36,17 @@ public class ASUSWmi
public const int Temp_CPU = 0x00120094;
public const int Temp_GPU = 0x00120097;
public const int PPT_TotalA0 = 0x001200A0; // Total PPT on 2022 and CPU PPT on 2021
public const int PPT_TotalA0 = 0x001200A0; // Total PPT on 2022 (PPT_LIMIT_SLOW ) and CPU PPT on 2021
public const int PPT_EDCA1 = 0x001200A1; // CPU EDC
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_CPUB0 = 0x001200B0; // CPU PPT on 2022
public const int PPT_CPUB1 = 0x001200B1; // APU PPT on 2022
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_APUC1 = 0x001200C1;
public const int PPT_APUC2 = 0x001200C2;
public const int PPT_APUC0 = 0x001200C0; // does nothing on G14 2022
public const int PPT_APUC1 = 0x001200C1; // Actual Power Limit (PPT_LIMIT_FAST) AND Sustained Power Limit (STAPM_LIMIT)
public const int PPT_APUC2 = 0x001200C2; // does nothing on G14 2022
public const int TUF_KB = 0x00100056;
public const int TUF_KB_STATE = 0x00100057;

View File

@@ -380,14 +380,14 @@ namespace Starlight.AnimeMatrix
g.CompositingQuality = CompositingQuality.HighQuality;
g.SmoothingMode = SmoothingMode.AntiAlias;
using (Font font = new Font("Arial", 12F))
using (Font font = new Font("Arial", 24F, GraphicsUnit.Pixel))
{
SizeF textSize = g.MeasureString(text1, font);
g.DrawString(text1, font, Brushes.White, (MaxColumns*3 - textSize.Width)+3, -5);
g.DrawString(text1, font, Brushes.White, (MaxColumns*3 - textSize.Width)+3, -3);
}
if (text2.Length > 0)
using (Font font = new Font("Arial", 9F))
using (Font font = new Font("Arial", 18F, GraphicsUnit.Pixel))
{
SizeF textSize = g.MeasureString(text2, font);
g.DrawString(text2, font, Brushes.White, (MaxColumns * 3 - textSize.Width)+1, 25);

22
app/Fans.Designer.cs generated
View File

@@ -63,6 +63,7 @@ namespace GHelper
trackTotal = new TrackBar();
pictureFine = new PictureBox();
labelInfo = new Label();
labelFansResult = new Label();
panelFans.SuspendLayout();
((System.ComponentModel.ISupportInitialize)picturePerf).BeginInit();
tableFanCharts.SuspendLayout();
@@ -80,6 +81,7 @@ namespace GHelper
//
// panelFans
//
panelFans.Controls.Add(labelFansResult);
panelFans.Controls.Add(labelTip);
panelFans.Controls.Add(labelBoost);
panelFans.Controls.Add(comboBoost);
@@ -117,7 +119,6 @@ namespace GHelper
labelBoost.TabIndex = 39;
labelBoost.Text = Properties.Strings.CPUBoost;
labelBoost.TextAlign = ContentAlignment.MiddleRight;
//
// comboBoost
//
@@ -221,11 +222,11 @@ namespace GHelper
checkApplyFans.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
checkApplyFans.AutoSize = true;
checkApplyFans.BackColor = SystemColors.ControlLight;
checkApplyFans.Location = new Point(449, 1084);
checkApplyFans.Location = new Point(449, 1088);
checkApplyFans.Margin = new Padding(4, 2, 4, 2);
checkApplyFans.Name = "checkApplyFans";
checkApplyFans.Padding = new Padding(15, 5, 15, 5);
checkApplyFans.Size = new Size(339, 50);
checkApplyFans.Size = new Size(339, 46);
checkApplyFans.TabIndex = 17;
checkApplyFans.Text = Properties.Strings.ApplyFanCurve;
checkApplyFans.UseVisualStyleBackColor = false;
@@ -292,11 +293,11 @@ namespace GHelper
checkApplyPower.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
checkApplyPower.AutoSize = true;
checkApplyPower.BackColor = SystemColors.ControlLight;
checkApplyPower.Location = new Point(20, 1084);
checkApplyPower.Location = new Point(20, 1088);
checkApplyPower.Margin = new Padding(4, 2, 4, 2);
checkApplyPower.Name = "checkApplyPower";
checkApplyPower.Padding = new Padding(15, 5, 15, 5);
checkApplyPower.Size = new Size(277, 50);
checkApplyPower.Size = new Size(277, 46);
checkApplyPower.TabIndex = 25;
checkApplyPower.Text = Properties.Strings.ApplyPowerLimits;
checkApplyPower.UseVisualStyleBackColor = false;
@@ -417,6 +418,16 @@ namespace GHelper
labelInfo.TabIndex = 19;
labelInfo.Text = "label";
//
// labelFansResult
//
labelFansResult.Anchor = AnchorStyles.Top | AnchorStyles.Right;
labelFansResult.ForeColor = Color.Red;
labelFansResult.Location = new Point(30, 1070);
labelFansResult.Name = "labelFansResult";
labelFansResult.Size = new Size(760, 32);
labelFansResult.TabIndex = 41;
labelFansResult.TextAlign = ContentAlignment.TopRight;
//
// Fans
//
AutoScaleDimensions = new SizeF(192F, 192F);
@@ -483,5 +494,6 @@ namespace GHelper
private RComboBox comboBoost;
private Label labelBoost;
private Label labelTip;
private Label labelFansResult;
}
}

View File

@@ -200,18 +200,23 @@ namespace GHelper
Program.wmi.DeviceSet(ASUSWmi.PerformanceMode, Program.config.getConfig("performance_mode"), "PerfMode");
Program.settingsForm.AutoPower();
}
}
public void LabelFansResult(string text)
{
labelFansResult.Text = text;
}
private void Fans_FormClosing(object? sender, FormClosingEventArgs e)
{
/*
if (e.CloseReason == CloseReason.UserClosing)
{
e.Cancel = true;
Hide();
}
}*/
}
@@ -405,7 +410,7 @@ namespace GHelper
{
curPoint = hit.Series.Points[hit.PointIndex];
tip = true;
}
}
if (curPoint != null)
@@ -432,13 +437,17 @@ namespace GHelper
{
curPoint.XValue = dx;
curPoint.YValues[0] = dy;
if (hit.Series is not null)
AdjustAllLevels(hit.PointIndex, dx, dy, hit.Series);
tip = true;
}
labelTip.Text = Math.Round(curPoint.XValue) + "C, " + ChartPercToRPM((int)curPoint.YValues[0], " " + Properties.Strings.RPM);
labelTip.Top = e.Y + ((Control)sender).Top;
labelTip.Left = e.X - 50;
}
catch
{
@@ -446,12 +455,82 @@ namespace GHelper
tip = false;
}
}
}
labelTip.Visible = tip;
}
private void AdjustAllLevels(int index, double curXVal, double curYVal, Series series)
{
// Get the neighboring DataPoints of the hit point
DataPoint upperPoint = null;
DataPoint lowerPoint = null;
if (index > 0)
{
lowerPoint = series.Points[index - 1];
}
if (index < series.Points.Count - 1)
{
upperPoint = series.Points[index + 1];
}
// Adjust the values according to the comparison between the value and its neighbors
if (upperPoint != null)
{
if (curYVal > upperPoint.YValues[0])
{
for (int i = index + 1; i < series.Points.Count; i++)
{
DataPoint curUpper = series.Points[i];
if (curUpper.YValues[0] >= curYVal) break;
curUpper.YValues[0] = curYVal;
}
}
if (curXVal > upperPoint.XValue)
{
for (int i = index + 1; i < series.Points.Count; i++)
{
DataPoint curUpper = series.Points[i];
if (curUpper.XValue >= curXVal) break;
curUpper.XValue = curXVal;
}
}
}
if (lowerPoint != null)
{
//Debug.WriteLine(curYVal + " <? " + Math.Floor(lowerPoint.YValues[0]));
if (curYVal <= Math.Floor(lowerPoint.YValues[0]))
{
for (int i = index - 1; i >= 0; i--)
{
DataPoint curLower = series.Points[i];
if (curLower.YValues[0] < curYVal) break;
curLower.YValues[0] = Math.Floor(curYVal);
}
}
if (curXVal < lowerPoint.XValue)
{
for (int i = index - 1; i >= 0; i--)
{
DataPoint curLower = series.Points[i];
if (curLower.XValue <= curXVal) break;
curLower.XValue = curXVal;
}
}
}
}
}
}

View File

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

View File

@@ -15,7 +15,6 @@ public static class HardwareMonitor
public static string? gpuFan;
public static string? midFan;
//public static List<int> gpuUsage = new List<int>();
public static int? gpuUse;
public static int GetFanMax()
@@ -78,9 +77,10 @@ public static class HardwareMonitor
if (cpuTemp < 0) try
{
var ct = new PerformanceCounter("Thermal Zone Information", "Temperature", @"\_TZ.THRM", true);
cpuTemp = ct.NextValue() - 273;
ct.Dispose();
using (var ct = new PerformanceCounter("Thermal Zone Information", "Temperature", @"\_TZ.THRM", true))
{
cpuTemp = ct.NextValue() - 273;
}
}
catch
{
@@ -102,17 +102,12 @@ public static class HardwareMonitor
if (gpuTemp is null || gpuTemp < 0)
gpuTemp = Program.wmi.DeviceGet(ASUSWmi.Temp_GPU);
/*
gpuUsage.Add(GetGpuUse());
if (gpuUsage.Count > 3) gpuUsage.RemoveAt(0);
*/
try
{
var cb = new PerformanceCounter("Power Meter", "Power", "Power Meter (0)", true);
batteryDischarge = cb.NextValue() / 1000;
cb.Dispose();
using (var cb = new PerformanceCounter("Power Meter", "Power", "Power Meter (0)", true))
{
batteryDischarge = cb.NextValue() / 1000;
}
}
catch
{

View File

@@ -718,7 +718,6 @@ public class NativeMethods
PowerSetActiveScheme(IntPtr.Zero, activeSchemeGuid);
/*
var hrDC = PowerWriteDCValueIndex(
IntPtr.Zero,
activeSchemeGuid,
@@ -727,7 +726,6 @@ public class NativeMethods
boost);
PowerSetActiveScheme(IntPtr.Zero, activeSchemeGuid);
*/
Logger.WriteLine("Boost " + boost);
}

View File

@@ -206,7 +206,7 @@
<value>..\Resources\icons8-speed-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="everything-is-fine-itsfine" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\everything-is-fine-itsfine.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<value>..\Resources\itsfine.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icons8-help-64" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-help-64.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>

View File

@@ -184,7 +184,7 @@
<value>Establece 60Hz con batería y vuelve cuando está enchufado</value>
</data>
<data name="Awake" xml:space="preserve">
<value>Despierto</value>
<value>Encendida</value>
</data>
<data name="Balanced" xml:space="preserve">
<value>Equilibrado</value>
@@ -193,7 +193,7 @@
<value>Límite de carga</value>
</data>
<data name="Boot" xml:space="preserve">
<value>Inicio</value>
<value>Al arrancar</value>
</data>
<data name="Color" xml:space="preserve">
<value>Color</value>
@@ -361,13 +361,13 @@
<value>Ejecutar al inicio</value>
</data>
<data name="Shutdown" xml:space="preserve">
<value>Apagar</value>
<value>Al apagar</value>
</data>
<data name="Silent" xml:space="preserve">
<value>Silencio</value>
</data>
<data name="Sleep" xml:space="preserve">
<value>Suspender</value>
<value>En suspensión</value>
</data>
<data name="StandardGPUTooltip" xml:space="preserve">
<value>Habilita la dGPU para uso estándar</value>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 220 KiB

BIN
app/Resources/itsfine.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@@ -560,7 +560,7 @@ namespace GHelper
if (fans.Visible)
{
fans.Hide();
fans.Close();
}
else
{
@@ -901,6 +901,13 @@ namespace GHelper
}
protected void LabelFansResult(string text)
{
if (fans != null && fans.Text != "")
fans.LabelFansResult(text);
}
public void AutoFans(bool force = false)
{
customFans = false;
@@ -914,13 +921,18 @@ namespace GHelper
Program.wmi.SetFanCurve(2, Program.config.getFanConfig(2));
// something went wrong, resetting to default profile
if (cpuResult != 1 || gpuResult != 1)
if (cpuResult != 1 || gpuResult != 1)
{
int mode = Program.config.getConfig("performance_mode");
Logger.WriteLine("Driver rejected fan curve, resetting mode to " + mode);
Logger.WriteLine("ASUS BIOS rejected fan curve, resetting mode to " + mode);
Program.wmi.DeviceSet(ASUSWmi.PerformanceMode, mode, "PerformanceMode");
LabelFansResult("ASUS BIOS rejected fan curve");
}
else
{
LabelFansResult("");
customFans = true;
}
else customFans = true;
// fix for misbehaving bios on intell based TUF 2022
if ((Program.config.ContainsModel("FX507") || Program.config.ContainsModel("FX517")) && Program.config.getConfigPerf("auto_apply_power") != 1)

View File

@@ -2,12 +2,12 @@
[![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)
## Lightweight Armoury Crate alternative for Asus laptops
### Control tool for ROG Zephyrus G14, G15, Flow X13, Flow X16, TUF, Strix, Scar and other models
A small utility that allows you to do almost everything you could do with Armoury Crate but without extra bloat and unnecessary services.
Control tool for ROG Zephyrus G14, G15, Flow X13, Flow X16, TUF, Strix, Scar and other models. A small utility that allows you to do almost everything you could do with Armoury Crate but without extra bloat and unnecessary services.
[这个自述文件](https://github.com/seerge/g-helper/blob/main/docs/README.zh-CN.md)
## :gift: Main advantages
@@ -23,7 +23,7 @@ If you like this app, please [star :star: it on Github](https://github.com/seerg
_If you post about the app - please include a link. Thanks._
![Screenshot 2023-03-30 115149](https://user-images.githubusercontent.com/5920850/228799078-bc93148f-6580-4319-b9e6-fbde4d246cd2.png)
![Screenshot 2023-04-13 190951](https://user-images.githubusercontent.com/5920850/231859391-c4963af4-491c-4523-95d4-0bdcfd7cfd6f.png)
### :zap: Main features
@@ -55,7 +55,7 @@ Modes are **same** as in Armoury Crate as they are stored in bios including defa
_PPTs are shown for G14 2022, for other models PPTs will be different as they are set in bios._
![Screenshot 2023-04-06 142234](https://user-images.githubusercontent.com/5920850/230377635-7032a480-3a94-4e35-9468-d8911e3e55ec.png)
![Screenshot 2023-04-13 191030](https://user-images.githubusercontent.com/5920850/231859519-3cfa40f1-b06e-4cdb-b3e8-5187521ce208.png)
### :video_game: GPU Modes
@@ -101,9 +101,17 @@ Sure, you can! The only problem is that MyASUS may override the battery charge l
#### How do I set Mute Microphone to M3?
This function is handled by Asus Optimization Service (therefore G-helper doesn't interfere and doesn't touch this function). Make sure that this service is up and running
#### How do I set different "Visual styles"?
Personally, i'm not a big fan of them, as they make colors very inaccurate. But if you want so - you can adjust display colors using either Nvidia Control panel or AMD Adrenaline (appropriate display sections). If you really want you can also use [own ASUS utility from MS Store](https://apps.microsoft.com/store/detail/gamevisual/9P4K1LFTXSH8?hl=nl-nl&gl=nl&rtc=1)
#### How do I uninstall G-helper?
G-helper is a single exe, and it doesn't install anything in the system. To remove it - you can simply delete exe :) If you have applied any custom fan profiles or PPTs - before removing I would recommend selecting your favorite performance mode (for example balanced) and clicking "Factory defaults" under Fans + Power.
#### What is G-helper ?
It's a lightweight Armoury Crate alternative for Asus laptops. A small utility that allows you to do almost everything you could do with Armoury Crate but without extra bloat and unnecessary services.
----------------------------
### How to install
@@ -112,16 +120,18 @@ G-helper is a single exe, and it doesn't install anything in the system. To remo
2. Unzip to a folder of your choice
3. Run **GHelper.exe**
### Dependencies & Requirements
### Requirements (mandatory)
- Microsoft [.NET7](https://dotnet.microsoft.com/en-us/download). Most probably you already have it. Otherwise you can [download it](https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/sdk-7.0.202-windows-x64-installer) from the official website.
- [Asus System Control Interface](https://dlcdnets.asus.com/pub/ASUS/nb/Image/CustomComponent/ASUSSystemControlInterfaceV3/ASUSSystemControlInterfaceV3.exe). If you have or had MyASUS app installed this "driver" probably still in place (even after MyASUS uninstalls). Alternatively - you can download and install it
- Optionally(!) you can disable / remove unnecessary services by running [this debloat bat file](https://raw.githubusercontent.com/seerge/g-helper/main/debloat.bat) as admin. To restore services - run [this bloat bat file](https://raw.githubusercontent.com/seerge/g-helper/main/bloat.bat) instead.
### Recommendations (optional)
- I recommend keeping "Asus Optimization Service" running, as it keeps basic laptop hotkeys such as screen or keyboard brightness adjustment working.
- Optionally(!) you can disable / remove unnecessary services by running [this debloat bat file](https://raw.githubusercontent.com/seerge/g-helper/main/debloat.bat) as admin. To restore services - run [this bloat bat file](https://raw.githubusercontent.com/seerge/g-helper/main/bloat.bat) instead.
- It's not recommended to use an app in combination with Armoury Crate services, because they adjust the same settings. You can [uninstall it using it's own uninstall tool](https://dlcdnets.asus.com/pub/ASUS/mb/14Utilities/Armoury_Crate_Uninstall_Tool.zip?model=armoury%20crate). Just in case, you can always install it back later.
-------------------------------

View File

@@ -2,6 +2,8 @@
[![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/)
语言: [English](https://github.com/seerge/g-helper#readme) | 中文
## 为ASUS笔记本打造的、Armoury Crate(奥创控制中心)的轻量化替代品
### 可作为ROG 幻14、幻15幻13、幻16飞行堡垒/天选系列ROG 枪神/魔霸系列或其他ASUS笔记本的控制工具