Skip to content

Instantly share code, notes, and snippets.

@h3ct0rjs
Created May 19, 2026 20:41
Show Gist options
  • Select an option

  • Save h3ct0rjs/3ab8874ec8e2708815c5be3d307beca0 to your computer and use it in GitHub Desktop.

Select an option

Save h3ct0rjs/3ab8874ec8e2708815c5be3d307beca0 to your computer and use it in GitHub Desktop.
MacBook Pro M5 + KVM + LG TV: Clamshell mode fix
# Clamshell mode fix: MacBook Pro M5 + KVM MINIX K1 + LG TV
## Setup
- **Mac**: MacBook Pro M5 Pro, macOS 26.5
- **KVM**: MINIX K1 USB-C (no EDID emulation)
- **Display**: LG TV connected via HDMI
---
## Problems & Fixes
### 1. Black screen when closing the lid
- **Cause**: LG TV blocks high-resolution signals without the right setting
- **Fix**: TV → Settings → Picture → HDMI Settings → enable **HDMI Ultra HD Deep Colour** on the port being used
### 2. macOS not detecting lid closure
- **Diagnose**: Run `pmset -g log | tail -40` and look for `com.apple.powermanagement.lidopen`
- **Cause**: KVM has no EDID emulation — macOS doesn't see a stable external display
- **Note**: Clamshell still activates with MINIX K1 despite the log entry
### 3. Optimal resolution/refresh rate
| Setting | Result |
|---|---|
| 4K@120Hz | Black screen (too much bandwidth through KVM) |
| 4K@60Hz | Works but text is too small on TV |
| **1080p@60Hz scaling:on** | ✅ Stable and comfortable |
---
## Key tool: displayplacer
```bash
# Install
brew install jakehilborn/jakehilborn/displayplacer
# List display and available modes
displayplacer list
# Apply 1080p@60Hz (stable config)
displayplacer "id:<YOUR_DISPLAY_ID> res:1920x1080 hz:60 color_depth:8 enabled:true scaling:on origin:(0,0) degree:0"
```
---
## Quick diagnostics
```bash
# Check what displays macOS detects
system_profiler SPDisplaysDataType
# Check sleep/wake and lid events
pmset -g log | tail -40
```
> If you see `Television: Yes` → enable HDMI Ultra HD Deep Colour on the TV.
> If you see `lidopen` in pmset → make sure the charger is connected and nothing is between the lid and keyboard.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment