Check Why Your Mac Slept or Woke Up (pmset -g log)
Read the power management event log to see sleep and wake reasons, e.g. lid, keyboard, network or Bluetooth.
Run `pmset -g log | grep -E "Entering Sleep|Wake from|DarkWake from" | tail -20` to see the most recent sleep and wake events with their causes.
01Command
Command
$ pmset -g log | grep -E "Entering Sleep|Wake from|DarkWake from" | tail -2002What it does
pmset -g log dumps the full power-management history: every entry shows a timestamp, whether it was a normal Sleep, a background DarkWake, or a full Wake, and the 'due to' clause names the culprit (e.g. 'due to Lid Closed', 'due to EC.Keyboard/Lid', 'due to Network activity'). Piping through grep keeps only the sleep/wake lines so you can quickly correlate a mysterious 3 a.m. wake with a scheduled job, peripheral or network request. No sudo is needed to read the log.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- pmset(1) man pageEvidence: Lists `-g log` among the -g getter options: display the system power management log including sleep and wake entries with their reasons.
- pmset - Power management settingsEvidence: Documents `pmset -g log`: 'Display a history of sleeps, wakes, and other power management events', noting the log is for admin and debugging purposes.
Last verified: 2026-09-19 · Category: System & Settings