---
title: pmset hibernatemode 3 vs 25: what is the difference?
description: 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.
date: 2026-11-18
kicker: pmset
section: The closed lid, explained
related: pmset-disablesleep, prevent-macbook-sleep-lid-closed, macbook-lid-closed-heat-and-battery
---

> **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](https://github.com/apple-oss-distributions/PowerManagement/blob/dc081c6cca8184bd1f49987ac70a800f2b19b0de/pmset/pmset.m#L299)).

| Value | Memory while asleep | Image on disk | Wake | Default on |
| --- | --- | --- | --- | --- |
| `0` | Powered | Never on Apple silicon | From memory | Desktop Macs |
| `3` | Powered | Only in a low-battery sleep | From memory; from the image after a low-battery sleep | Mac laptops |
| `25` | Powered off | At every sleep | From the image, slower | Nothing; 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](https://github.com/apple-oss-distributions/xnu/blob/ac9718fb1af618d5ce8678d0dc6e8a58f252216f/iokit/IOKit/IOHibernatePrivate.h#L740)). 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](https://github.com/apple-oss-distributions/PowerManagement/blob/dc081c6cca8184bd1f49987ac70a800f2b19b0de/pmset/pmset.1)). 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](https://github.com/apple-oss-distributions/xnu/blob/ac9718fb1af618d5ce8678d0dc6e8a58f252216f/iokit/Kernel/IOPMrootDomain.cpp#L594)). 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](https://github.com/apple-oss-distributions/xnu/blob/ac9718fb1af618d5ce8678d0dc6e8a58f252216f/iokit/Kernel/IOHibernateIO.cpp#L2382)). 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](https://github.com/apple-oss-distributions/PowerManagement/blob/dc081c6cca8184bd1f49987ac70a800f2b19b0de/pmset/pmset.1)). Without the sleep flag, the [same policy line](https://github.com/apple-oss-distributions/xnu/blob/ac9718fb1af618d5ce8678d0dc6e8a58f252216f/iokit/Kernel/IOPMrootDomain.cpp#L594) 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](https://github.com/apple-oss-distributions/PowerManagement/blob/dc081c6cca8184bd1f49987ac70a800f2b19b0de/pmset/pmset.1)). 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](https://github.com/apple-oss-distributions/IOKitUser/blob/323ead896d04424f87184d8f6ff0cce811aab106/pwr_mgt.subproj/IOPMEnergyPrefs.c#L1911)). The image file defaults to `/var/vm/sleepimage` ([IOPMEnergyPrefs.c](https://github.com/apple-oss-distributions/IOKitUser/blob/323ead896d04424f87184d8f6ff0cce811aab106/pwr_mgt.subproj/IOPMEnergyPrefs.c#L117)), and `hibernatefile` moves it, though the "Image may only be located on the root volume" ([man pmset](https://github.com/apple-oss-distributions/PowerManagement/blob/dc081c6cca8184bd1f49987ac70a800f2b19b0de/pmset/pmset.1)).

## 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](https://developer.apple.com/library/archive/qa/qa1340/_index.html)). 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](/blog/pmset-disablesleep). To run a closed MacBook for a set time without touching `pmset`, [download Keep Mac Awake](/download) (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.

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

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

```text
 hibernatefile        /var/vm/sleepimage
 hibernatemode        3
```

To read every other line of `pmset -g`, paste it into the [Mac sleep settings explainer](/tools/pmset-explained), 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.

```sh
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](https://github.com/apple-oss-distributions/PowerManagement/blob/dc081c6cca8184bd1f49987ac70a800f2b19b0de/pmset/pmset.1)). 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](https://github.com/apple-oss-distributions/xnu/blob/ac9718fb1af618d5ce8678d0dc6e8a58f252216f/iokit/Kernel/IOHibernateIO.cpp#L2386)). 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](https://github.com/apple-oss-distributions/xnu/blob/ac9718fb1af618d5ce8678d0dc6e8a58f252216f/iokit/Kernel/IOPMrootDomain.cpp#L5566)), 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](https://github.com/apple-oss-distributions/PowerManagement/blob/dc081c6cca8184bd1f49987ac70a800f2b19b0de/pmconfigd/PMSettings.m#L710)), and at a critically low battery the kernel asks for a shutdown instead of hibernating ([IOPMrootDomain.cpp](https://github.com/apple-oss-distributions/xnu/blob/ac9718fb1af618d5ce8678d0dc6e8a58f252216f/iokit/Kernel/IOPMrootDomain.cpp#L8868)).
- **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](/blog/prevent-macbook-sleep-lid-closed) and, for battery, [keeping a closed MacBook awake on battery](/blog/prevent-macbook-sleep-lid-closed#how-do-you-keep-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](https://github.com/apple-oss-distributions/PowerManagement/blob/dc081c6cca8184bd1f49987ac70a800f2b19b0de/pmconfigd/PMSettings.m#L638), 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

- [man pmset](https://github.com/apple-oss-distributions/PowerManagement/blob/dc081c6cca8184bd1f49987ac70a800f2b19b0de/pmset/pmset.1), [pmset.m](https://github.com/apple-oss-distributions/PowerManagement/blob/dc081c6cca8184bd1f49987ac70a800f2b19b0de/pmset/pmset.m) and [PMSettings.m](https://github.com/apple-oss-distributions/PowerManagement/blob/dc081c6cca8184bd1f49987ac70a800f2b19b0de/pmconfigd/PMSettings.m) (Apple open source, PowerManagement-1846.120.8.0.1)
- [Apple open source: IOPMrootDomain.cpp](https://github.com/apple-oss-distributions/xnu/blob/ac9718fb1af618d5ce8678d0dc6e8a58f252216f/iokit/Kernel/IOPMrootDomain.cpp), [IOHibernateIO.cpp](https://github.com/apple-oss-distributions/xnu/blob/ac9718fb1af618d5ce8678d0dc6e8a58f252216f/iokit/Kernel/IOHibernateIO.cpp) and [IOHibernatePrivate.h](https://github.com/apple-oss-distributions/xnu/blob/ac9718fb1af618d5ce8678d0dc6e8a58f252216f/iokit/IOKit/IOHibernatePrivate.h) (xnu-12377.121.6)
- [Apple open source: IOPMEnergyPrefs.c](https://github.com/apple-oss-distributions/IOKitUser/blob/323ead896d04424f87184d8f6ff0cce811aab106/pwr_mgt.subproj/IOPMEnergyPrefs.c) (IOKitUser)
- [Apple Technical Q&A QA1340](https://developer.apple.com/library/archive/qa/qa1340/_index.html)
- [Keep Mac Awake: command line](https://keepmacawake.com/command-line.md)
