From c3840734699c25b714f8a85c2e3d5cf7d3462e2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?ryan4yin=20=7C=20=E4=BA=8C=E8=8A=B1?= Date: Sun, 1 Nov 2026 20:57:41 -0600 Subject: [PATCH] fix(ai): reapply the OpenRGB profile after resume (#508) The Mystic Light controller drops its LED state on S3 resume without re-enumerating, so no udev event fires and openrgb.service keeps running without reloading the profile. Reapply it from a unit ordered after suspend.target, through the running server. Assisted-by: Claude Code (claude-opus-5-5) --- hosts/idols-ai/openrgb/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/hosts/idols-ai/openrgb/default.nix b/hosts/idols-ai/openrgb/default.nix index f6331023..62cc504b 100644 --- a/hosts/idols-ai/openrgb/default.nix +++ b/hosts/idols-ai/openrgb/default.nix @@ -17,4 +17,16 @@ in systemd.services.openrgb.preStart = '' ${pkgs.coreutils}/bin/install -Dm0644 ${offProfile} /var/lib/OpenRGB/profiles/off.json ''; + + # The controller drops its LED state on resume without re-enumerating, so no + # udev event fires; reapply the profile through the running server instead. + systemd.services.openrgb-resume = { + description = "Reapply the OpenRGB profile after resume"; + after = [ "suspend.target" ]; + wantedBy = [ "suspend.target" ]; + serviceConfig = { + Type = "oneshot"; + ExecStart = "${pkgs.openrgb}/bin/openrgb --profile ${offProfile}"; + }; + }; }