diff --git a/app/AppConfig.cs b/app/AppConfig.cs index 19aa6a6f..234fa08e 100644 --- a/app/AppConfig.cs +++ b/app/AppConfig.cs @@ -653,6 +653,11 @@ public static class AppConfig return ContainsModel("GV301RA") || ContainsModel("GV302XA") || IsAlly(); } + public static bool NoGpu() + { + return Is("no_gpu") || ContainsModel("UX540"); + } + public static bool IsHardwareTouchpadToggle() { return ContainsModel("FA507"); diff --git a/app/Gpu/AMD/AmdGpuControl.cs b/app/Gpu/AMD/AmdGpuControl.cs index 3f774203..bec85a67 100644 --- a/app/Gpu/AMD/AmdGpuControl.cs +++ b/app/Gpu/AMD/AmdGpuControl.cs @@ -62,8 +62,7 @@ public class AmdGpuControl : IGpuControl public AmdGpuControl() { - if (!Adl2.Load()) - return; + if (!AppConfig.NoGpu() || !Adl2.Load()) return; try { diff --git a/app/Gpu/GPUModeControl.cs b/app/Gpu/GPUModeControl.cs index 07b95560..cb95c9e6 100644 --- a/app/Gpu/GPUModeControl.cs +++ b/app/Gpu/GPUModeControl.cs @@ -44,7 +44,7 @@ namespace GHelper.Gpu // GPU mode not supported if (eco < 0 && mux < 0) { - if (gpuExists is null) gpuExists = Program.acpi.GetFan(AsusFan.GPU) >= 0; + if (gpuExists is null) gpuExists = (!AppConfig.NoGpu()) && Program.acpi.GetFan(AsusFan.GPU) >= 0; settings.HideGPUModes((bool)gpuExists); } } diff --git a/app/HardwareControl.cs b/app/HardwareControl.cs index 6d1281e6..1de7271b 100644 --- a/app/HardwareControl.cs +++ b/app/HardwareControl.cs @@ -285,6 +285,7 @@ public static class HardwareControl public static void RecreateGpuControl() { + if (AppConfig.NoGpu()) return; try { GpuControl?.Dispose();