From 0c6a088080798897690331d6ff047cdb0fca484c Mon Sep 17 00:00:00 2001 From: DuskyElf Date: Fri, 31 Jul 2026 16:35:50 +0530 Subject: [PATCH] fix(hosts/asus): remove stray bracket breaking kernelParams --- hosts/asus/system.nix | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/hosts/asus/system.nix b/hosts/asus/system.nix index 519bfac..839fc26 100644 --- a/hosts/asus/system.nix +++ b/hosts/asus/system.nix @@ -125,7 +125,6 @@ # nits (83%), green cast below ~428 nits (81%). "i915.enable_dpcd_backlight=3" ]; - ]; initrd = { availableKernelModules = [ "xhci_pci" @@ -175,6 +174,22 @@ ]; }; + # Screenpad (secondary display, DP-2): the asus_screenpad backlight device probes + # late in boot, so niri's spawn-time "power.sh screenpad off" races it and fails + # silently, leaving the panel lit with no niri output. This service waits for the + # device (max 30s) and powers it off. Note: screenpad bl_power is inverted — + # 0 = off, 4 = on. + systemd.services.screenpad-off = { + description = "Turn off the screenpad panel after boot"; + wantedBy = [ "multi-user.target" ]; + after = [ "systemd-udevd.service" ]; + serviceConfig = { + Type = "oneshot"; + ExecStartPre = "${pkgs.bash}/bin/bash -c 'for i in {1..150}; do [ -e /sys/class/backlight/asus_screenpad/bl_power ] && exit 0; sleep 0.2; done; exit 1'"; + ExecStart = "${pkgs.bash}/bin/bash -c 'echo 0 > /sys/class/backlight/asus_screenpad/bl_power'"; + }; + }; + # auto-generated stuff imports = [ (modulesPath + "/installer/scan/not-detected.nix") -- 2.51.2