Ubuntu Hibernate/Suspend problem

First off, quick explanation.
Suspend saves a image to ram. It is faster to save and reload; but the computer uses a minimal amount of energy to keep this in ram. If the power is lost (battery is drained etc) then the image is lost.
Hibernate save a image to disk. It is slightly slower to save and reload; but there is no problem if the power is lost.

However I am not the only one that have noticed that hibernate/suspend on Ubuntu does not work on a default installation.
One solution that more than me have found to be working is to switch to uswsusp.

user@laptop$ sudo apt-get install uswsusp
user@laptop$ sudo s2disk

s2disk does a hibernation (s2ram does a suspend); and it is good to test it out before swapping the hibernate/suspend function.
When you know hibernate/suspend works, you can swap to using uswsusp by using:

user@laptop$ sudo dpkg-divert --rename --divert /usr/sbin/pmi-disabled /usr/sbin/pmi

If you later on would like to swap back you can use

user@laptop$ sudo dpkg-divert --rename --remove /usr/sbin/pmi