From 2a3c439993155e7c9ddf47407fac6a1d7b0df9f5 Mon Sep 17 00:00:00 2001 From: aaron Date: Thu, 23 Jul 2026 15:08:24 +0200 Subject: [PATCH] refactor(sleep): move the s2 sleep change to argon only since s2idle would cost more battery on a laptop that s3 deep sleep --- hosts/argon/configuration.nix | 7 +++++++ modules/nixos/bootloader.nix | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/hosts/argon/configuration.nix b/hosts/argon/configuration.nix index 69e2064..1652c1f 100644 --- a/hosts/argon/configuration.nix +++ b/hosts/argon/configuration.nix @@ -30,6 +30,13 @@ # set hostname networking.hostName = "argon"; + # Use s2idle instead of deep (S3) suspend. On resume from S3 the RDNA4 + # (Navi 48 / RX 9070) amdgpu does a MODE1 GPU reset that leaves niri with a + # black screen until it is restarted. s2idle avoids that reset path. + # Host-specific on purpose: laptops (e.g. neon) keep deep S3 for lower + # suspend power draw. Merged with bootloader.nix's kernelParams. + boot.kernelParams = [ "mem_sleep_default=s2idle" ]; + # install state version system.stateVersion = "25.11"; # Don't change } diff --git a/modules/nixos/bootloader.nix b/modules/nixos/bootloader.nix index 910b8d4..dc6f623 100644 --- a/modules/nixos/bootloader.nix +++ b/modules/nixos/bootloader.nix @@ -17,7 +17,7 @@ }; # kernel options - boot.kernelParams = [ "quiet" "acpi.debug_level=0" "mem_sleep_default=s2idle" ]; + boot.kernelParams = [ "quiet" "acpi.debug_level=0" ]; boot.kernelPackages = pkgs.linuxPackages_latest; boot.consoleLogLevel = 2;