Skip to content

Plan A 5K60 and multi-device display test plan - #1

Draft
oosuhada wants to merge 72 commits into
mainfrom
feat/plan-a-5k60-benchmark
Draft

Plan A 5K60 and multi-device display test plan#1
oosuhada wants to merge 72 commits into
mainfrom
feat/plan-a-5k60-benchmark

Conversation

@oosuhada

@oosuhada oosuhada commented May 14, 2026

Copy link
Copy Markdown
Owner

Goal

Build iBridge into a practical MacBook -> iMac software external display path. Current target is BetterDisplay Virtual 16:9 over wired LAN, with receiver fullscreen UX, bounded capture/encode latency, and input relay moving toward real external-display behavior.

Current status

  • Branch is feat/plan-a-5k60-benchmark; latest handoff commit is 8bbdba0.
  • The 2017 iMac is immediately connectable. scripts/start_2017_imac_receiver_macos.sh builds an Intel receiver locally, uploads it to ~/ibridge-remote/latest, starts it fullscreen with --hide-status, and verifies TCP 48320.
  • Receiver UI/input MVP is implemented: standard macOS fullscreen/resizable window, Command-F fullscreen toggle, Esc fullscreen exit, pointer/key capture on the receiver surface, and input relay back to the source Mac over the existing TCP connection.
  • Receiver input capture is now hardened with view-level handling, AppKit local/global monitors, and a listen-only CGEventTap for pointer events.
  • Primary sender listens for receiver input lines and injects pointer/key events into the captured display with CGEvent.
  • Source-side ibridge-primary Accessibility permission is now confirmed: latest sender printed input_accessibility_trusted=true.

Latest measured / verified result

  • Current capture target is correct: display_index=1 display_id=12 width=3840 height=2160 frame=(-3840.0, -157.0, 3840.0, 2160.0) and input_target_display_id=12.
  • Receiver diagnostics are active on the 2017 iMac: receiver_local_event_monitor_installed and receiver_event_tap_installed both logged.
  • Synthesized iMac-local input self-test passed end to end: receiver logged receiver_input_event and input_sent; source logged input_event_received for both key and pointer events.
  • Input MVP deployment smoke before diagnostics: latest receiver restarted on the 2017 iMac, DURATION=3 scripts/start_mbp_to_2017_imac_4k60.sh connected with input_relay=on, encoded 23/180 changed frames, had 0 send failures, and receiver logged 23 frames.
  • Earlier 4K60 virtual-display motion comparison over direct 1GbE, HEVC 80Mbps: backpressure 1 reduced p95 encode from 52.175 ms to 19.090 ms with 0 send failures.

Changed areas

  • apps/receiver-macos/Sources/iBridgeReceiverMac/main.swift
  • apps/primary-macos/Sources/iBridgePrimary/main.swift
  • scripts/package_macos_alpha.sh
  • docs/18_ALPHA_RELEASE.md
  • docs/current-work.md

Validation commands run

swift build --package-path apps/receiver-macos -c release --arch x86_64
swift build --package-path apps/receiver-macos -c release
swift build --package-path apps/primary-macos -c release
python3 apps/shared-protocol/test_protocol_v0.py
bash -n scripts/package_macos_alpha.sh scripts/start_ibridge_virtual_capture.sh scripts/start_2017_imac_receiver_macos.sh scripts/start_mbp_to_2017_imac_4k60.sh
scripts/package_macos_alpha.sh
scripts/start_2017_imac_receiver_macos.sh
DURATION=600 scripts/start_mbp_to_2017_imac_4k60.sh
ssh gabrieljang@100.89.104.119 'tail -80 ~/ibridge-remote/receiver-macos-48320.log'
ssh gabrieljang@100.89.104.119 'grep -n "receiver_input_event\|input_sent" ~/ibridge-remote/receiver-macos-runtime.log | tail -40'
grep -n 'input_event_received' benchmarks/runs/2026-05-17_1121_mbp_to_2017_imac_4k60/primary_console.txt | tail -80

Remaining blockers / next tests

  • Manual operator test still needs the physical cursor to move onto the actual 2017 iMac receiver screen via Universal Control / Link Keyboard and Mouse. Moving into the MacBook source's left-side BetterDisplay Virtual 16:9 is not the same as moving onto the iMac receiver.
  • Once manual physical input is confirmed, move MBP -> 2015 iMac Ethernet tests through 2560x1440, 3840x2160, then 4096x2304.
  • Dual-iMac testing needs either a switch or two Ethernet adapters, plus multi-receiver session/profile management.
  • MacBook Air repeats should use conservative profiles first; current evidence still treats 2560x1440@60 as the realistic Air default.

Notes for another machine

git fetch origin
git checkout feat/plan-a-5k60-benchmark
git pull --rebase
git submodule update --init --recursive reference/BetterDisplay
scripts/package_macos_alpha.sh
scripts/start_mbp_to_2017_imac_4k60.sh

@oosuhada

Copy link
Copy Markdown
Owner Author

Update: added encoder fallback recovery probe (b7c3eff).

Key result:

  • Restarting user VTEncoderXPCService did not recover post-tiled 4096x2304/3200x1800 fallback performance.
  • 4096x2304 stayed around p95 46.5ms even after service restart and 60s wait.
  • 3200x1800 stayed slow around p95 41.8ms.
  • 2560x1440 remained safe at p95 10.8ms.

Decision added to docs/logs: after tiled 5K60, high-detail fallback switching is unsafe until a stronger reset/session strategy is proven; current conservative emergency fallback is 2560x1440@60.

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