[linux-pm] Software suspend support in Fedora.
pavel at ucw.cz
Mon Aug 15 05:06:35 PDT 2005
> > > The outcome: I'm no more enthusiastic about enabling this in Red Hat
> > > kernels than I ever was before. It seems to have real issues with LVM
> > > setups (which is default on Red Hat/Fedora installs these days).
> > > After convincing it where to suspend/resume from by feeding it
> > > the major/minor of my swap partition, it did actually seem
> > > to suspend. And resume (though it did spew lots of 'sleeping whilst
> > > atomic warnings, but thats trivial compared to whats coming up
> > > next).
> > I do not know much about LVM. How exactly did you resume= command line
> > look like? You were not resuming from initrd, right?
> Indeed, this was very likely the problem. Doing a resume if I had
> any partition mounted was *bad* news. We implemented the necessary
> bits in our initrd today to detect resume partitions, and erm.. resume them.
> So far so good, no repeats of the corruption I saw.
> As of tomorrow rawhide kernels (for the unenlightened: these will
> eventually be FC5) will have software suspend support.
> Our initial experiments with it have been fairly positive, though as
> expected there are a number of drivers that don't survive the resume
> correctly. http://www.livejournal.com/users/kernelslacker/22975.html
I see, having ext3 (or anything else) mounted when doing resume is
going to kill you data, fast. I thought warning in docs was good
Anyway, if you want to make this idiot-proof, I think the preferred
way is to kill suspend signature during the boot [it is must-have for
failsafe boot, so you can recover system if resume crashes it]. That
way user can echo whatever to resume, but having no signature means he
is not going to cause big damage.
[Actually there are more easy ways to kill some data. Suspend, do
normal boot next time, change something on disk, reboot and make it
resume. Bye-bye data.]
Okay, I realized I had too many warnings in there, and some things
(like no driver support) is not _that_ dangerous, while resuming with
filesystems mounted clearly is. I'll probably change the warning to:
* BIG FAT WARNING *********************************************************
* If you touch anything on disk between suspend and resume...
* ...kiss your data goodbye.
* If you do resume from initrd after your filesystems are mounted...
* ...bye bye root partition.
* [this is actually same case as above]
* If you have unsupported (*) devices using DMA, you may have some
* problems. If your disk driver does not support suspend... (IDE does),
* it may cause some problems, too. If you change kernel command line
* between suspend and resume, it may do something wrong. If you change
* your hardware while system is suspended... well, it was not good idea;
* but it wil probably only crash.
* (*) suspend/resume support is needed to make it safe.
if you have sharp zaurus hardware you don't need... you know my address
More information about the linux-pm