Skip to content

Commit

Permalink
Skip GPU check for UX540 seerge#3360
Browse files Browse the repository at this point in the history
  • Loading branch information
seerge committed Nov 11, 2024
1 parent c2c5d2a commit 871f80f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions app/AppConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,11 @@ public static bool IsNoGPUModes()
return ContainsModel("GV301RA") || ContainsModel("GV302XA") || IsAlly();
}

public static bool NoGpu()
{
return Is("no_gpu") || ContainsModel("UX540");
}

public static bool IsHardwareTouchpadToggle()
{
return ContainsModel("FA507");
Expand Down
3 changes: 1 addition & 2 deletions app/Gpu/AMD/AmdGpuControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ public class AmdGpuControl : IGpuControl

public AmdGpuControl()
{
if (!Adl2.Load())
return;
if (!AppConfig.NoGpu() || !Adl2.Load()) return;

try
{
Expand Down
2 changes: 1 addition & 1 deletion app/Gpu/GPUModeControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public void InitGPUMode()
// 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);
}
}
Expand Down
1 change: 1 addition & 0 deletions app/HardwareControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ public static void RecreateGpuControlWithDelay(int delay = 5)

public static void RecreateGpuControl()
{
if (AppConfig.NoGpu()) return;
try
{
GpuControl?.Dispose();
Expand Down

0 comments on commit 871f80f

Please sign in to comment.