You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
iPhone Duo: the screen stream shows the outer panel, so it is black when the device is unfolded #1457
On the iPhone Duo simulator (a foldable with two panels), the screen stream always shows the outer panel. When the device is unfolded, the outer panel is switched off, so every viewer of the stream sees a black screen, while screenshots of the active panel (for example agent-device screenshot, which passes --display=<panel>) show the unfolded screen correctly.
Environment
simlock 0.4.0 (worker on macOS 27.3, arm64), Xcode 27.3 (27C5020n)
Simulator: iPhone Duo, iOS 27.3, leased into simlock's scoped device set
agent-device 0.21.35 (driver for fold/rotation)
Viewer: a client that plays the lease's /stream/leases/<id> feed (the stream itself is the issue; viewers agree)
Steps to reproduce
Lease an iPhone Duo and open its stream.
agent-device fold open (inner panel on, outer panel off).
Watch the stream.
Observed
The stream turns black after unfolding.
daemon.log shows each stream opening at the outer panel's shape even while the device is unfolded, for example Screen stream opened {"codec":"h264","width":494,"height":720} (494 x 720 is the 466 x 678 pt outer panel scaled to maxDimension 720; the unfolded inner panel is 669 x 951 pt, or 951 x 669 when sideways).
Screenshots of the active panel at the same moment show the unfolded home screen.
Expected
The stream follows the panel that is on: the outer panel when folded, the inner panel when unfolded (and its rotation), switching when the pose changes.
Likely cause
simlock-screen-capture takes no display argument (usage: simlock-screen-capture <UDID> [--codec avcc|mjpeg] [--fps N] [--bitrate BPS] [--max-dimension PX] ...) and appears to attach to the first com.apple.framebuffer.display descriptor it finds. On a multi-panel device that is the outer panel. The 0.6.0 binary has the same usage, so upgrading does not change it.
Suggested fix
Choose the framebuffer display that is lit (or accept --display <name> and have the worker pass the active panel, the way agent-device picks the panel for screenshots from the panel table).
Re-select when the panel power changes (fold/unfold), or end the stream with a clear "the active panel changed" so viewers reconnect to the right one.
Cause found and fixed locally (simlock 0.4.0, iPhone Duo, iOS 27.3, Xcode 27.3):
simlock-screen-capture always selects the smaller (cover) framebuffer panel. When the Duo is unfolded that panel is opaque black, so the stream is black.
Also, the capture ignores the surfaces passed to the surfaces-changed callback, so it cannot follow a panel change.
Local fix (a patched capture program configured through drivers.ios.screenCaptureCommand):
It picks the lit panel by sampling content: the dark panel averages 0.000 and the lit one about 1.0.
It takes surfaces from the callback's arguments.
It rebuilds the scaler and the stream metadata when the size changes.
Verified through the lease stream endpoint:
The stream opens at 506 x 720 unfolded and 494 x 720 folded for the same lease.
Decoded frames are non-black in both poses, and the unfolded frame shows the home screen upright.
Limit on this host: capture surfaces look like registration-time snapshots, and a fold fires no in-process callback. So a stream held open across a fold does not switch panels; reopening the stream gives the right panel. The switch logic is in place for runtimes that do deliver new surfaces.
Fixed on main by feature #1531: ADR 0075 (#1532, f7f9d21), the capture streams the panel in use and switches on a fold (#1536, 5eb64e1), taps land on that panel (#1559, 353dcc7).
Activity
sittingmongoose commentedon Nov 8, 2026
Cause found and fixed locally (simlock 0.4.0, iPhone Duo, iOS 27.3, Xcode 27.3):
simlock-screen-capturealways selects the smaller (cover) framebuffer panel. When the Duo is unfolded that panel is opaque black, so the stream is black.Local fix (a patched capture program configured through
drivers.ios.screenCaptureCommand):Verified through the lease stream endpoint:
Limit on this host: capture surfaces look like registration-time snapshots, and a fold fires no in-process callback. So a stream held open across a fold does not switch panels; reopening the stream gives the right panel. The switch logic is in place for runtimes that do deliver new surfaces.
V3RON commentedon Nov 11, 2026
Being specified in #1531, which takes PR #1525 (proof of concept) as input. This issue stays open until that feature ships.
Written by an agent.
V3RON commentedon Nov 15, 2026
Fixed on
mainby feature #1531: ADR 0075 (#1532, f7f9d21), the capture streams the panel in use and switches on a fold (#1536, 5eb64e1), taps land on that panel (#1559, 353dcc7).Written by an agent.