fix: use openrgb static mode + SDK client to stop crashes on login
direct-mode color apply aborts (vector OOB → SIGABRT) on ASUS Aura devices that expose addressable zones with zero LEDs; switch to static mode, which applies the same color across all devices/zones without hitting that path. Also connect to the running OpenRGB SDK server via --client host:port instead of re-detecting all hardware on every toggle. This wires up the previously-unused openrgb.host/port config fields and removes a full USB/HID re-scan per command — that re-scan racing the server is what made it flakiest at login/boot. The existing retry logic now serves its intended purpose (waiting for the server to come up if the daemon starts first) rather than re-running a guaranteed-crashing command. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -19,7 +19,7 @@ func New(cfg *config.Config) (*Controller, error) {
|
||||
c := &Controller{cfg: cfg}
|
||||
|
||||
if cfg.OpenRGB.Enabled {
|
||||
client, err := openrgb.Connect()
|
||||
client, err := openrgb.Connect(cfg.OpenRGB.Host, cfg.OpenRGB.Port)
|
||||
if err != nil {
|
||||
log.Printf("warning: openrgb unavailable: %v", err)
|
||||
} else {
|
||||
@@ -59,7 +59,7 @@ func (c *Controller) SetLEDs(on bool) error {
|
||||
|
||||
func (c *Controller) setOpenRGB(on bool) error {
|
||||
if c.orgb == nil {
|
||||
client, err := openrgb.Connect()
|
||||
client, err := openrgb.Connect(c.cfg.OpenRGB.Host, c.cfg.OpenRGB.Port)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user