[Nut-upsdev] suspend to ram
n
xellos at bluebottle.com
Wed Aug 15 11:12:50 UTC 2007
well i was really talking about suspend to ram, i do it on another pc with
windows and it about tripples the battery runtime on that ups (it was at 5
min and when the system suspended it jumped up to 74 min even then it would
go to 73 then jump back to 74 min i didnt really see it drop ) , as far as
i know all the ups has to power in that state is the ram (about 10w~) on my
script i run sync to hdds first to write any data to them then i suspend it
to ram everything shuts off , hdds,fans (inc power supply fan), video
card,..etc i think the only thing on is the ram and the led on the
mainboard, i dont care about open programs being lost since its mosly used
for a webserver , my only concern is lost data / curuption , can this happen
in suspend to ram if i sync the disks first?
i was thinking about using upssched to suspend it about 12+ mins before
battery runs out that way i would maybe get about 30-40+ minutes out of the
battery, i have even heard you can unplug the pc while its suspended and it
will run for awhile before powering off (i havent tried it though ), but i
can undserstand that if the power didnt come back on it would be a bad
shutdown
i might take a look into suspend to disk but it seems more complicated to
start up the system
----- Original Message -----
From: "Arjen de Korte" <nut+users at de-korte.org>
To: "n" <xellos at bluebottle.com>
Cc: <nut-upsdev at lists.alioth.debian.org>
Sent: Wednesday, August 15, 2007 3:25 AM
Subject: Re: [Nut-upsdev] suspend to ram
>
>> i think i found a bug i wanted nut to suspend to ram instead of powering
>> off
>
> That would be a horrible idea. Imagine what happens when your UPS runs out
> of battery, while you're still suspended to RAM. Could it be that you
> actually mean to suspend-to-disk instead?
>
>> so i made a script that runs the commands but i ran into a problem i
>> changed the shutdown command in upsmon.conf to my suspend script and i
>> tested with upsmon -c fsd everything worked fine system went into suspend
>> and i woke it backup by pressing the power button, now here is where i
>> noticed some problems first one is that upsmon shuts it self down when
>> fsd
>> is called so i thought i would just add a command in my scipt to restart
>> it after it comes out of suspend this worked but for some reason as soon
>> as upsmon starts up it broadcasts a message and system goes into suspend
>> again (it would just keep looping if i kept waking it) im not sure what
>> causes the loop since there is no killpower flag, i think something from
>> upsd is telling upsmon to powerdown but im not sure, i tried adding rm
>> /tmp/killpower before upsmon is restarted but that didnt help,
>
> This is documented in the docs/ideas.txt document, see near the bottom of
> that file under 'Suspending to disk'.
>
>> i found a quick fix by restarting the driver , upsd , then starting
>> upsmon
>> is there a better way to make it go into suspend or am i doing something
>> wrong?
>
> No, that's the way to do it. Shutting down the UPS is still tricky though.
> I have yet to see a kernel that allows inserting commands just before it
> sends the poweroff command, in order to shutdown the UPS. You might be
> able to use the shutdown with delay feature of your UPS, but this becomes
> hairy when the system fails to suspend for some reason and resumes. In
> that case your need to be really quick to stop the shutdown command. All
> in all we currently don't recommend this. As soon as kernels provide a
> hook to insert the 'upsdrvctl shutdown' command, it is an interesting
> option though.
>
> Best regards, Arjen
> --
> Eindhoven - The Netherlands
> Key fingerprint - 66 4E 03 2C 9D B5 CB 9B 7A FE 7E C1 EE 88 BC 57
>
----------------------------------------------------------------------
Get a free email address with REAL anti-spam protection.
http://www.bluebottle.com/tag/1
More information about the Nut-upsdev
mailing list