From 0d8c852503581906dada5e8a22ca5d9248f87427 Mon Sep 17 00:00:00 2001 From: ChaosAttractor Date: Fri, 10 Feb 2023 14:54:19 +0800 Subject: [PATCH] zephyrus ga401: Enable nvidia powerManagement & modesetting (nvidia-drm) --- asus/zephyrus/ga401/default.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/asus/zephyrus/ga401/default.nix b/asus/zephyrus/ga401/default.nix index 49ab039..4899dd7 100644 --- a/asus/zephyrus/ga401/default.nix +++ b/asus/zephyrus/ga401/default.nix @@ -10,9 +10,17 @@ ../../../common/pc/laptop/ssd ]; - hardware.nvidia.prime = { - amdgpuBusId = "PCI:4:0:0"; - nvidiaBusId = "PCI:1:0:0"; + hardware.nvidia = { + # PCI-Express Runtime D3 Power Management is enabled by default on this laptop + # But it can fix screen tearing & suspend/resume screen corruption in sync mode + modesetting.enable = lib.mkDefault true; + # Enable DRM kernel mode setting + powerManagement.enable = lib.mkDefault true; + + prime = { + amdgpuBusId = "PCI:4:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; }; services = {