27

Possible Duplicate:
How can I suspend/hibernate from command line?

I have an Acre Aspire One and this netbook does not have a sleep function on the key board and with the removal of the hibernate option I have been required to resort to shutting my comp down every time. So I know that under 'system settings'>'keyboard'>'shortcuts' I can create a custom key combo but I do not know that the command is of the sleep setting. So, please help.

Thank you

0

2 Answers 2

35

All of the following commands require root permissions. The most common way to do this is prefix the command with sudo.

The command for Suspend (Sleep) is pm-suspend (sudo pm-suspend etc.)

The command for Hibernate is pm-hibernate (Note that Hibernation mode is not compatible with all hardware, please test this before using it.)

The command for the hibrid of them both is pm-suspend-hybrid

The hybrid command saves the session to the Hard Disk (safer storage place), but the system will stay running, allowing for faster resume. This does not mean you can turn off your computer and have your session saved. You will need to use the regular hibernate command for that.

These commands are provided by the package pm-utils, installed by default in Ubuntu 12.04LTS

Source: http://manpages.ubuntu.com/manpages/precise/man8/pm-action.8.html


If you have problems with those commands, please see the source. It states that

On some hardware putting the video card in the suspend state and recovering from it needs some special quirk handling. With the --quirk-* options of the pm-suspend and pm-suspend-hybrid commands you can select which quirks should be used.

A list of these quirks, and what they mean can be found here

1
  • 2
    But pm-hibernate not working in all computers. Don't miss to test it. Close all files and programs, write in terminal sudo pm-hibernate and wait. If computer will hibernate successfully you can use it anytime you want. If not, forget it :) Aug 28, 2012 at 14:53
2

As an FYI, you can get the hibernation option back in the system menu by making the following changes (you should test the hibernate function from a terminal before doing this to ensure that it works properly):

 gksu gedit /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla

The previous command will open a new text file. Copy and paste the following into this new file:

[Enable Hibernate]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes

Save and close the file.

Log out and log back in, and Hibernate should appear as an option in the system menu.

Not the answer you're looking for? Browse other questions tagged .