I recently rearranged my partitions on my disk to move my /home to a separate partition and to create a media storage volume. That makes my partition layout look like this:
Old New
sda1 /boot sda1 /boot
sda2 / sda2 /
sda3 /mnt/backup sda3 /home
sda4 (swap) sda4 (extended)
sda5 /mnt/extra
sda6 (swap)
(The backup partition was moved to a separate physical device.)
When I did this, my hibernate suddenly stopped working:
# echo disk > /sys/power/state
echo: write error: No such device
# dmesg
...
swsusp: Cannot find swap device, try swapon -a.
...
My monitor went blank and all tasks were halted, it just resumed immediately instead of saving the image. Also, my swap was configured properly and had ample space available.
I dove into the kernel source, my best guess was that maybe swsusp couldn’t handle swap on logical partitions for some strange reason. Of course, this wasn’t the case. I looked around the code and found that swsusp actually doesn’t search for swap partitions, it only uses a preconfigured one. That meant I needed to change the partition that I was having swsusp save to needed to be changed, because my partition layout had changed, except I couldn’t remember ever telling swsusp to save to a particular partition.
But I did, actually: I had configured swsusp to resume from a particular partition, and that needed to be updated. So I fired up my grub.conf, and changed the resume= kernel option to point to my new swap partition. Everything works great now.