How to enable hybrid sleep

Among the possibilities of suspend e hibernateThere is an intermediate one, which consists of first suspending, and if after a while you did nothing, hibernate. In the first instance, save all your processes in RAM (suspend), and if after the configured time you have not restarted the computer, they are written to disk (hibernate) and the machine shuts down completely.


The first thing to do is check that our system supports this option:

sudo pm-is-supported --suspend-hybrid && echo $?

This command allows us to know what energy saving functions we can activate in our system. Therefore, if we run that package with the –suspend-hybrid option, the package will check for hybrid suspend support. To show the result, we use echo $ ?, which shows us the result of the previous command. Between both commands we put && so that it is executed one after the other. If you get 0 when executing this command, your computer has support for this function.

How to enable hybrid sleep

Now we will create the file 00-use-suspend-hybrid in the /etc/pm/config.d directory, therefore:

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

Inside this file, we introduce the following:

# Hybrid suspension
if ["$ METHOD" = "suspend"]; then
PM_HIBERNATE_DELAY = 3600
METHOD = suspend_hybrid
fi

We must substitute 3600 for the seconds we want the system to wait to go from sleep to hibernation if we don't touch anything. In my case, I chose an hour (3600 seconds). If you don't want to have this option, the system will hibernate after 15 minutes, but we must remove that line from there, leaving only this:

# Hybrid suspension
if ["$ METHOD" = "suspend"]; then
METHOD = suspend_hybrid
fi

Source: Daniel hahler & ubunteate


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Miguel Angel said

    A question when returning from a suspend or a hibernation why does not reconnect the network-manager?

    Do you know if something has to be done?

  2.   Let's use Linux said

    Not that I know. It must be a bug.

  3.   Antonio Aguillon said

    the same happens to me!

  4.   Isai Moso said

    I liked it well, congratulations

  5.   slopht said

    When I suspend and then hibernate I turn on my laptop and it does not save any window ... it is as if after suspending after 15 min the laptop turns off, the OS is only 64 bits ... if someone has the same problem, please confirm it.

  6.   Annex said

    You just saved my life !!! since many times I close the laptop. And I leave it suspended and the battery is used up: S

  7.   Let's use Linux said

    The important thing in this type of BADSIG errors is the number that is a corn. In your case they are these 3:

    For Ubuntu extras: 16126D3A3E5C1192
    For Florian DieschW PPA: 5AF549300FEB6DD9
    For TualatriXW PPA: 6AF0E1940624A220

    The easiest way to correct those 3 errors is by opening a terminal and entering the following command:

    sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com MINUMEROCHOCLO
    Replacing MINUMEROCHOCLO with one of those 3 numbers that I mentioned above. Obviously, you will have to repeat this operation 3 times, once for each number.

    When you execute these commands, it will ask you for the password to execute commands with administrator privileges.

    In case this does not work in some of the cases, it means that the repository is bad. To remove the repository, you can open the Software Origins application from the Ubuntu Dash (I think it's still done like this ... I haven't used Ubuntu for a long time).

    I hope I have been of some help.

    Cheers! Paul.

  8.   gerardo said

    I have had problems with ubuntu 12.04 when I update I get this:
    W: An error occurred during signature verification. The repository is not up to date and the old index files will be used. The GPG error is: http://extras.ubuntu.com precise Release: The following firms were invalid: BADSIG 16126D3A3E5C1192 Ubuntu Extras Archive Automatic Signing Key
    W: GPG error: http://ppa.launchpad.net precise Release: The following firms were invalid: BADSIG 5AF549300FEB6DD9 Launchpad PPA for Florian DieschW: GPG error: http://ppa.launchpad.net precise Release: The following firms were invalid: BADSIG 6AF0E1940624A220 Launchpad PPA for TualatriXW: Unable to obtain http://extras.ubuntu.com/ubuntu/dists/precise/Release
    Does anyone know what can I do

  9.   gerardo said

    Congratulations for the effort in this project to disseminate knowledge for everyone, especially for those of us who are newbies !!!
    All the best

  10.   Shupacabra said

    The solution from the console for when the WIFI does not return is

    sudo killall NetworkManager

  11.   moro: sudo said

    Hello, good article.

    As I had read and not cited, the hybrid suspension suspends and saves in non-volatile memory in case the accumulator charges are drained. A little slower than suspension. The idea of ​​pure sleep is that the power off and on time is very fast because the minimum energy required to keep the information in volatile memory is maintained.

    I tried the method you propose in the utopian unicorn and what it does is that when I suspend from unity it does not do the pure suspension but the hybrid. At the end of the proposed time, it does not hibernate, but when it runs out of energy.

    Greetings from Caracas and thank you. It is always good to know where the document paths are and how to edit them.

    1.    moro: sudo said

      what I wanted to say, and what I never said, is that with this solution we can change all the occurrences to suspend from the graphic manager to a suspension that has no problems when running out of power because everything is saved in non-volatile memory.

  12.   KellerNET said

    Hi, I have Debian 7 x64 on a computer without X Server and I want it to be suspended, be careful, just suspend so that it is automatically reactivated when making a network request since it is a file server.
    Hybrid Sleep shuts down the network card and the system can no longer be lifted.
    By default the hybrid suspension is enabled and I can't find where to change this.
    Thanks for the help. Regards.