Repository navigation
Conversation
The framebuffer stream picked the first display reporting `displayClass == 0`, a heuristic written to skip tvOS TVOut rather than to choose between panels. A foldable reports an integrated panel per fold state and lights one of them, and which of those two comes first is not the one that is lit -- so the stream could attach to a dark panel and copy black frames for the life of the boot. It now reads the active integrated display, which is what the screenshot commands already do. A runtime whose provider cannot report displays keeps the old heuristic, since that is all that was ever available there. `Configure` lets a client name a display instead, and fixes the scale, for the life of the stream: geometry a client has allocated against cannot change under it, so the message is accepted at most once and only before the first copy. It is answered with the chosen display's geometry, so it doubles as a probe. Streams that never send one behave exactly as before. `list_displays` reports what there is to choose from, since a unique id is not something a client can otherwise discover. Co-Authored-By: Claude Opus 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.
Why
framebuffer_streamselected its display with:first-match, with a comment about skipping tvOS TVOut. A foldable reports an integrated panel per fold state and lights one of them, and the first class-0 panel is not necessarily the lit one. On an iPhone Duo I measured, with the device booted:
and on a different boot of the same device the other panel was the lit one. So the stream can attach to a dark panel and copy black frames for the whole session — which shows up as boot verification timing out with frames arriving and nothing ever non-black.
What
SimulatorScreenshotCommandsalready does. A runtime whose provider cannot report displays keeps the old heuristic, since that is all that was ever available there.Configurelets a client name a display and fix the scale for the stream's lifetime. Accepted at most once and only before the first copy — a client allocates against the geometry it is told, so neither can change under it. Answered with the chosen display's geometry, so it doubles as a probe. Streams that never send one behave exactly as before.list_displaysreports what there is to choose from; a unique id is not otherwise discoverable.Two small visibility changes in FBSimulatorControl:
Framebuffer.surface(for:simulator:)exposes the per-display factory while keepingFramebufferSurfaceLocatorinternal, andactiveIntegratedDisplayIfSupported()becomes public — it returns nil exactly when the runtime cannot report displays, which is the fallback signal.Verified
Against an iPhone Duo on iOS 27.1:
Notes
Configurenames one.SimulatorDisplayError.changed.🤖 Generated with Claude Code