how is suspend-to-disk supposed to work?

jmeads ulist at gs1.ubuntuforums.org
Mon Jun 5 12:51:40 UTC 2006


It's quite simple, theres a bit of documentation in the kernel source on
how to do it manually. 



first you need to append resume=/dev/swappartition to the kernel line
in grub menu.lst, swappartition = swap partition, ie /dev/hda3 ?? It's
also useful to have a noresume line too... this is so the kernel know
to have a look for the resume image 



After a reboot you can test hibernation - You should really test this
when in single user mode, and please read the kernel documentation
about this - it is very easy to lose all your data if it goes wrong -
you have been warned



sudo -i

echo shutdown > /sys/power/disk; echo disk > /sys/power/state



This should write memory pages to disk and then shutdown. Startup as
normal using the kernel with the resume appended, and it should restore
to where you left it. 



Generally you will need to reload should and wireless card modules.



Ubuntu has a lot of code hanging this all together off the /etc/acpi/
directory. It's all handled be acpi events, I had to ammend a bit of
the code in the suspend.d and resume.d directories to get it all
working for me as the default code was doing too much imho 



Working sweetly here using an IBM X30 laptop


-- 
jmeads




More information about the ubuntu-users mailing list