Mac maintenance
How to Use pmset on Mac to Tune Power Settings
Use pmset to inspect and tune sleep, wake, hibernation, and battery settings on macOS — with examples for MacBook Pro, Mac Studio, and more.
Your MacBook is waking up in your bag and arriving at the cafe at 4% battery. Or it’s not waking up at all when you open the lid. Or it’s downloading a 12 GB update overnight when you specifically wanted it not to. The settings that control all of this live behind pmset, the power-management CLI macOS has shipped since 10.4.
The Energy Saver pane in System Settings exposes maybe a third of what pmset can configure. The rest is what you turn to when default behavior isn’t cutting it.
The current settings, at a glance
pmset -g
That dumps every active power setting for the current power source. You’ll see lines like:
displaysleep 5
sleep 10
womp 1
hibernatemode 3
The numbers are minutes (for sleep timers) or boolean-ish flags (for everything else).
For the full picture across every power source:
pmset -g custom
That prints separate sections for Battery Power and AC Power. macOS keeps independent settings for each — which is the whole point. Your MacBook should sleep aggressively on battery and stay awake on the wall.
Power source and battery state
pmset -g batt
Gives you the current charge percentage, whether you’re charging, and the time-to-full or time-remaining estimate.
pmset -g ps
Lists the power sources, which is more useful on a Mac with a UPS.
For deep battery info on portables:
pmset -g everything
That dumps charge cycles, design capacity vs. current capacity, temperature, and the last few sleep/wake events. If your battery feels weaker than it used to, this is where you check before assuming it’s broken. Apple Silicon Macs report a “Maximum Capacity” percentage — under 80% usually means it’s time to think about a battery service.
Set sleep timers
To make the display sleep after 10 minutes on battery:
sudo pmset -b displaysleep 10
-b is “battery only,” -c is “AC only,” -a is both. So:
sudo pmset -a displaysleep 5 # both AC and battery
sudo pmset -c sleep 0 # never sleep on AC
sudo pmset -b sleep 15 # sleep after 15 min on battery
sleep 0 means never. The system display can still sleep separately.
Hibernate modes (and why your MacBook is slow to wake)
hibernatemode controls what happens to RAM when your Mac sleeps. The values:
0— Sleep to RAM only. Fastest wake, no protection from battery dying.3— Default on portables. Sleeps to RAM, but writes a copy to disk in case the battery runs out.25— “Deep sleep.” Sleeps to disk and powers off RAM. Slowest wake, longest battery life.
Check yours:
pmset -g | grep hibernatemode
Set it:
sudo pmset -a hibernatemode 3
For desktops (Mac Studio, Mac mini, iMac), hibernate is irrelevant — they don’t use it. Leave it alone.
There’s an associated standbydelay value that controls how long the Mac can sleep before transitioning to hibernate:
sudo pmset -a standbydelay 86400
86400 seconds is 24 hours. So “stay in regular sleep for a day, then hibernate.” Useful if you hate the slow wake from hibernate but still want it as a fallback.
Power Nap and Wake-on-LAN
Power Nap lets your Mac do background work (Mail fetch, Time Machine backups, iCloud sync) while sleeping. It also burns battery.
sudo pmset -b powernap 0
sudo pmset -c powernap 1
That disables it on battery, enables on AC.
Wake-on-LAN (the womp setting):
sudo pmset -a womp 1
This tells your Mac to wake when it receives a magic packet. It only works over Ethernet on Apple Silicon Macs — Wi-Fi wake-on-LAN was deprecated.
Stop scheduled overnight work
If your Mac is downloading updates at 2am when you need silence:
sudo pmset -a darkwakes 0
darkwakes (sometimes shown as tcpkeepalive) controls whether your Mac quietly powers up its CPU and SSD while otherwise asleep, to handle pushed notifications and updates. Setting it to 0 stops that.
You’ll also want:
sudo softwareupdate --schedule off
That turns off the OS update auto-download schedule entirely. You can still install updates manually.
Lid-close behavior on a clamshell setup
By default, closing the MacBook’s lid sleeps the machine. With an external display, keyboard, and mouse, you usually want the opposite — clamshell mode. The setting is lidwake (controls wake on lid open) and disablesleep for the closed-lid behavior.
sudo pmset -c disablesleep 1
That stops AC-powered sleep entirely. Combined with an external display being attached, the MacBook stays awake with the lid closed.
For the inverse — making sure your MacBook does sleep when the lid closes even with a display attached:
sudo pmset -c disablesleep 0
Apple’s default. Set it back to 0 if you’d flipped it earlier.
Caffeinate: temporary keep-awake
caffeinate is technically a separate command, but it lives in the pmset family conceptually. To keep your Mac awake for an hour:
caffeinate -t 3600
Or for the duration of a specific command:
caffeinate -i ./long-running-script.sh
-i is “no idle sleep.” -d is “no display sleep.” -s is “no system sleep” (only works on AC). Drop the -t and it stays awake until you Ctrl+C.
I keep a shell function:
nosleep() { caffeinate -dim "$@"; }
Then nosleep make build for a long compile.
Schedule a wake or shutdown
pmset can schedule one-time or recurring wake/sleep/shutdown events:
sudo pmset repeat wake MTWRF 8:30:00
Wakes the Mac every weekday at 8:30 AM. Letters: M T W R F S U for Mon–Sun (R is Thursday, U is Sunday).
To check the schedule:
pmset -g sched
To clear:
sudo pmset repeat cancel
Note: this won’t wake a Mac that’s been fully shut down. It works during sleep only.
Diagnosing wake-from-sleep issues
When your Mac wakes up unexpectedly in your bag (the dreaded “warm laptop in the laptop sleeve”), check what woke it:
pmset -g log | grep -i "Wake from"
You’ll get lines like:
2026-04-12 03:14:22 -0700 Wake from Normal Sleep [CDNVA] : due to RTC/HID Activity ...
Common reasons:
EHC2— USB device. Something plugged into a hub, or an old peripheral with a flaky controller.HID Activity— keyboard or trackpad. If the lid was closed, blame Bluetooth.RTC— real-time-clock alarm, i.e. a scheduled task.OHC1— usually a Bluetooth device.
If it’s a Bluetooth peripheral keeping things awake, you can stop Bluetooth from being a wake source:
sudo pmset -a tcpkeepalive 0
For a more surgical look at what’s been preventing sleep:
pmset -g assertions
That lists every “assertion” currently held against sleep. You’ll often see Spotify or Zoom holding PreventUserIdleDisplaySleep while you’re not even using them.
Reset to defaults
If you’ve made a tangle of changes and want to start fresh:
sudo pmset -a hibernatemode 3
sudo pmset -a standbydelay 10800
sudo pmset -a sleep 1
sudo pmset -a displaysleep 10
sudo pmset -a powernap 0
sudo pmset -a disablesleep 0
These are roughly the factory defaults for a recent MacBook Pro. Your model may differ slightly.
A nuclear option, when nothing’s helping and your Mac sleeps weirdly:
sudo pmset -a restoredefaults
That command exists on some macOS versions and not others; if it’s not there, the manual list above does the same thing.
Apple Silicon vs Intel notes
On Apple Silicon Macs:
hibernatemode 25works but is pointless — these Macs sleep so cheaply there’s almost no benefit.- The
gpuswitchsetting (used on dual-GPU Intel MacBook Pros) doesn’t exist. There’s only one GPU. tcpkeepaliveand “Power Nap” merged into a single concept; you can think of them as the same thing.- Some
pmset -g everythingfields look different — that’s OS version, not architecture.
On Intel Macs running macOS 14+, all of the above still works. Older Macs (pre-2018) don’t get all the macOS 14 features but the pmset commands themselves are unchanged.
A practical preset for portables
For a MacBook that travels:
sudo pmset -b displaysleep 5
sudo pmset -b sleep 10
sudo pmset -b hibernatemode 3
sudo pmset -b powernap 0
sudo pmset -c displaysleep 15
sudo pmset -c sleep 0
sudo pmset -c powernap 1
sudo pmset -c womp 1
Aggressive sleep on battery, never sleep on AC, Power Nap and Wake-on-LAN allowed when plugged in. That’s the configuration that gets the best battery while still being responsive on a desk.
The biggest win from learning pmset isn’t any single setting — it’s understanding what your Mac actually does at night, and being able to fix it when it does the wrong thing.