pmset
CautionPower & sleep settings
pmset -g
Shows/sets power policy. -g assertions reveals what's blocking sleep — the classic no-sleep probe.
Examples
pmset -g assertionsFind what prevents sleeppmset -g log | grep -e "due to"History of wake reasonssudo pmset -c displaysleep 15 sleep 30Set display and system sleep times on AC powersudo pmset repeat wakeorpoweron MTWRF 08:00:00Wake or power on at 08:00 on weekdayspmset -g schedShow scheduled power events
Syntax
pmset -g [assertions] / pmset sleepnow
Key points
- -a applies to all power sources, -b to battery, -c to the power adapter.
- When PreventUserIdleSystemSleep is 1 in assertions, the responsible process is listed below it.
- Changing settings needs sudo.
When it does not work
- If the Mac wakes at night, the text after due to in pmset -g log names the cause (network access and similar).
Before you run it
Changes affect battery behavior.
Used when you see
Mac won't sleep (or wakes up)
1
See the whole flow →Identify assertions blocking sleepThe holder of PreventUserIdleSystemSleep is your culprit.
Related commands
- caffeinateKeep the Mac awake
- powercfgPower & battery diagnostics
The same reference, with no signal at all
Every command on this site, held on your device. The app adds 632 more: 1,510 commands and 120 fix flows, searchable with no connection. Free to install, no ads (some content is a one-time purchase).
Get it free on the App Store