problem with suspend to disk on linux2.6-t9
hi
i am using linux2.6-t9 and i am trying to use suspend to disk when doing a
< echo -n "disk" > /sys/power/state >
it is suspending real fine.
but it is not resuming at all.
i tried to boot up normally and with resume=/dev/hdb5 ( swap partition ) but nothing happens...
it just boots up normally...
i have set /dev/hdb5 as DEFAULT RESUME PARTITION during kernel config...
any ideas?
thanks
Quoted 4 lines · dodger
it is suspending real fine.
but it is not resuming at all.
i tried to boot up normally and with resume=/dev/hdb5 ( swap partition ) but nothing happens...
Try disabling the drive write cache with "hdparm -W0 /dev/hdb" before suspending. It did the trick for me, as well as curing some other obscure problems.
Signature · 2 lines
Måns Rullgård [email protected]
Quoted 10 lines · dodger
hi
i am using linux2.6-t9 and i am trying to use suspend to disk when doing a
< echo -n "disk" >/sys/power/state>it is suspending real fine.
but it is not resuming at all.
i tried to boot up normally and with resume=/dev/hdb5 ( swap partition ) but nothing happens...
Quoted 5 lines
it just boots up normally...
i have set/dev/hdb5as DEFAULT RESUME PARTITION during kernel config...any ideas?
thanks
Hmmm... Looking at my dmesg from the last boot up (which was a clean boot and not a resume from suspend), it doesn't seem like the suspend code prints out anything when it's checking for a resume image. (On the other hand, the APIC code prints out three screenfulls of useless trivia. Fun...)
Patrick: is there some kind of debug switch we can set to make it more verbose? (I don't see one in the code. I'm going to be sprinkling in printks myself as soon as my rebuild sans preempt finishes...)
Rob
Quoted 10 lines · dodger
hi
i am using linux2.6-t9 and i am trying to use suspend to disk when doing a
< echo -n "disk" >/sys/power/state>it is suspending real fine.
but it is not resuming at all.
i tried to boot up normally and with resume=/dev/hdb5 ( swap partition ) but nothing happens...
Quoted 5 lines
it just boots up normally...
i have set/dev/hdb5as DEFAULT RESUME PARTITION during kernel config...any ideas?
thanks
Did you specify a default resume partition (CONFIG_PM_DISK_PARTITION) in your .config? (Or provide it with the kernel parameter pmdisk=/dev/blah)...
On suspend, it saves to the first mounted swap file. On resume, it hasn't looked at /etc/fstab yet to see where the swap files are by the time it gets to resuming, and nobody's bothered to code up any heuristic for what to do with no default partition, so you have to point it at a partition or it won't attempt to resume.
Personally, I think that 99% of the time you can just iterate through the partitions of whatever drive your root device lives on and find the first one that's got a valid suspend signature on it, and resume from that. (And if you don't find one, don't resume.) The few cases where this isn't appropriate can configure another default or supply a kernel command line paramenter, but having to bake your swap partition location into the kernel config is a bit klunky at best...
Of course with lilo, there's a user space alternative, you know. Your suspend script could call lilo -R with a command line that points to the partition you're about to suspend to. But there are a number of problems with that (ideally you want to do it right AFTER suspending...) And I dunno if grub's got an equivalent...
One thing that might be nice is if there was a way to trigger a resume from the initramfs. "Blow away the current process list and load this binary image of what userspace should look like." That way figuring out where the sucker lives is a problem you could punt on. :)
Rob
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 3 lines · Rob Landley
Did you specify a default resume partition (
CONFIG_PM_DISK_PARTITION) in your .config? (Or provide it with the kernel parameter pmdisk=/dev/blah)...
yes i did.
i tried to suspend with disabled hdb write cache ( hdparm -W0 /dev/hdb ) and it suspended and resumed fine.
exept for my network device wasnt running...is there a way to fix this?
i`ll try to do ifdown before suspending and ifup after resuming, but is
there a way to resume properly without that?
dodger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE/umdKN+skZni2ETYRAnP9AJ9BgIfL5vwar1xJP1HqcjKkXezOcgCfSplv 7Vhwik+TieywXjgO2NWnXUQ=
=4Db2
-----END PGP SIGNATURE-----
Hi!
Quoted 4 lines
One thing that might be nice is if there was a way to trigger a resume from the initramfs. "Blow away the current process list and load this binary image of what userspace should look like." That way figuring out where the sucker lives is a problem you could punt on. :)
This is doable, but rather hard. Way too hard for 2.6.X, anyway.
Pavel
Signature · 2 lines
When do you have a heart between your knees? [Johanka's followup: and *two* hearts?]