Skip to content

Fix external brightness delays with multiple displays - #71

Open
DEOWL-kan wants to merge 10 commits into
didriksg:mainfrom
DEOWL-kan:fix/ddc-brightness-latency
Open

Fix external brightness delays with multiple displays#71
DEOWL-kan wants to merge 10 commits into
didriksg:mainfrom
DEOWL-kan:fix/ddc-brightness-latency

Conversation

@DEOWL-kan

@DEOWL-kan DEOWL-kan commented Aug 21, 2026

Copy link
Copy Markdown

Summary

  • Match Apple Silicon DDC channels by stable CoreDisplay/IORegistry location before falling back to display identity or traversal order.
  • Run DDC operations on a serial queue per display, so one slow I2C channel cannot block every external monitor.
  • Coalesce rapid brightness changes to the latest target and apply an immediate software preview while DDC capability is unknown or slow.
  • Reject stale DDC reads, writes, and callbacks after newer user input or a display topology change.

Root cause

Crisp previously routed every DDC transaction through one global serial queue. On the reproduced setup, one external display could block an I2C read for about 12 seconds, which delayed brightness changes for the other display as well. Identical monitors could also be paired by unstable traversal order, while reconnect callbacks could update state belonging to a newer display topology.

Verification

  • make check: 75 tests passed, strict SwiftLint passed, and localization keys passed.
  • arm64 release compilation passed.
  • x86_64 Xcode build passed with warnings treated as errors.
  • Hardware-tested with two AOC U32N10 displays on Apple Silicon. While the slow channel was blocked, its slider responded in 2.26 ms with immediate gamma preview; the healthy display responded in 1.57 ms and its DDC brightness read back as 67/100 in 51 ms.
  • Restored the test displays to their original 50/77 brightness values after verification.

Closes #72.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

External brightness changes can be delayed by a slow DDC display

1 participant