Re: HOWTO: Use swapfile instead of partition and hibernate
Thanks for mentioning the quirk-checker.sh script. It worked for a friend of mine on a new Sony VAIO with two SSDs, but my MacBook Pro is still without hibernate, after all these years.
From the man page on uswsusp:
Quote:
resume offset
Necessary if a swap file is used for suspending. In such a case the device identified by the "resume device" parameter is regarded as the partition that contains the swap file, and "resume offset" must be equal to the offset from the beginning of this partition at which the swap file's header is located, in <PAGE_SIZE> units. The value of this parameter for given swap file can be determined by the swap-offset program (has to be run as root) included in this package. [For this feature to work, you will need an -mm kernel, 2.6.18-mm3 or newer.]
Most unfortunate. For those not familiar, the -mm tree is no longer maintained, not since 2007. Given that the hibernate command just calls other scripts, this would explain why hibernation isn't working, even with a properly configured uswsusp.conf. Found this bug report interesting, particularly comment #6.
Hate to be pessimistic, but I'm near giving up on this. s2ram works OK, but I've never had s2disk working on this laptop.
Re: HOWTO: Use swapfile instead of partition and hibernate
I'd like to pass on what I've learned from a situation where I changed swapfiles after getting hibernate to work on the old one, AND I updated the kernel to 2.6.32-28-generic, but due to a problem with sound, I prefer to stay with the previous kernel version. (running ubuntu 10.04.1)
First, after determining the new resume_offset, it has to be changed in three places:
/etc/default/grub
/etc/uswsusp.conf
/etc/initramfs-tools/conf.d/resume
If the 2.6.32-28 is installed, but you want to stick with 2.6.32-27, do the following:
In /etc/default/grub, change GRUB_DEFAULT=0 to GRUB_DEFAULT=2
Run the following:
$ sudo grub-update
$ sudo update-initramfs -uk $(uname -r)
Re: HOWTO: Use swapfile instead of partition and hibernate
I'm having one significant problem with this. Hibernation (and resume) works OK, but only by the command "sudo hibernate". Clicking "Hibernate" on the shutdown menu apparently causes the image to be saved - at least according to /var/log/pm-suspend.log. However, on restart, /var/log/syslog contains:
Code:
...
Feb 5 15:00:10 Laptop kernel: [ 0.388681] PM: Checking image partition UUID=e42b5082-99ef-4740-a1e1-4f45af8de261
Feb 5 15:00:10 Laptop kernel: [ 0.408956] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input4
Feb 5 15:00:10 Laptop kernel: [ 0.453478] ACPI: Battery Slot [BAT0] (battery present)
Feb 5 15:00:10 Laptop kernel: [ 0.659187] isapnp: No Plug & Play device found
Feb 5 15:00:10 Laptop kernel: [ 0.659207] PM: Resume from disk failed.
...
What am I missing?
Re: HOWTO: Use swapfile instead of partition and hibernate
Hi! :D
And what now?
Is possible to hibernate with Kubuntu 11.04, ext4 partition and 2GiB swapfile?
I tryed it by using posts here, my system do hibernate - takes about 15s to writte ~750MB, then comp is turned off. But when loading, it freezes..:(:(:confused:
Re: HOWTO: Use swapfile instead of partition and hibernate
Maybe this will help somebody to find some good solution for the resume problem.
I've got hibernation working on my Eee PC 901 just by fixing the GRUB_CMDLINE_LINUX_DEFAULT option. However it hangs on resume after loading the dumped memory. I tried to do soft reset by typing magic combination RSEIUB via Alt+Ctrl+PrtSc. And the system came back to life just after "E".
So, there is no need to reset pc as some people did here before. Just kill the loader instead.