How To Use Hybrid Suspend In Ubuntu

Firstly, here’s what hybrid suspend does:
initially, the computer is suspended to RAM, which is quick to suspend / resume but it also uses some powerif the computer doesn’t wake up after a configurable amount of time, suspend to disk is used so the computer stops using any power (it’s the same as if it was powered off) – this is also known as hibernation
Basically, using the hybrid suspend method from this article, the system initially enters suspend which is quick to resume and after the time you set, the system hibernates so it no longer uses any battery power. This is useful if for example you close the lid when you move from one room to another (between meetings, classrooms, etc.) and you need the system to resume quickly, but you also want to preserve battery power if you don’t use it.
There is another “true” hybrid suspend method (available in Linux kernel 3.6 – Ubuntu 12.10 uses Linux kernel 3.5, so it’s not in Ubuntu by default yet) in which the system suspends to both the RAM and hard disk in the same time, which is useful to get both a quick resume / suspend and be able to resume the computer in case of power loss or if the system runs out of battery, but the “true” hybrid suspend uses battery power so I prefer the hybrid suspend method in this post.

Set up hybrid suspend in Ubuntu
suspend ubuntu
Before proceeding, please note that I’ve tested this in Ubuntu 12.10 and it’s known to work in Ubuntu 12.04 as well, but I don’t know if it works in older Ubuntu versions.

Firstly, check if your system supports hybrid suspend by running the following command in a terminal:sudo pm-is-supported –suspend-hybrid && echo “hybrid suspend is supported” || echo “your system doesn’t support hybrid suspend”

To enable hybrid suspend in Ubuntu, create a file called “/etc/pm/config.d/00-use-suspend-hybrid” – you can do it using the following command:
sudoedit /etc/pm/config.d/00-use-suspend-hybrid
The above command uses the default (usually “nano”) command line editor, but you can use a graphical text editor like Gedit if you want (e.g.: “gksu gedit /etc/pm/config.d/00-use-suspend-hybrid”).

And paste the following in the newly opened file (use “Ctrl + Shift + V” to paste in a terminal):# Always use suspend_hybrid instead of suspend
if [ “$METHOD” = “suspend” ]; then
PM_HIBERNATE_DELAY=900 # time in seconds until hibernate (suspend to disk) occurs; 900 means 15 minutes
Then, adjust the “PM_HIBERNATE_DELAY” value to whatever you want (this is the time in seconds until hibernate – suspend to disk – occurs), save the file (to save the file in Nano command line text editor and then exit, use: Ctrl + O, Enter, Ctrl + X) and your system should now use hybrid suspend instead of the regular suspend method.
info via AskUbuntu and

Originally published at WebUpd8: Daily Ubuntu / Linux news and application reviews.

Tags: , , , ,
Copyright 2017. All rights reserved.

Posted November 16, 2012 by Andrew in category "Ubuntu