Repository navigation
Conversation
OpenRGB reports no serial for SMBus controllers, so every identical RAM stick got the bare-name key and shared one lighting.json entry. findLive then resolved that key to the first stick only: Hand back, set, follow and save all reached one stick and left the rest on the last frame Ryoku pushed. ENE DRAM modes cannot be saved and a warm reboot keeps the controller powered, so the stuck stick survived reboots too. An I2C location now keys the device by adapter name and address. The /dev/i2c-N node is dropped because it follows driver load order. The legacy bare-name entry is copied to every stick it stood for on the next scan and dropped once all have claimed it, and identical names sort by key so the cards keep their order. Note: Fixed: two identical RGB RAM sticks show as separate lighting devices, and handing one back no longer leaves the other stuck
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Two identical RGB RAM sticks (ENE DRAM over SMBus) could not be controlled separately, and Hand back only released the first one.
OpenRGB reports no serial for SMBus controllers, so
deviceKeygave every matching stick the bare nameENE DRAM. They shared onelighting.jsonentry, andfindLiveresolved that key to the first stick only. Release, set, follow and save all reached one stick. The second stayed on the last frame Ryoku pushed. ENE DRAM modes can't be saved and a warm reboot keeps the controller powered, so it stayed stuck across reboots.This PR:
I2C: <adapter>, address 0xNN) asName#smbus:<adapter>@<address>. The/dev/i2c-Nnode is removed from the adapter name because the bus number follows driver load order and can change between boots. The adapter name and address stay put. Serial-less USB devices are unchanged, since their path moves.rememberFirstSight. Each stick it stood for gets its own copy, and the legacy entry is removed only after all of them have claimed it, and never while a live device still uses that key. Previously an alias was moved by pointer and deleted on first claim, which would have given only one stick the user's settings.I left the general case alone: two identical USB devices with no serial still share one entry, and
findLivestill returns only the first. Making a shared entry drive every match would touch apply, follow, save and the animator, so it seemed worth a separate discussion.Area
ryoku
How it was tested
go build ./... && go vet ./... && go test ./...inryoku/hub/backend: all pass.TestDeviceKeySeparatesIdenticalSMBusSticks,TestFirstSightGivesEverySharedStickItsOwnCopy,TestReleaseRestoresOnlyTheChosenStick. The last one driveslightingReleasethrough the fake SDK connection fromopenrgb_test.go. All three fail on the old code; the release test reportsrestore went to device 4 (packet 1101), want 7, which is the reported bug.0x71/0x73onSMBus PIIX4 adapter port 0 at 0b00 (/dev/i2c-8), OpenRGB 1.1:f7197d7):ryoku-hub lighting release "ENE DRAM"exits 0, but only0x71returns to its restore mode;0x73stays inDirect.lighting.json(XDG_CONFIG_HOMEpointed at a scratch dir):lighting scanlistsENE DRAM#smbus:SMBus PIIX4 adapter port 0 at 0b00@0x71and...@0x73and splits the old shared entry into both, each keepingmanaged, mode and restore. Releasing the0x73key leaves0x73unmanaged and0x71still managed, with no error.ryoku-hub), and SMBus GPU or motherboard controllers, which share the location format.Checklist
[area] scope: summarycommit subject.CHANGELOG.mdupdated in the area I touched.--no-verify.luac -p), shell scripts passbash -n, and QML passesqmllintwhere applicable. (Go only.)