Arch Linux · September 27, 2014 6

Arch Linux sleep, hibernate, resume, reboot solution

Hibernation:
In order to use hibernation, you need to create swap partition or swap file. See Swap for details.

I have my swap drive as /dev/sda9, open your grub configuration file and add “resume=/dev/sda9” in your GRUB_CMDLINE_LINUX_DEFAULT like follow.


/etc/default/grub
_________________


GRUB_CMDLINE_LINUX_DEFAULT="resume=/dev/sda9"

Recreate initial ramdisk:

Edit your /etc/mkinitcpio.conf file and add resume option in hooks


/etc/mkinitcpio.conf
____________________
# resume must be placed after block and lvm2, but before filesystems
HOOKS="... block lvm2 resume filesystems ..."

Finally, you must rebuild the initrd image for these changes to take effect


# mkinitcpio -p linux

Note:
Don’t forget to run grub-mkconfig -o /boot/grub/grub.cfg afterwards.

If your system reboots after resuming from sleep please make sure you have following settings in your


/etc/default/grub
_________________


GRUB_CMDLINE_LINUX_DEFAULT="resume=/dev/sda9"
GRUB_CMDLINE_LINUX="acpi_sleep=nonvs"

Don’t forget to run grub-mkconfig -o /boot/grub/grub.cfg afterwards.