Moving to GRUB2 my Arch Linux no longer resumes from hibernation, because the actual resuming is no longer set up. In GRUB legacy I'd write:


kernel /vmlinuz26 root=/dev/disk/by-uuid/X ro resume=/dev/disk/by-uuid/Y ro

But with GRUB2's new way of handling the boot menu, I no longer know how, where and in which form to add this. My guess is you'd add the entire menuentry to /etc/grub.d/40_custom/ and somehow set up the resuming there? Manually hardcoding menuentries into GRUB2 seems to go against its flexible menu generation approach, but whatever reenables me to use hibernate is gladly welcomed.


1 Answer 1


Open up /etc/default/grub with root privledges and add GRUB_CMDLINE_LINUX="resume=/dev/sdXY" Where XY is the swap partition location, which can be found by sudo fdisk -l. It looks like you are using UUID instead and that's fine. /etc/default/grub only affects the current operating system so don't worry about every linux OS using grub to start using that swap. After finishing your edits, run sudo grub-mkconfig -o /boot/grub/grub.cfg (substitute grub.cfg with whatever file grub reads at boot, e.g. it may be named /boot/grub/grub.efi) to update your grub startup information with what you changed in /etc/default/grub

(I don't think this needs to be done on Ubuntu)
Note that one may need to add a resume hook to make sure the kernel knows that it should resume if Archlinux or perhaps another OS is being used. To do this, if one is using mkinitcpio, go to /etc/mkinitcpio.conf and insert resume in the HOOKS array before filesystems but after ide, scsi, and sata. Then, you you need to rebuild the initial ramdisk(early OS state for loading modules, including resume) image by mkinitcpio -p linux

Other links that may help

  • 2
    Thanks! Arch is now successfully back from hibernating again!
    – miyalys
    Mar 29, 2012 at 13:28
  • @xlys Glad I could help. Did you wait all these months to fix it? Mar 30, 2012 at 0:31
  • 1
    Yes, I did, and I left my computer on a lot more because of it.
    – miyalys
    Mar 30, 2012 at 11:12
  • I had to update initramfs sudo update-initramfs -u -k all
    – Zamicol
    Dec 2, 2018 at 22:42
  • When I boot, grub gives "error: invalid file name `resume=UUID=XX...XX'. it gives the same error using resume=/dev/sdb1. Any thoughts? Apr 23, 2019 at 15:34

You must log in to answer this question.

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