Files

37 lines
1.8 KiB
Markdown
Raw Permalink Normal View History

# rgb-lavender
Catppuccin Latte lavender (`#7287FD`) on every RGB controller in the cachyos-gaming desktop
(ASUS Z790 Hero build), driven by OpenRGB and kept that way across suspend/resume.
## Pieces
| File | Role |
|---|---|
| `bin/rgb-lavender` | Applies the colour to every device, resolving them by name. Tunables at the top (`RGB_COLOR`, sizes, headers). |
| `bin/rgb-resume-watch` | Listens on the system bus for logind `PrepareForSleep(false)` and restarts the OpenRGB server, which re-runs `rgb-lavender`. |
| `systemd/openrgb-server.service` | `openrgb --server --noautoconnect` as a user service. |
| `systemd/rgb-lavender.service` | Oneshot, `PartOf=openrgb-server.service` → re-applies whenever the server (re)starts. |
| `systemd/rgb-resume-watch.service` | Runs the watcher. Pure user-level, no root sleep hook. |
## Why the resume watcher
Corsair Commander Core XT, Lighting Node Pro and the Aura headers run in *direct* mode, which only
lives in controller RAM. After s2ram the USB controllers re-enumerate and lose it: XT fans go dark,
the rest fall back to firmware defaults, and the ENE DRAM drops off I2C until re-detected. The
login-time oneshot never re-runs, so the watcher does it for you (~10 s after wake).
## Gotchas (learned the hard way)
- **Always write the whole device.** A zone-only direct write starves the other zones and they go dark.
- Lighting Node Pro channels default to 14 LEDs — size to 204; `--size` must travel with mode+colour.
- Aura addressable headers start at 0 LEDs; same rule. Commander Core XT auto-sizes.
- ENE DRAM is firmware-static and survives boots; Glorious Model O detection is flaky and is skipped if absent.
- The `recv_select failed receiving magic` spam in the server log is just the detection poll in `rgb-lavender`.
## Install
```sh
./install.sh
RGB_COLOR=ca9ee6 rgb-lavender # try another colour ad hoc
```