03 May 2015

Fedora 21 (or later) not resuming from Suspend to Disk

Consider this as a memo to myself (or a useful hint in case you ran into a similar issue recently ;) ): Some days ago, my Asus Zenbook stopped to properly resume from Suspend to Disk state. I was running Fedora 21 (upgraded to 22 beta during the problem in the hope it was a caused by some bad Kernel update). As this did not help as well, I had to dig further and in fact found the issue: It seems, that some recent update or some stupid configuration issue on my side (or an unlucky combination of both xD ) caused the Grub2 configuration to omit the resume kernel command line option. This option tells the kernel where the disk image is stored which conserves the system state. To fix the issue, first, find out which is your swap partition, e.g. using blkid:

martin@zenbook:~$ blkid | grep swap
/dev/mapper/vg_zenbook-lv_swap: UUID="XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" TYPE="swap"

So in my case, the swap device is /dev/mapper/vg_zenbook-lv_swap. With that information, you can now edit /etc/default/grub and append the resume argument to the kernel command line:

GRUB_CMDLINE_LINUX="[...] resume=/dev/mapper/vg_zenbook-lv_swap"

Note: I left out the existing parameters from my configuration – whatever you do, do not remove anything but just append the resume=/path/to/your/swap/device argument. Finally, you can regenerate the grub configuration. In my case (as I am using EFI), I had to run

sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

That’s it. At least in my case, Suspend to Disk is working properly again after this change :)

Thank You For Reading
Martin Hoeher

I am a software/firmware developer, working in Dresden, Germany. In my free time, I spent some time on developing apps, presenting some interesting findings here in my blog.

Your comment has been filed

We'll review it and it will appear here as soon as we're done.

Sorry, something went wrong...

Your comment could not be posted.

Regarding your personal information...
  • The name you enter will be shown next to your comment. You may enter your real name or whatever you like.
  • Your e-mail will be used to show an image representing you next to your comment. We do not store nor show your address somewhere. Instead, an ID will be calculated from it and stored. This ID is then used to retrieve an image from Gravatar.