How to Enable Hybrid Suspend in Ubuntu [Quick Tips]

Spread the love

In Ubuntu, there is a “suspend” button where you can click to put your desktop/laptop to sleep and quickly recover from it later. While “suspending”, the computer will save the existing state to the RAM so it can be quickly restored without having to go through the hard disk. However, this also means that you can’t power off your machine since all the data in the RAM will disappear once the power is cut. A better way to deal with this is through “hybrid suspend” where it will first suspend the computer (saving the existing state to the RAM) and after a while if it is not restored, the saved data will get transferred to the hard disk (or the swap) and the computer go into hibernation. In the hibernation mode, the restoration will take a slightly longer time to restore (but still faster than a cold boot), but no power will be used in the process.

Here is how you can enable the Hybrid Suspend mode in Ubuntu:

1. Open a terminal and type:

sudo pm-is-supported --suspend-hybrid && echo "hybrid suspend is supported" || echo "your system doesn't support hybrid suspend"

This will check if your system support hybrid suspend. If you see the message “hybrid suspend is supported”, then you can proceed with the steps below. (Typically, if your system support hibernation, it should be able to support hybrid suspend).

2. Still in the terminal, enter the following command:

sudo nano /etc/pm/config.d/00-use-suspend-hybrid

and paste the following code into the blank area. (Paste using the “Shift + Ctrl + v” keyboard shortcut)

# Always use suspend_hybrid instead of suspend
if [ "$METHOD" = "suspend" ]; then
METHOD=suspend_hybrid
fi
PM_HIBERNATE_DELAY=900  # time in seconds until hibernate (suspend to disk) occurs;

3. Lastly, save (using “Ctrl + o”) and exit (using “Ctrl + x”) the text editor.

That’s it.

via Webupd8 and AskUbuntu

Image credit: Wooden Doll by Big Stock Photo.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Sign up for all newsletters.
By signing up, you agree to our Privacy Policy and European users agree to the data transfer policy. We will not share your data and you can unsubscribe at any time. Subscribe


Damien Oh

Damien Oh started writing tech articles since 2007 and has over 10 years of experience in the tech industry. He is proficient in Windows, Linux, Mac, Android and iOS, and worked as a part time WordPress Developer. He is currently the owner and Editor-in-Chief of Make Tech Easier.

Comments (3)