Paul G. Allen wrote:
SJS wrote:
....but we were talking about laptops.
Which, effectively, have built-in UPSes... but if you suspend 'em,
and don't get back to them in time (as I often fail to do*) or they
don't resume from hibernation properly, you get a significant failure.
A suspend should NEVER result in a failure upon restart.
Should, but does. Often.
Suspend is
supposed to stop all running processes, write the contents of memory to
disk (including video memory), and shutdown the system (or put it in a
very low power mode - I use suspend here to cover all versions of
stopping the computer outside of turning it off).
I believe (too lazy to look it up) that what you describe is called
Hibernate (save to disk). Suspend is save to RAM.
If power is lost while it's suspended, then upon restart, the system
should check to see if it was suspended prior to power loss. If so, it
should restore the system from the data written to the suspend file(s).
I have yet to see a system work this way (I have not tried suspending
Vista and unplugging the P/S to see if it does any better than any other
system I've used).
PGA
Suspend/hibernate has become very complex with the advent of things like
network devices, various USB devices, etc. There is a specification for
how all this is supposed to work. Then there is reality. Between device
makers, laptop ODM's, BIOS writers, and OS developers, there are a
thousand ways this can all go wrong. And usually does.
Whether power management (which is what all this really falls under)
works or not depends basically on which model of a given brand laptop or
motherboard you are using with which OS. And which ancillary hardware is
attached to that.
Windows works best for reasons we're all familiar with (read: market
share). Most everyone else is just doing a lot of research (usually
including looking to see what Windows does, and duplicating that
behavior right or wrong), tedious testing, or just guessing. Most do all
three.
Throw ACPI into the mix, which itself is a poorly written and even more
poorly followed specification, but is required for things to work as
expected, and you're lucky power management works at all on anything but
Windows.
If you follow the ACPI4Linux developer list, you know that most
discussions are about specific models of motherboards and laptops
incorrectly behaving with respect to often vague ACPI or power
management specs: poorly written BIOS; uncooperative hardware; poorly or
incorrectly documented hardware; device conflicts; etc. And it seems the
problem is getting worse, not better. A word you often see in these
discussion is "Quirks".
Eventually the question arises: What does Windows do?
--
Best Regards,
~DJA.
--
KPLUG-List@kernel-panic.org
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list