[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OT: Mechanism of Laptop's Suspend to Disc.



On Sun, Mar 04, 2001 at 07:31:52PM +0000, Ralph Corderoy wrote:
> This isn't really Kernel material but it's the best place to ask I know
> of.  If you know of somewhere better please tell me to buzz off over
> there.
> 
> I've a Sony Vaio laptop that boots Linux.  I can trigger its `Suspend
> to Disc' with a key combination and the current contents of RAM are
> saved to a special partition and the machine powers off.  On power on
> the machine notes that the partition isn't empty and restores the
> machine to its previous state.
> 
> That's my understanding.  I'd like to understand what parts Linux is
> involved with, presumably handling the keypress and asking the BIOS to
> write to the partition, and what the BIOS is doing, I guess restoring
> after power on.

Well, you can enter suspend (or hibernate) mode with the command "apm
--suspend" or by pressing a key combination. In either case linux will
sync the filesystems, and ask all registered drivers to go into suspend
mode. After that the BIOS takes control, writes the system state to
disk, and suspends the system.

> Why?  Well, the laptop dual boots with W98 and I can't help thinking
> that it would be a `poor man's Plex86' if you could suspend Linux to
> disc and then restore a W98 that I had earlier, or another Linux for
> that matter.  Probably by having multiple special partitions as the
> BIOS would need to know and provide me with a selection.

Good idea, but doesn't work. The BIOS is the last one that touches the
disk before suspend, and the first one to touch it when it boots. There
is no way for you to get in between that.

> What do people think?  Would it be possible without BIOS intervention?
> I'd guess not.  In that case, why don't BIOS writers consider this as a
> useful addition?

Hohum, don't get me started on BIOS writers. To quote Alan Cox, they
are "stupid morons who cant program and wouldnt know QA if it hit them
on the head with a mallet".


Erik

-- 
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031,  2600 GA Delft, The Netherlands
Phone: +31-15-2783635  Fax: +31-15-2781843  Email: J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/
-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.surriel.com/kernelnewbies.shtml