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)
This commit is contained in:
ryan4yin | 二花 authored and GitHub committed 2026-11-02 10:57:41 +08:00
1 parent 0f5ad1ad10
commit c384073469
1 file changed
+12
+12
View File
@@ -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}";
};
};
}