From: Nigel Cunningham <nigel@nigel.suspend2.net>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: hibernate/suspend-to-disk: to turn power or not?
Date: Thu, 31 Jan 2008 08:25:57 +1100 [thread overview]
Message-ID: <47A0EB65.1020505@nigel.suspend2.net> (raw)
In-Reply-To: <47A0CD90.5080208@msgid.tls.msk.ru>
Hi.
Michael Tokarev wrote:
> I'm trying to "glue" hibernation and UPS control
> together, and have a question.
>
> When the system power comes off an UPS (Uninterruptable
> Power Supply I mean), it's probably a good idea to turn
> the UPS off when shutting the system down or hibernating.
>
> Even with shutdown (not related to hibernating) there's
> an interesting twist: modern systems can remember the
> previous on/off status when the power gets cut and
> restores - BIOS-controlled option that allows the
> system to automatically start when the input power
> returns. Now, when we shutting down a system, we
> need to turn the UPS *before* powering down the
> system but *after* the shutdown procedure has been
> completed. This is done by replacing poweroff with
> halt, and ordering the UPS to turn itself off after
> a small delay (needed for the poweroff command to
> complete) - this way, system will be on but in a
> safe-to-powercut mode, and in order to turn it
> back on only the UPS has to be turned on.
>
> But the question comes as how to control the UPS when
> we replace shutdown with hibernation. Ideally I want
> to send some commands to the UPS after hibernation has
> been completed (since I don't know how much time it
> will require to hibernate), but before the machine
> will be turned off by the kernel. Or at the very least,
> to be able to stop the kernel turning the machine off
> after hibernation process is complete - this way,
> I can order the UPS to turn the power off after some
> delay and hope hibernation process will finish when
> the UPS will finally cut the power (not all UPSes
> are able to do timely shutdown like this).
>
> What's my way here?
That should be doable. How is your UPS connected? Presumably, with some
modifications to the appropriate driver, we could send the commands when
we're ready to shutdown. It would probably be useful whether or not your
hibernating (if not, sending the commands could always be made an option).
Regards,
Nigel
next prev parent reply other threads:[~2008-01-30 21:36 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-30 19:18 hibernate/suspend-to-disk: to turn power or not? Michael Tokarev
2008-01-30 20:12 ` Bruno Prémont
2008-01-30 21:03 ` Michael Tokarev
2008-01-30 21:11 ` Rafael J. Wysocki
2008-01-30 23:30 ` Michael Tokarev
2008-01-31 14:40 ` Pavel Machek
2008-02-01 7:17 ` Michael Tokarev
2008-02-01 11:35 ` Rafael J. Wysocki
2008-07-13 23:26 ` David Fries
2008-07-14 5:43 ` Pavel Machek
2008-01-30 21:25 ` Nigel Cunningham [this message]
2008-01-30 23:37 ` Michael Tokarev
2008-01-30 23:58 ` Nigel Cunningham
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47A0EB65.1020505@nigel.suspend2.net \
--to=nigel@nigel.suspend2.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mjt@tls.msk.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox