269 lines
8.4 KiB
HTML
269 lines
8.4 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of RTCWAKE</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>RTCWAKE</H1>
|
|
Section: System Administration (8)<BR>Updated: June 2015<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
rtcwake - enter a system sleep state until specified wakeup time
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>rtcwake</B>
|
|
|
|
[options]
|
|
[<B>-d</B>
|
|
|
|
<I>device</I>]
|
|
|
|
[<B>-m</B>
|
|
|
|
<I>standby_mode</I>]
|
|
|
|
{<B>-s </B><I>seconds</I>|<B>-t </B><I>time_t</I>}
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
This program is used to enter a system sleep state and to automatically
|
|
wake from it at a specified time.
|
|
<P>
|
|
|
|
This uses cross-platform Linux interfaces to enter a system sleep state, and
|
|
leave it no later than a specified time. It uses any RTC framework driver that
|
|
supports standard driver model wakeup flags.
|
|
<P>
|
|
|
|
This is normally used like the old <B>apmsleep</B> utility, to wake from a suspend
|
|
state like ACPI S1 (standby) or S3 (suspend-to-RAM). Most platforms can
|
|
implement those without analogues of BIOS, APM, or ACPI.
|
|
<P>
|
|
|
|
On some systems, this can also be used like <B>nvram-wakeup</B>, waking from states
|
|
like ACPI S4 (suspend to disk). Not all systems have persistent media that are
|
|
appropriate for such suspend modes.
|
|
<P>
|
|
|
|
Note that alarm functionality depends on hardware; not every RTC is able to setup
|
|
an alarm up to 24 hours in the future.
|
|
<P>
|
|
|
|
The suspend setup may be interrupted by active hardware; for example wireless USB
|
|
input devices that continue to send events for some fraction of a second after the
|
|
return key is pressed.
|
|
<B>rtcwake</B>
|
|
|
|
tries to avoid this problem and it waits to terminal to settle down before
|
|
entering a system sleep.
|
|
<P>
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="1"><B>-A</B>,<B> --adjfile </B><I>file</I>
|
|
|
|
<DD>
|
|
Specify an alternative path to the adjust file.
|
|
<DT id="2"><B>-a</B>,<B> --auto</B>
|
|
|
|
<DD>
|
|
Read the clock mode (whether the hardware clock is set to UTC or local time)
|
|
from the <I>adjtime</I> file, where
|
|
<B><A HREF="/cgi-bin/man/man2html?8+hwclock">hwclock</A></B>(8)
|
|
|
|
stores that information. This is the default.
|
|
<DT id="3"><B>--date</B> <I>timestamp</I>
|
|
|
|
<DD>
|
|
Set the wakeup time to the value of the timestamp. Format of the
|
|
timestamp can be any of the following:
|
|
<TABLE>
|
|
<TR VALIGN=top><TD>YYYYMMDDhhmmss </TD><TD><BR></TD></TR>
|
|
<TR VALIGN=top><TD>YYYY-MM-DD hh:mm:ss </TD><TD><BR></TD></TR>
|
|
<TR VALIGN=top><TD>YYYY-MM-DD hh:mm </TD><TD>(seconds will be set to 00)<BR></TD></TR>
|
|
<TR VALIGN=top><TD>YYYY-MM-DD </TD><TD>(time will be set to 00:00:00)<BR></TD></TR>
|
|
<TR VALIGN=top><TD>hh:mm:ss </TD><TD>(date will be set to today)<BR></TD></TR>
|
|
<TR VALIGN=top><TD>hh:mm </TD><TD>(date will be set to today, seconds to 00)<BR></TD></TR>
|
|
<TR VALIGN=top><TD>tomorrow </TD><TD>(time is set to 00:00:00)<BR></TD></TR>
|
|
<TR VALIGN=top><TD>+5min </TD><TD><BR></TD></TR>
|
|
</TABLE>
|
|
|
|
<DT id="4"><B>-d</B>,<B> --device </B><I>device</I>
|
|
|
|
<DD>
|
|
Use the specified <I>device</I> instead of <B>rtc0</B> as realtime clock.
|
|
This option is only relevant if your system has more than one RTC.
|
|
You may specify <B>rtc1</B>, <B>rtc2</B>, ... here.
|
|
<DT id="5"><B>-l</B>,<B> --local</B>
|
|
|
|
<DD>
|
|
Assume that the hardware clock is set to local time, regardless of the
|
|
contents of the <I>adjtime</I> file.
|
|
<DT id="6"><B>--list-modes</B>
|
|
|
|
<DD>
|
|
List available --mode option arguments.
|
|
<DT id="7"><B>-m</B>,<B> --mode </B><I>mode</I>
|
|
|
|
<DD>
|
|
Go into the given standby state. Valid values for <I>mode</I> are:
|
|
<DL COMPACT><DT id="8"><DD>
|
|
<DL COMPACT>
|
|
<DT id="9"><B>standby</B>
|
|
|
|
<DD>
|
|
ACPI state S1. This state offers minimal, though real, power savings, while
|
|
providing a very low-latency transition back to a working system. This is the
|
|
default mode.
|
|
<DT id="10"><B>freeze</B>
|
|
|
|
<DD>
|
|
The processes are frozen, all the devices are suspended and all the processors
|
|
idled. This state is a general state that does not need any platform-specific
|
|
support, but it saves less power than Suspend-to-RAM, because the system is
|
|
still in a running state. (Available since Linux 3.9.)
|
|
<DT id="11"><B>mem</B>
|
|
|
|
<DD>
|
|
ACPI state S3 (Suspend-to-RAM). This state offers significant power savings as
|
|
everything in the system is put into a low-power state, except for memory,
|
|
which is placed in self-refresh mode to retain its contents.
|
|
<DT id="12"><B>disk</B>
|
|
|
|
<DD>
|
|
ACPI state S4 (Suspend-to-disk). This state offers the greatest power savings,
|
|
and can be used even in the absence of low-level platform support for power
|
|
management. This state operates similarly to Suspend-to-RAM, but includes a
|
|
final step of writing memory contents to disk.
|
|
<DT id="13"><B>off</B>
|
|
|
|
<DD>
|
|
ACPI state S5 (Poweroff). This is done by calling '/sbin/shutdown'.
|
|
Not officially supported by ACPI, but it usually works.
|
|
<DT id="14"><B>no</B>
|
|
|
|
<DD>
|
|
Don't suspend, only set the RTC wakeup time.
|
|
<DT id="15"><B>on</B>
|
|
|
|
<DD>
|
|
Don't suspend, but read the RTC device until an alarm time appears.
|
|
This mode is useful for debugging.
|
|
<DT id="16"><B>disable</B>
|
|
|
|
<DD>
|
|
Disable a previously set alarm.
|
|
<DT id="17"><B>show</B>
|
|
|
|
<DD>
|
|
Print alarm information in format: "alarm: off|on <time>".
|
|
The time is in ctime() output format, e.g. "alarm: on Tue Nov 16 04:48:45 2010".
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="18"><B>-n</B>,<B> --dry-run</B>
|
|
|
|
<DD>
|
|
This option does everything apart from actually setting up the alarm,
|
|
suspending the system, or waiting for the alarm.
|
|
<DT id="19"><B>-s</B>,<B> --seconds </B><I>seconds</I>
|
|
|
|
<DD>
|
|
Set the wakeup time to <I>seconds</I> in the future from now.
|
|
<DT id="20"><B>-t</B>,<B> --time </B><I>time_t</I>
|
|
|
|
<DD>
|
|
Set the wakeup time to the absolute time <I>time_t</I>. <I>time_t</I>
|
|
is the time in seconds since 1970-01-01, 00:00 UTC. Use the
|
|
<B><A HREF="/cgi-bin/man/man2html?1+date">date</A></B>(1)
|
|
|
|
tool to convert between human-readable time and <I>time_t</I>.
|
|
<DT id="21"><B>-u</B>,<B> --utc</B>
|
|
|
|
<DD>
|
|
Assume that the hardware clock is set to UTC (Universal Time Coordinated),
|
|
regardless of the contents of the <I>adjtime</I> file.
|
|
<DT id="22"><B>-v</B>,<B> --verbose</B>
|
|
|
|
<DD>
|
|
Be verbose.
|
|
<DT id="23"><B>-V</B>,<B> --version</B>
|
|
|
|
<DD>
|
|
Display version information and exit.
|
|
<DT id="24"><B>-h</B>,<B> --help</B>
|
|
|
|
<DD>
|
|
Display help text and exit.
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>NOTES</H2>
|
|
|
|
Some PC systems can't currently exit sleep states such as <B>mem</B>
|
|
using only the kernel code accessed by this driver.
|
|
They need help from userspace code to make the framebuffer work again.
|
|
<A NAME="lbAG"> </A>
|
|
<H2>FILES</H2>
|
|
|
|
<I>/etc/adjtime</I>
|
|
|
|
<A NAME="lbAH"> </A>
|
|
<H2>HISTORY</H2>
|
|
|
|
The program was posted several times on LKML and other lists
|
|
before appearing in kernel commit message for Linux 2.6 in the GIT
|
|
commit 87ac84f42a7a580d0dd72ae31d6a5eb4bfe04c6d.
|
|
<A NAME="lbAI"> </A>
|
|
<H2>AUTHORS</H2>
|
|
|
|
The program was written by David Brownell <<A HREF="mailto:dbrownell@users.sourceforge.net">dbrownell@users.sourceforge.net</A>>
|
|
and improved by Bernhard Walle <<A HREF="mailto:bwalle@suse.de">bwalle@suse.de</A>>.
|
|
<A NAME="lbAJ"> </A>
|
|
<H2>COPYRIGHT</H2>
|
|
|
|
This is free software. You may redistribute copies of it under the terms
|
|
of the GNU General Public License <<A HREF="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</A>>.
|
|
There is NO WARRANTY, to the extent permitted by law.
|
|
<A NAME="lbAK"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+hwclock">hwclock</A></B>(8),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+date">date</A></B>(1)
|
|
|
|
<A NAME="lbAL"> </A>
|
|
<H2>AVAILABILITY</H2>
|
|
|
|
The rtcwake command is part of the util-linux package and is available from the
|
|
|
|
Linux Kernel Archive
|
|
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="25"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="26"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="27"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="28"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DT id="29"><A HREF="#lbAF">NOTES</A><DD>
|
|
<DT id="30"><A HREF="#lbAG">FILES</A><DD>
|
|
<DT id="31"><A HREF="#lbAH">HISTORY</A><DD>
|
|
<DT id="32"><A HREF="#lbAI">AUTHORS</A><DD>
|
|
<DT id="33"><A HREF="#lbAJ">COPYRIGHT</A><DD>
|
|
<DT id="34"><A HREF="#lbAK">SEE ALSO</A><DD>
|
|
<DT id="35"><A HREF="#lbAL">AVAILABILITY</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:06:15 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|