Skip to content

Log the physical display disconnect and reconnect path - #100

Merged
didriksg merged 1 commit into
mainfrom
log-display-toggle
Sep 2, 2026
Merged

Log the physical display disconnect and reconnect path#100
didriksg merged 1 commit into
mainfrom
log-display-toggle

Conversation

@didriksg

@didriksg didriksg commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Every other display capability reports to the unified log and this one did not, which is why #33 is still guesswork.

The reporter's capture shows WindowServer going silent for 29.5 seconds and then dropping their Philips, with nothing from Crisp to say what had been asked for or how long the ask took. @ncchen99 found the same hole from the other side in #91, noting that restoreIfNoActiveDisplay logs nothing at all.

A new display category covers the four things a capture needs: which action opened a transaction (a user disconnect, a user reconnect, or a softReconnect blink, which are indistinguishable at the transaction level), what SkyLight and CoreGraphics returned, how long the commit took, and whether restoreIfNoActiveDisplay acted.

The timing is split on purpose. CGCompleteDisplayConfiguration is timed inside the operation and the wait for it is timed outside, because those are different numbers. The 10 second wrapper only stops Crisp waiting, it cannot cancel the call, so on a timeout the outer line reports a failure at about 10000 ms while the commit is still running and reports its real duration later. If #33 turns out to be that commit blocking inside WindowServer, this pair of lines says so outright rather than leaving a silence to be guessed at. The 500 ms slow threshold matches DDCService so the two categories read alike.

No behaviour change.

Verification: make compile and whole-tree swiftlint --strict are green; make test runs here in CI. All ten log lines mark every interpolated value .public, checked mechanically, since a capture full of <private> would be no better than the silence this replaces. Not yet exercised live: every path in this file needs two displays or a panel click to reach, so the emitted output still wants one run on hardware before it is relied on.

Note for merge order: this and #99 both touch restoreIfNoActiveDisplay, so whichever lands second needs a one-line conflict resolved.

🤖 Generated with Claude Code

https://claude.ai/code/session_016NDzD18GySiCwEGfWJiT4J

Every other display capability reports to the unified log, and this one did not, which is why issue #33 is still guesswork. The reporter's capture shows WindowServer freezing for 29.5 seconds and then dropping their Philips, with nothing from Crisp to say what had been asked for or how long the ask took. @ncchen99 noticed the same hole from the outside in #91, that restoreIfNoActiveDisplay logs nothing at all.

A new "display" category covers the four things a capture needs: which action started a transaction (a user disconnect, a user reconnect, or a softReconnect blink, which look identical at the transaction level), what SkyLight and CoreGraphics returned, how long the commit took, and whether restoreIfNoActiveDisplay acted.

The timing is split on purpose. CGCompleteDisplayConfiguration is timed inside the operation, and the wait for it is timed outside, because those are different numbers: the 10 second wrapper only stops Crisp waiting, it cannot cancel the call, so on a timeout the outer line reports a failure at about 10000 ms while the commit is still running and reports its real duration later. If #33 is the commit blocking inside WindowServer, that pair of lines says so outright instead of leaving a silence to be guessed at. The 500 ms slow threshold matches DDCService so the two categories read alike.

No behaviour change. Every interpolated value is marked public, since a capture full of <private> would be no better than the silence this replaces.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016NDzD18GySiCwEGfWJiT4J
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.

1 participant