0

I'm using ubuntu 16 LTS , I have activated hibernation, it works just one time but when I shutdown my computer and open it again , hibernation does not work anymore.

I have created this file:

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

and added this lines inside:

[Réactive hiberner par défaut dans upower]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes

[Réactive hiberner par défaut dans logind]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate;org.freedesktop.login1.handle-
hibernate-key;org.freedesktop.login1;org.freedesktop.login1.hibernate-
multiple-sessions;org.freedesktop.login1.hibernate-ignore-inhibit
ResultActive=yes
2

The first thing that comes to mind for me is, do you have a large enough swap partition to handle hibernation on your computer?

For hibernation to work properly, you need your swap partition to be as big, or bigger, than the amount of RAM on your system.

From The Official Ubuntu Swap FAQ you get:

Hibernation (suspend-to-disk) The hibernation feature (suspend-to-disk) writes out the contents of RAM to the swap partition before turning off the machine. Therefore, your swap partition should be at least as big as your RAM size. The hibernation implementation currently used in Ubuntu, swsusp, needs a swap or suspend partition. It cannot use a swap file on an active file system.

If you look farther down The Official Ubuntu Swap FAQ, there is a table that actually recommends a swap partition slightly larger than your system's RAM size.

Here's that table of examples:

Example Scenarios

(last 3 columns denote swap space)

        RAM(MB) No hibernation  With Hibernation  Maximum
         256     256              512               512
         512     512             1024              1024
        1024    1024             2048              2048

        RAM(GB) No hibernation  With Hibernation  Maximum
          1      1                2                   2
          2      1                3                   4
          3      2                5                   6
          4      2                6                   8
          5      2                7                  10
          6      2                8                  12
          8      3               11                  16
         12      3               15                  24
         16      4               20                  32
         24      5               29                  48
         32      6               38                  64
         64      8               72                 128
        128     11              139                 256

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.