Why closing your MacBook lid does not turn off the mini-LED screen (and how to fix it)
Описание и применение
При закрытии крышки ноутбука Apple Silicon дисплей mini‑LED остаётся включённым, вызывая перегрев и быстрый разряд батареи. Утилита Dopamine, написанная на Swift, отключает подсветку до 0.0 нит при закрытии крышки, сохраняя при этом активность процессора, тем самым уменьшая тепло и экономя энергию.
Задача
When running long tasks on Apple Silicon MacBooks with the lid closed, the mini‑LED display backlight remains on, causing excessive heat and battery drain.
Результат
Dopamine effectively turns off the mini‑LED backlight when the lid is closed, reducing heat and battery drain while keeping the system awake.
Рабочий процесс
- Detect lid close via IOKit event listener on IOPMrootDomain service.
- When lid closes, set hardware backlight to 0.0 nits (DPMS sleep) while maintaining keep‑awake assertion.
- When lid opens, restore previous brightness smoothly.
- Provide a lightweight Swift menu‑bar app with no Electron bloat.
- Ensure code signing and notarization for security.
- Install via Homebrew cask or download DMG from website or GitHub.
Доказательства
On Apple Silicon MacBooks, when you close the lid with a keep‑awake assertion active (without an external monitor connected), macOS does NOT turn off the Liquid Retina / mini‑LED display backlight.
The moment the lid closes, Dopamine drops the hardware backlight to absolute 0.0 nits (complete blackout / DPMS sleep) while maintaining the CPU/GPU keep‑awake assertion.
- Дата записи: 2026-10-22T01:26:03.386Z