Okay, I think I've gotten around this problem.
The solution for me was to use uswsusp instead of the default Ubuntu suspend program - it has better features, such as suspend saving an image to the hard drive as well as ram in case the battery runs out, and.. well... it actually works!
Here is how I got it running as the default suspend/resume program in Ubuntu:
First off, you need to install it!
Code:
sudo apt-get install uswsusp
Double check that this installed correctly by typing /sbin/s2 and hitting tab twice - it should show /sbin/s2both and /sbin/s2disk.
Next, you need to disable the old pmi version of suspend. To do this I used dpkg-divert - a clever little utility that just moves modules rather than deleting them so it doesn't break all the module's dependents as it would if you used apt to uninstall it. In addition, all updates to the module are still applied so you can revert back to it whenever you like - but it doesn't overwrite everything you've done when it's updated! Hurray!
Code:
sudo dpkg-divert --rename --divert /usr/sbin/pmi-disabled /usr/sbin/pmi
sudo dpkg-divert --rename --divert /usr/sbin/pm-suspend-disabled /usr/sbin/pm-suspend
sudo dpkg-divert --rename --divert /usr/sbin/pm-hibernate-disabled /usr/sbin/pm-hibernate
Now you need to edit the suspend and hibernate scripts in Ubuntu. Previously these had built in support for other suspend programs, but now they don't so you'll have to add it yourself!
Code:
sudo gedit /usr/lib/hal/scripts/linux/hal-system-power-suspend-linux
Replace the following code:
Code:
if [ -x /usr/sbin/pm-suspend ] ; then
/usr/sbin/pm-suspend $QUIRKS
RET=$?
else
unsupported
fi
with this:
Code:
if [ -x /usr/sbin/pm-suspend ] ; then
/usr/sbin/pm-suspend $QUIRKS
RET=$?
elif [ -x /sbin/s2both ] ; then
/sbin/s2both
RET=$?
else
unsupported
fi
And similarly for hibernate:
Code:
sudo gedit /usr/lib/hal/scripts/linux/hal-system-power-hibernate-linux
This should have a similar section to the one above - edit it so it looks like this:
Code:
if [ -x /usr/sbin/pm-hibernate ] ; then
/usr/sbin/pm-hibernate $QUIRKS
RET=$?
elif [ -x /sbin/s2disk ] ; then
/sbin/s2disk
RET=$?
else
unsupported
fi
That's all!
Now when you suspend or hibernate it should run s2both and s2disk respectively, which, for me at least, work perfectly.
If at any time you want to revert back to the original versions of suspend and hibernate, you can just run the following commands:
Code:
sudo dpkg-divert --rename --remove /usr/sbin/pmi
sudo dpkg-divert --rename --remove /usr/sbin/pm-suspend
sudo dpkg-divert --rename --remove /usr/sbin/pm-hibernate
(This was cobbled together from a guide at
http://blog.paulbetts.org/index.php/2007/02/11/fixing-software-suspend-hibernate-with-uswsusp-in-ubuntu-feisty-and-edgy/ and comments there from Robin Battey)
Hope it works for you too!
-Cupcake