You are not logged in.
I installed uswsusp using yaourt -S uswsusp.
Suspend to ram (s2ram) works "out of the box" (all intel hardware, so I'm lucky).
I am close to getting s2disk working by following the Suspend to Disk wiki (http://wiki.archlinux.org/index.php/Suspend_to_Disk). I'm attempting the "Uswsusp Method" detailed in the wiki.
I edited /etc/suspend.conf and added my swap partition:
resume device = /dev/sda3
and I enabled compression:
compress = y
When I issue s2ram, the ram image is created, compressed, and stored on the swap partition. The machine powers off. When I power back on, my machine boots like normal. It does not use the saved state from the swap file. It shows an error when trying to mount the swap file however. So, how do I get it to restore from the disk? I use lilo if that matters.
Thanks,
Chris
Last edited by cjpembo (2008-08-22 20:16:06)
Offline
Did you change the /etc/mkinitcpio.conf file and regenerate the kernel boot image, like the good wiki says ("Recreate the intramfs" section)?
Last edited by fwojciec (2008-08-22 18:42:15)
Offline
Yes, I forgot to mention that I performed that step. I believe the restore image is being created correctly, but I don't know how to make my machine use it when it wakes up.
Offline
If the mkinitcpio "uresume" hook is set correctly mkinitcpio.conf, and the image was regenerated to include it after you made the change to the mkinitcpio config file, the image should be read. Without it, the boot up routine will never even look for it.
My guess is that the problem has something to do with the cpio image... Other than that, I've no idea what could be causing this.
EDIT: Also, double-make-sure that the uresume hook is in the correct location, that is after the udev hook and immediately before the filesystems hook.
Last edited by fwojciec (2008-08-22 19:01:53)
Offline
May I suggest TuxOnIce? It has always worked flawlessly for me.
Arch - It's something refreshing
Offline
I think I found the problem: the wiki is not clear that you add the resume hook when using the Uswsusp method; it mentions it later, in the section detailing with the Tuxonice routine. I sure if I add the resume hook using the s2disk method, it should work. Do I need to add the same kernel parameter to my lilo.conf that is added to grub.conf:
resume=swap:/dev/sda3
What if starting normally: will the resume kernel parameter be ignored?
Offline
If I remember correctly the uswsusp method needs no kernel parameters (since it's a userspace method), you do need the resume= kernel parameter if you're using pm-suspend, tuxonice (is it resume2= or did they change that?) and the generic kernel method.
Offline
Now the default kernel wont load and gives the following:
ACPI: Aborted because bad gzip magic numbers.
Kernel panic - not syncing: bad gzip magic numbers
This is after adding the resume hook and running:
mkinitcpio -k `uname -r` -g /boot/kernel26.img
The fallback kernel image works.
Any ideas?
Chris
Offline
No idea, I've never seen an error like this...
You should be able to fix it by removing the uresume hook and regenerating the cpio image again.
Is there any particular reason why you're decided on the uswsusp method? You could try pm-utils instead, for example.
Offline
You keep saying use a "uresume" hook and the wiki say a "resume" hook. Which is correct?
Offline
"uresume" for uswsusp, "resume" for other methods. The wiki, for uswsusp, says "uresume" (in the section I mentioned).
Offline
Ok, I got it to work.
The wiki needs to say "uresume" hook, not "resume" hook. Then I ran "lilo" after I updated the init image: perhaps that is necessary too? I've never been too good at mkinitcpio ...
Thanks everyone.
Chris
Offline
Don't blame the wiki
Recreate the intramfs
Now you need to recreate an initramfs with the new hook. So edit the /etc/mkinitcpio.conf file. In the HOOKS list add the uresume hook (it is different from the resume hook, which is on the contrary required by the tuxonice method). You should put it immediately before the filesystem hook. When the hook is executed the device file for the swap partition (which you have defined in /etc/suspend.conf) needs to exist (the standard udev hook will take care of this). Now proceed to regenerate your initramfs :
I guess you were trying to configure uswsusp using the instruction for tuxonice and others...
Offline
No, you are right: it does say uresume. I need glasses!
Offline
I added some boldface to the relevant section in the wiki so it is easier to read.
Offline
I am using the lilo boot manager: do you need to update lilo after running mkinitcpio? I did, but I'm not sure if it is required?
Offline
No idea, I've never used lilo, but I guess it updating it won't hurt.
Offline