macOS alarm works when Mac sleeps
说明与用途
Matuta 通过提前唤醒、管理音频输出和处理权限,使 macOS 处于睡眠状态时的闹钟可靠响铃。
问题
macOS Clock alarm does not ring if Mac is asleep; users must disable automatic sleep to hear alarm.
结果
Matuta enables macOS alarms to ring reliably when the Mac is asleep by scheduling early wake, managing audio output, handling permissions, and providing diagnostics, all without requiring automatic sleep to be disabled.
工作流
- Schedule wake event 2 minutes before alarm using IOPMSchedulePowerEvent
- Ensure Mac wakes early and holds power assertion until alarm time
- At alarm time, force audio output to built‑in speakers, unmute, raise volume
- If source is Spotify/Apple Music, request Automation permission via AEDeterminePermissionToAutomateTarget; if app not running, skip permission check
- Play user‑selected tone or fallback backup tone concurrently
- Provide pre‑sleep diagnostics and one‑click fixes for common issues
- Allow language switching via key‑based localization
- Build and distribute via Developer ID signing and notarization
- Install by dragging app into Applications folder
证据
macOS has an alarm in the Clock app since Ventura. I found out the hard way that it doesn't ring once the Mac goes to sleep.
The workaround the internet offers is "turn off automatic sleep." That isn't a workaround.
Matuta works in three layers: Before you sleep, At alarm time, Underneath
- 记录日期: 2026-09-13T01:32:07.050Z