From acb7a45139e258abbba7ac72840a68fba30677d1 Mon Sep 17 00:00:00 2001 From: Serge <5920850+seerge@users.noreply.github.com> Date: Wed, 3 Jan 2024 15:54:10 +0100 Subject: [PATCH] Enable GPU on shutdown for all Nvidia devices https://github.com/seerge/g-helper/issues/1841 --- app/AppConfig.cs | 5 ----- app/AsusACPI.cs | 5 +++++ app/Extra.cs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/AppConfig.cs b/app/AppConfig.cs index d91667e7..fcd0dd19 100644 --- a/app/AppConfig.cs +++ b/app/AppConfig.cs @@ -435,11 +435,6 @@ public static class AppConfig return ContainsModel("FX507") || ContainsModel("FX517") || ContainsModel("FX707"); } - public static bool IsGPUFixNeeded() - { - return ContainsModel("GA402X") || ContainsModel("GV302") || ContainsModel("GV301") || ContainsModel("GZ301") || ContainsModel("FX506") || ContainsModel("FA506") || ContainsModel("GU603") || ContainsModel("GU604") || ContainsModel("G614J") || ContainsModel("GA503") || ContainsModel("FX507"); - } - public static bool IsGPUFix() { return Is("gpu_fix") || (ContainsModel("GA402X") && IsNotFalse("gpu_fix")); diff --git a/app/AsusACPI.cs b/app/AsusACPI.cs index cf3c2706..709c1167 100644 --- a/app/AsusACPI.cs +++ b/app/AsusACPI.cs @@ -554,6 +554,11 @@ public class AsusACPI return DeviceGet(PPT_CPUB0) >= 0 && DeviceGet(PPT_GPUC0) < 0; } + public bool IsNVidiaGPU() + { + return (!IsAllAmdPPT() && Program.acpi.DeviceGet(GPUEco) >= 0); + } + public void SetAPUMem(int memory = 4) { if (memory < 0 || memory > 8) return; diff --git a/app/Extra.cs b/app/Extra.cs index 3f10c886..245112ae 100644 --- a/app/Extra.cs +++ b/app/Extra.cs @@ -379,7 +379,7 @@ namespace GHelper pictureLog.Click += PictureLog_Click; - checkGPUFix.Visible = AppConfig.IsGPUFixNeeded(); + checkGPUFix.Visible = Program.acpi.IsNVidiaGPU(); checkGPUFix.Checked = AppConfig.IsGPUFix(); checkGPUFix.CheckedChanged += CheckGPUFix_CheckedChanged;