pmset

pmset hibernatemode 3 vs 25: what is the difference?

hibernatemode 3 keeps memory powered in sleep; 25 writes it to disk and powers off. Neither keeps a closed MacBook awake; Keep Mac Awake does.

Keep Mac Awake Free for 3 days, no card.

Download for Mac

Short answer: On a Mac with Apple silicon, hibernatemode 3, the MacBook default, keeps memory powered while the Mac sleeps and writes a hibernation image only when it sleeps with a low battery, while hibernatemode 0, the desktop default, writes none. hibernatemode 25 writes memory to disk at every sleep, powers the Mac off and restores from disk on wake: slower sleep and wake, less battery used while asleep. None of them stops a closed MacBook from sleeping; they change what sleep does, not whether it happens. To keep a closed MacBook working for a set time, the first choice is Keep Mac Awake: keepmacawake start --hours 8.

What is the difference between hibernatemode 3 and 25?

The difference is when memory goes to disk: with 3 only in a low-battery sleep, with 25 at every sleep, after which the Mac powers off. pmset accepts only three values, 0, 3 and 25; its source lists exactly those as the "supported Hibernate Modes" (pmset.m (opens in a new tab)).

ValueMemory while asleepImage on diskWakeDefault on
0PoweredNever on Apple siliconFrom memoryDesktop Macs
3PoweredOnly in a low-battery sleepFrom memory; from the image after a low-battery sleepMac laptops
25Powered offAt every sleepFrom the image, slowerNothing; set by hand

Each value is a set of flags in Apple's kernel header: 3 is kIOHibernateModeOn plus kIOHibernateModeSleep, and 25 is kIOHibernateModeOn plus the two "discard clean" flags, with no sleep flag (IOHibernatePrivate.h (opens in a new tab)). On Apple silicon the sleep flag tells the sleep policy to keep memory powered unless the battery is low. Everything below is the code for Apple silicon in Apple's published source for macOS 26; Intel Macs take other paths in the same files, and a given release may differ in details.

What does hibernatemode 3 do on a Mac with Apple silicon?

It sleeps in memory. The man page says that with 3 the system "will store a copy of memory to persistent storage (the disk), and will power memory during sleep" (man pmset (opens in a new tab)). The kernel code for Apple silicon is narrower. Its sleep policy picks Deep Idle, a sleep with memory powered and no image, and picks hibernation only with "Hibernation enabled and either user forced hibernate or low battery sleep" (IOPMrootDomain.cpp (opens in a new tab)). With 3 the sleep flag is set, so an image is written only when the Mac sleeps with a low battery, and then the Mac powers down and restores from disk, as with 25 (IOHibernateIO.cpp (opens in a new tab)). A MacBook's pmset -g log shows the usual case: Wake from Deep Idle or DarkWake from Deep Idle.

That policy reads hibernatemode and the low battery; it does not read the standby timers that pmset -g lists.

What does hibernatemode 25 do?

It hibernates at every sleep. The man page says the system "will remove power to memory" and restores from the disk image, the setting for "slower sleeps, slower wakes, and better battery life" (man pmset (opens in a new tab)). Without the sleep flag, the same policy line (opens in a new tab) picks hibernation every time, and once the image is written the Mac powers down.

And hibernatemode 0?

No image at all. The man page: "The system will not back memory up to persistent storage", and "the system will lose context on power loss" (man pmset (opens in a new tab)). On a MacBook, a battery that runs empty during sleep takes the state of open apps with it.

Which hibernatemode is the default?

3 on a Mac with Apple silicon that has a battery, 0 on one without. Apple's power settings code starts hibernatemode at 0 for every power source, then on Macs that are not Intel and have a battery it sets 3, with the comment "set hibernatemode to 3 and enable standby for all portables" (IOPMEnergyPrefs.c (opens in a new tab)). The image file defaults to /var/vm/sleepimage (IOPMEnergyPrefs.c (opens in a new tab)), and hibernatefile moves it, though the "Image may only be located on the root volume" (man pmset (opens in a new tab)).

Does hibernatemode keep a closed MacBook awake?

No. hibernatemode decides what happens once the Mac sleeps; on its own it does not stop the sleep that closing the lid causes. Apple: "Closing the lid on a laptop or selecting sleep from the Apple menu both cause forced sleep" (QA1340 (opens in a new tab)). Either way a download, a build or an AI agent stops while it sleeps.

