Add OpenRGB SDK startup readiness service #60
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-51-openrgb-startup-device-rescan"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Fixes #51.
This PR replaces the dependency on the generated OpenRGB XDG autostart unit with a repo-owned OpenRGB SDK user service.
The goal is to make OpenRGB start only after the NVIDIA I2C adapter needed for GPU RGB discovery is visible, reducing the chance that OpenRGB scans too early and exposes only the motherboard.
Changes
Added
scripts/wait_for_openrgb_i2c.py/sys/class/i2c-devNVIDIA i2c adapter0when found,1on timeout, and2for invalid argumentsAdded
systemd/user/openrgb-sdk.serviceruns the I2C readiness helper as
ExecStartPrestarts OpenRGB SDK server with:
/usr/bin/openrgb --server --server-host 127.0.0.1 --server-port 6742Updated
systemd/user/rgb-aura.serviceopenrgb-sdk.serviceapp-OpenRGB@autostart.serviceUpdated
docs/systemd-user-service.mdAdded tests for the I2C readiness helper.
Safety notes
This does not weaken RGB Aura device mapping safety.
RGB Aura still validates the OpenRGB device mapping before writing any RGB data. Missing required devices remain a hard failure.
This PR intentionally does not hardcode the OpenRGB SDK rescan packet. The investigation confirmed that
NET_PACKET_ID_REQUEST_RESCAN_DEVICES = 140exists upstream, but the currently usedopenrgb-python 0.3.6dependency does not expose it in its public API.Validation
Validated locally:
ruff check scripts/wait_for_openrgb_i2c.py tests/test_wait_for_openrgb_i2c.pypython -m pytest tests/test_wait_for_openrgb_i2c.pysystemd-analyze --user verify systemd/user/openrgb-sdk.service systemd/user/rgb-aura.servicelocal user-service startup test:
openrgb-sdk.servicestarts successfullyExecStartPrefinds NVIDIA I2C adapters127.0.0.1:6742rgb-aura.servicestarts successfully afterward