How to Cleanly Unplug a Second Display Before LockDown Browser Launches
The clean sequence (5 minutes before exam)
- Save any open work on the second display's windows. macOS auto-migrates windows to the built-in display when the second is removed; if you have unsaved work, save first.
- Disable AirPlay: Control Center → Screen Mirroring → off.
- Disable Sidecar: System Settings → Displays → click iPad → Disconnect.
- Quit any app using a USB-C dock display feature: Spotify, video editors, anything that may have window state on the dock display.
- Physically unplug the cable: HDMI, DisplayPort, USB-C-to-display, etc. Pull the cable from your laptop end (not the monitor end).
- If using a USB-C dock with display passthrough: either unplug the dock's display ports, OR unplug the dock entirely if you don't need its other features (USB devices, Ethernet).
- Verify in System Settings → Displays: only your built-in display should be listed.
- Wait 10 seconds. macOS's display arrangement state takes a moment to stabilize after disconnect.
- Launch LDB from your LMS.
If LDB still detects "multi-display"
Common causes for false positives after unplugging:
- USB-C dock still claiming a phantom display. Some docks register a virtual display even with no physical monitor connected. Unplug the dock entirely.
- Sidecar didn't fully disconnect. System Settings → Displays - verify the iPad is not listed. If it is, click it → Disconnect.
- AirPlay receiver still active. Even if you stopped mirroring, the receiver might still be advertising. Toggle Wi-Fi off and on to force a refresh.
- External display in System Settings still listed even though physically disconnected. Click the display → "Remove from displays" or "Disable".
- macOS hasn't recognized the unplug yet. Wait another 30 seconds and retry.
What works in System Settings (without physical unplug)
If you can't physically unplug (e.g. external display is built into a dock you need for keyboard/mouse), you can disable the display in software:
- System Settings → Displays.
- Click the external display's tile to highlight.
- Click "Display Settings" or click the display gear.
- Look for "Use as primary display" / "Mirror" / individual disable controls.
- Some macOS versions: drag the display tile out of the arrangement to disable.
If your specific Mac+macOS combination doesn't have a software disable option, physical unplug is the only path.
Closed-Lid Mode workaround
Alternative: use Closed-Lid Mode to make your built-in display sleep, leaving only the external active. CGDisplayActiveDisplayCount returns 1; LDB doesn't block.
- Plug your laptop into AC power (Closed-Lid Mode requires AC).
- Connect external display + USB keyboard + USB mouse.
- Sign in to your laptop normally with lid open.
- Close the lid completely. Wait 10 seconds.
- External display becomes the only active display.
- Launch LDB. Single-display configuration.
Caveat: your built-in webcam is now closed inside the lid. Use an external USB webcam or Continuity Camera (iPhone). The exam still works; only the camera source changes.
Don't do this
- Don't unplug DURING LDB launch. macOS may not handle the display state change cleanly mid-launch; LDB can crash or get into a weird state.
- Don't disable system processes related to display (WindowServer, etc.). You'll crash macOS.
- Don't override the multi-display detection via terminal hacks. The check happens at LDB launch time; software-level overrides won't bypass it.
Re-plugging after the exam
After exam submit + LDB exits:
- Plug the cable back in.
- macOS detects the display within ~5 seconds.
- Window arrangement may have shifted; drag windows back to where you want them.
If you used Closed-Lid Mode, simply opening the lid wakes the built-in display.
Frequently asked questions
My exam is in 5 minutes - can I just close the lid quickly?
Closed-Lid Mode requires AC power + ~10 seconds for the built-in to sleep. Don't do this in a panic - physical unplug is faster (~30 seconds total).
Will the second display's windows come back after I plug it back in?
macOS remembers window positions per display. When you re-plug, windows return to their original positions - though some apps (especially full-screen ones) may need to be re-positioned.
I have a vertical / portrait orientation external display. Same procedure?
Yes - CGDisplay doesn't care about orientation, only count. Disconnect the same way.