Hibernation failed due to insufficient Swap partition [duplicate]

Possible Duplicate:
Adding swap partition after system installation

I got 8GB RAM on my laptop but only partitioned 1GB for swap, now the hibernation cannot be achieved even if I use sudo pm-hibernate.

Is there any solution?


Hibernation basically writes the contents of RAM to disk, using the swap partition. So, for hibernation to work, you need a swap partition not smaller than your RAM - I'd try something like 10Gb.

From SwapFAQ:

Hibernation (suspend-to-disk) The hibernation feature (suspend-to-disk) writes out the contents of RAM to the swap partition before turning off the machine. Therefore, your swap partition should be at least as big as your RAM size. The hibernation implementation currently used in Ubuntu, swsusp, needs a swap or suspend partition. It cannot use a swap file on an active file system.

You'll need to boot from a LiveCD and use gparted to resize partitions.


I'd suggest increasing the size of the swap partition if you can. Traditionally swap was twice the size of the RAM but you could probably get away with 4Gb.

You should also look at how much of the swap space is getting used with something like activity monitor.