[Tfug] suspend to ram question

Bexley Hall bexley401 at yahoo.com
Tue Nov 10 10:29:57 MST 2009


--- On Tue, 11/10/09, Rich <r-lists at studiosprocket.com> wrote:

> The laptop I need for my job (Windows) has a fine old time
> telling me I need to plug in a power source soon or I'll
> lose my work. However, it always tells me this *after* it's
> just gone to sleep due to low battery. I find it wonderful
> guessing how much longer I have before I need to plug in.

I'm surprised it doesn't wake up to tell you "You're screwed"
just before the screen flickers and goes black!  :>
 
> > I assumed that in suspend to ram, a dying battery would just die. I
> > wonder if my lappy is smart enough to wake up and save things to disk.
> You'd think so, wouldn't you? So did Steve Jobs...
> Apple laptops only have one "sleep" mode, and you just
> described it. This doesn't apply to any of the PPC models or
> some of the early Intels.

Even if the computer doesn't have the ability to set an alarm
(wake up event) based on battery voltage, it *can* wake up
periodically, check the battery, update the alarm time (if there
is ample charge in the battery) and return to sleep -- *or*
save to disk and die gracefully.

Many (intel) processors have an SMI mode that operates
completely independant of the OS so that things like
this can be implemented by the computer maker without
the "consent" of MS.  For 20 (?) years computers have been
able to wake up based on a *time* alarm (as needed above).

The downside of waking up to see what's going on ("groundhog
syndrome") is that it uses battery power.  Granted, if you
were going to have to wake the laptop up *manually* and
save to disk, then it doesn't hurt for the laptop to
try this itself (i.e., if there isn;t enough power left for
it to wake itself up and complete the disk write, then there
wouldn't be enough for *you* to wake it up and do the disk
write -- so no loss, no gain).

But, if you were going to *eventually* plug in the AC power
source and let the battery start recovering *before* (or in
lieu of) "saving to disk" then the laptop waking itself up
cuts into the length of time you can go before you *must*
plug it in.

> > Seems like a tall order,
> Not really. How hard could it be? I mean, all you'd need
> would be some kind of monitoring device capable of
> extrapolating data -- now if only there were some device on
> board which already did some data processing, you could
> re-use that...

Assuming you have been *using* the battery periodically
(e.g., I rarely operate laptop without AC power), then
the laptop has every opportunity to *learn* what the
batteries characteristics are -- and under various loads!
It should be able to, just prior to suspending, come up with
a decent estimate of how long the battery is likely to
last and set the *timer* in the RTC to wake it up "just
in time".  Then, measure the battery level, update its
estimate, etc.

Of course, the above caveat still holds...


      




More information about the tfug mailing list