Howto enable hibernate on a Linux Manjaro

I run into some issues with my current Debian systems. In fact, I use Debian on a lot of computers, but most of the time the sessions are consistent, some have nautilus working some don’t .. same for automount, grub-updater, and so on.

I decided to switch my desktop computer to another distro. After about 5 years with the same Debian Sid install, I switched to Manjaro. Manjaro use the same base system as Arch Linux but seems to be more user friendly.

Anyway, the hibernate don’t work out-of-the-box. When you restart the computer, it doesn’t restore the hibernate image from the swap. You can fix that quickly. Edit /etc/mkinitcpio.conf file and add “resume” to the HOOK flag like this.

HOOKS="base udev autodetect modconf block resume filesystems keyboard fsck"

After that, you must rebuild the initcpio file :

 sudo mkinitcpio -p linux39

That’s enough, you can now test with a simple pm-hibernate.

/Enjoy Linux again.



Related Posts

5 thoughts on “Howto enable hibernate on a Linux Manjaro

  1. useful information

    great job.

    sudo mkinitcpio -p “addcurrentkernelversionalongwithlinuxhere”

  2. Thanks for the help. However, it is not complete as it is necessary to update grub accordingly and provide a resume partition.

    That means, edit the appropriate line in: /etc/default/grub
    GRUB_CMDLINE_LINUX=”resume=/dev/sdaOFYOURSWAPPARTITION”
    or
    GRUB_CMDLINE_LINUX=”resume=UUID=OFYOURSWAPPARTITION”

    Afterwards, don’t forget to update grub and run:
    grub-mkconfig -o /boot/grub/grub.cfg

  3. The HOOKS above are probably correctly set in Manjaro as of 2014, even when encrypting the root partition. However, the following GRUB2 config changes may be required, where the UUID corresponds to a sufficiently large swap partition.

    /etc/default/grub

    #GRUB_CMDLINE_LINUX_DEFAULT=”quiet”
    GRUB_CMDLINE_LINUX_DEFAULT=”resume=/dev/disk/by-uuid/12345678-c123-1234-1ed2-f123a12e1234″

    To find your swap partition UUID, the following commands should be helpful:
    $ swapon -s
    $ free -m
    $ ls -l /dev/disk/by-uuid/ | grep sda

    Reference links:

    https://wiki.archlinux.org/index.php/Suspend_and_Hibernate

    https://wiki.archlinux.org/index.php/Power_management#Power_management_with_systemd

  4. I should add that to make the GRUB2 configuration file, one must run: # grub-mkconfig -o /boot/grub/grub.cfg

    To test hibernation (with systemd) via the cli: $ systemctl hibernate

    If the root partition is encrypted but the swap is not, I suspect hibernating (even once) compromises the entire encrypted disk as the keys will have been written to swap disk in plaintext, no?

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>