How do I hibernate my computer?

When the computer hibernates, all of your applications and documents are stored and the computer completely switches off so it does not use any power, but the applications and documents will still be open when you switch on the computer again.

Unfortunately, hibernate doesn't work in many cases, which can cause you to lose data if you expect your documents and applications to re-open when you switch your computer back on. Therefore, hibernate is disabled by default.

Test if hibernate works

Always save your work before hibernating

You should save all of your work before hibernating the computer, just in case something goes wrong and your open applications and documents cannot be recovered when you switch on the computer again.

You can use the command line to test if hibernate works on your computer.

  1. Open the Terminal by searching for terminal in the Activities overview.

  2. Type sudo systemctl hibernate into the terminal and press Enter.

    Enter your password when prompted.

  3. After you computer turns off, switch it back on. Did your open applications re-open?

If hibernate doesn't work:

  1. Check if your swap partition is at least as large as your available RAM.

  2. The presence of btrfs partitions has proved to make hibernation fail, so check that you're not using any btrfs partitions. Besides removing or reformatting such partitions, you may need to remove the btrfs-tools package:

    sudo apt purge btrfs-tools

Enable hibernate

If the hibernate test works, you can continue to use the sudo systemctl hibernate command when you want to hibernate.

You can also enable the hibernate option in the menus. To do that, use your favorite text editor to create /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla. Add the following to the file and save:

[Re-enable hibernate by default in upower]

[Re-enable hibernate by default in logind]