mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-11-13 12:13:46 +01:00
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:
1 parent
0f5ad1ad10
commit
c384073469
1 file changed
+12
@@ -17,4 +17,16 @@ in
|
|||||||
systemd.services.openrgb.preStart = ''
|
systemd.services.openrgb.preStart = ''
|
||||||
${pkgs.coreutils}/bin/install -Dm0644 ${offProfile} /var/lib/OpenRGB/profiles/off.json
|
${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}";
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user