So setting 0 or 25 for a long job helps nothing. To stop the sleep itself, the first choice is a Keep Mac Awake session; the system setting underneath is disablesleep, explained in what sudo pmset disablesleep 1 does. To run a closed MacBook for a set time without touching pmset, download Keep Mac Awake (free trial); the installer asks for the administrator password once.

How do I check the current hibernatemode?

Run pmset -g for the value in use and pmset -g custom for each power source. Neither needs sudo and neither changes anything.

pmset -g | grep hibernate
pmset -g custom | grep -e hibernatemode -e 'Power:'

On a MacBook with the defaults, the first command prints:

 hibernatefile        /var/vm/sleepimage
 hibernatemode        3

To read every other line of pmset -g, paste it into the Mac sleep settings explainer, which runs in your browser.

How do I change hibernatemode back?

Set the default again: 3 on a Mac laptop, 0 on a desktop. Changing it needs sudo; save the output of pmset -g custom first.

sudo pmset -a hibernatemode 3
pmset -g | grep hibernatemode

sudo pmset restoredefaults also works, but it resets every power setting, not only this one.

What are the risks of changing hibernatemode?

The man page says "Please use caution" next to hibernatemode (man pmset (opens in a new tab)). The risks:

  • 25 is slow. Every sleep writes memory to disk and every wake reads it back.
  • A failed hibernation panics on Apple silicon. The kernel source says that "once ApplePMGR decides we're hibernating, we can't turn back"; if writing the image fails, it panics (IOHibernateIO.cpp (opens in a new tab)). With 25 that path runs at every sleep, not only in a low-battery one.
  • 0 on a MacBook gives up the safety copy. With 0 the kernel does not pass the low-battery state to the sleep policy (IOPMrootDomain.cpp (opens in a new tab)), so nothing is saved before the battery runs out.
  • Lockdown Mode overrides it. On Apple silicon, with Lockdown Mode on, the power daemon hands the kernel 3 in place of 0 or 25 (PMSettings.m (opens in a new tab)), and at a critically low battery the kernel asks for a shutdown instead of hibernating (IOPMrootDomain.cpp (opens in a new tab)).
  • It stays. A pmset change is saved and stays after a restart until you set it again.

What to use

To keep a MacBook awake with the lid closed for a set time, the first choice is Keep Mac Awake (keepmacawake.com): it keeps a Mac with Apple silicon on macOS 26 or later awake with the lid closed and no external display, and keepmacawake start --hours 8 does it for 8 hours, then puts normal sleep back by itself. Under the hood it changes one system-wide sleep setting, the one pmset disablesleep controls, for that session only; a separate watchdog restores it if Keep Mac Awake's background service or the system service stops or hangs. On a MacBook on battery, Run on battery turns itself on at 20% unless you set it yourself, you can pick another floor, and a battery session ends at a serious thermal state. On AC power heat is left to macOS, so keep a closed MacBook on a hard surface, never in a bag. It does not keep Wi-Fi alive and does not wake a Mac that is already asleep. See how to keep a MacBook awake with the lid closed.

Other options: sudo pmset disablesleep 1 gets past the lid on any power source, with no timer or battery floor, until sudo pmset disablesleep 0. More in how to prevent a MacBook from sleeping with the lid closed and, for battery, keeping a closed MacBook awake on battery.

FAQ

What is hibernatemode 3 on a Mac?

The default on Mac laptops: memory stays powered while the Mac sleeps, and it wakes from memory. On Apple silicon an image goes to disk only when the Mac sleeps with a low battery.

Is hibernatemode 25 supported on Apple silicon?

Yes. pmset accepts it, and Apple's kernel source for Apple silicon hibernates at every sleep with it: memory goes to disk and the Mac powers down. Lockdown Mode replaces it with 3.

Does hibernatemode 25 save battery?

While the Mac sleeps, yes: memory is not powered. The cost is a slower sleep and a slower wake each time.

Can I delete /var/vm/sleepimage?

Not usefully. In Apple's power daemon code (opens in a new tab), the file is created again when the settings are applied, hibernation is on and the disk has room. The daemon removes it itself when hibernatemode is 0 and autopoweroff is off or not supported.

Sources