Can LockDown Browser Detect a Second Monitor on Mac? (Yes - Here's How)
The detection mechanism
LDB makes two calls at launch:
uint32_t count;
CGDisplayActiveDisplayCount(&count);
// count is the number of currently-active displays
// LDB blocks if count >= 2 (default Dashboard config)
This is identical to what System Information → Graphics/Displays shows. There's no hidden API; the detection is straightforward.
Things that count as "active displays"
| Display source | Counted? | Notes |
|---|---|---|
| Built-in MacBook display (lid open) | ✓ | Always counted as #1 |
| HDMI external | ✓ | Standard |
| DisplayPort external | ✓ | Standard |
| USB-C-to-display direct | ✓ | Standard |
| Thunderbolt 4 external | ✓ | Standard |
| USB-C dock with HDMI/DisplayPort out | ✓ | Each output port counts independently |
| Sidecar iPad | ✓ | Registered as virtual CGDisplay |
| AirPlay to Apple TV / Vizio / Roku TV | ✓ | Mirroring or extending - both counted |
| iPhone Mirroring (Sequoia 15+) | ✓ | Counted on the Mac side |
| Continuity-displayed iPad as input source | ✓ when Sidecar active | Sidecar is what makes it count |
Things that DON'T count
| Setup | Why it doesn't count |
|---|---|
| Closed-Lid Mode with external display only | Built-in display sleeps; CGDisplay count = 1 |
| iPad next to laptop, NOT in Sidecar | Separate device, not registered to macOS's display system |
| External display physically connected but DISABLED via System Settings | Inactive in macOS, so not counted |
| Universal Control (cursor on iPad) | Universal Control != Sidecar; iPad is not a CGDisplay |
| Phone next to laptop, even with Continuity Camera | Camera != display |
| Smart TV in same room, not connected via AirPlay/HDMI | No connection to Mac's display system |
Edge cases
USB-C dock that adds a "virtual" display when nothing is plugged in
Some USB-C docks (CalDigit, OWC) have a quirk where the dock advertises a display port even when no monitor is connected. macOS occasionally registers this as an active display with no physical screen. Symptom: LDB blocks with multi-display error but you don't see anything connected.
Solution: unplug the dock entirely (briefly, for the exam). The phantom display disappears from CGDisplay list.
Wireless display (Miracast, third-party)
Third-party wireless display protocols register as CGDisplays the same as AirPlay. Disable.
Twin-display laptops (rare)
Some Asus / Acer Windows laptops have a secondary screen above the keyboard. Macs don't have this hardware. Not relevant.
How to verify your CGDisplay count
Open Terminal and run:
system_profiler SPDisplaysDataType | grep -i "Resolution"
Each line is one detected display. Count them. If >1, LDB will block.
Or use AppleScript:
osascript -e 'tell application "System Events" to get count of displays of (get display preferences)'
What happens if you bypass and try to launch
You can't bypass - the check happens at launch, before any exam loads. The block is consistent and reproducible. Disconnect or disable the second display, restart LDB.
Frequently asked questions
If I cover my external monitor with a piece of cardboard, does LDB still detect it?
Yes - covering the screen physically doesn't change the macOS display state. The display is "active" because of the connection, not because pixels are visible. Unplug or disable.
Can I switch to single-display by changing the macOS arrangement?
No - System Settings → Displays → Arrangement only changes layout, not the count of active displays. Disable a display via the per-display gear icon, or unplug.
My MacBook lid is closed and I'm using only an external. Why does LDB still block?
Should not block in that configuration if Closed-Lid Mode is properly active. If LDB blocks: lid open → close lid completely → wait 10 seconds → external becomes only display → launch LDB. If still blocking, the built-in might not be sleeping (charging cable disconnected, lid not fully closed).