<page xmlns="http://projectmallard.org/1.0/"
      xmlns:its="http://www.w3.org/2005/11/its"
      xmlns:if="http://projectmallard.org/if/1.0/"
      type="topic" style="question"
      id="power-hibernate">

  <info>
    <link type="guide" xref="power"/>

    <desc>Hibernate is disabled by default since it's not well supported.</desc>
    <revision pkgversion="3.6.0" date="2012-08-14" status="review"/>

    <credit type="author">
      <name>GNOME Documentation Project</name>
      <email>gnome-doc-list@gnome.org</email>
    </credit>
    <credit type="author">
      <name>Ekaterina Gerasimova</name>
      <email>kittykat3756@gmail.com</email>
    </credit>
    <credit type="author">
      <name>Jeremy Bicha</name>
      <email>jbicha@ubuntu.com</email>
    </credit>

    <include href="legal.xml" xmlns="http://www.w3.org/2001/XInclude"/>
  </info>

<title>How do I hibernate my computer?</title>

<p>When the computer <em>hibernates</em>, 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.</p>

<p>Unfortunately, hibernate <link xref="power-suspendfail">doesn't work</link>
 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.</p>

<section id="test-hibernate">
<title>Test if hibernate works</title>

<note style="important">
  <title>Always save your work before hibernating</title>
  <p>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.</p>
</note>

<p>You can use the command line to test if hibernate works on your computer.</p>

<steps>
  <item>
    <if:choose>
      <if:when test="platform:unity">
        <p>Open the <app>Terminal</app> by pressing <keyseq><key>Ctrl</key>
        <key>Alt</key><key>t</key></keyseq> or by searching for <input>terminal</input>
        in the <gui>dash</gui>.</p>
     </if:when>
     <p>Open the <app>Terminal</app> by searching for <input>terminal</input>
     in the <gui>Activities overview</gui>.</p>
  </if:choose>
  </item>
  <item>
    <p>As root, type <cmd>pm-hibernate</cmd> into the terminal and press <key>Enter</key>.</p>
    <p>Enter your password when prompted.</p>
  </item>
  <item>
    <p>After you computer turns off, switch it back on. Did your open applications
       re-open?</p>
    <p>If hibernate doesn't work, check if your swap partition is at least as large as your
       available RAM.</p>
  </item>
</steps>

</section>

<section id="enable-hibernate">
<title>Enable hibernate</title>

  <p>If the hibernate test works, you can continue to use the <cmd>pm-hibernate</cmd>
  command when you want to hibernate.</p>

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

<code its:translate="no">
[Re-enable hibernate by default]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes
</code>

</section>

</page>