VCP and display topology fixes (from #513), plus opt-in live read - #517
Merged
Conversation
The event-driven CommandWorker (previous commit) removed the perpetual polling that, as a side effect, kept the sliders in sync with changes made on the monitor's own menu during white-balance sessions. Bring that back as an explicit mode: a Live read toggle on the Image card re-reads every level once per second, and expires after two minutes so an abandoned panel never polls the DDC bus forever. The _queued guard in MonitorLevel coalesces ticks, so a slow bus cannot pile up requests. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
First extraction from #513: the VCP/topology commit (2764856), reviewed fix by fix, cherry-picked with two adaptations, plus a follow-up commit restoring OSD monitoring as an explicit bounded mode.
From #513 (adapted)
VcpControlnow disposes itsIVcpTransport; the probe task is awaited before the transport goes away, and disposed controls are evicted from the cache.GetHKeyNamecopied 2× the buffer size (Marshal.Copycounts chars, the buffer counts bytes); replaced by a bounded decode inMonitorDeviceHelper, with a unit test. (The buggy original still lives in HLab.Core — tracked separately.)DxVa2VcpTransportpicked_physicalMonitors[0]for every device sharing an HMONITOR; it now matches the physical monitor by description. When two identical descriptions make the choice ambiguous, VCP is disabled for that device rather than guessed — behavioral change to be aware of.CommandWorker/MonitorLevelno longer re-enqueue forever; levels go quiet once converged. The hand-tuned slow-monitor behavior is preserved verbatim: read-before-write, convergence-basedMoving, 10 retries / 100 ms backoff / auto-disable, latest-value coalescing. Closing one monitor's panel no longer kills the shared worker.WindowsDisplayControllerstages, commits, and rolls back viaResaveCurrentConfigurationinstead of leaving the registry half-written when anAttachToDesktopfails mid-batch.ActiveConnectionreplaces order-dependentConnections[0]lookups (also removes potentialIndexOutOfRange).SetPrimary/Attach/Detach/SetLocationsfailures show a dialog. Adapted from the PR version: OS-agnostic wording (the controller also targets Linux/kscreen) and Escape kept working (IsCancelmoved to the visible OK button).New: opt-in live read
The perpetual polling removed above was also what kept sliders in sync with changes made on the monitor's own OSD during white-balance sessions. That comes back as an explicit mode: a Live read toggle on the Image card re-reads every level once per second and auto-expires after two minutes, so an abandoned panel never polls the DDC bus forever. The
_queuedCAS guard coalesces ticks, so a slow bus cannot pile up requests. Interval/duration are constants onVcpControl(LiveReadInterval,LiveReadDuration).Tested
WindowsMonitorSafetyTests)VcpSafetyTests+ 2 live-read tests, stable over 5 runs)Needs testing on Windows
🤖 Generated with Claude Code