]> git.ipfire.org Git - thirdparty/util-linux.git/blame - sys-utils/rtcwake.8.in
chcpu: fix memory leak
[thirdparty/util-linux.git] / sys-utils / rtcwake.8.in
CommitLineData
76700389
BW
1.\" Copyright (c) 2007, SUSE LINUX Products GmbH
2.\" Bernhard Walle <bwalle@suse.de>
3.\"
4.\" This program is free software; you can redistribute it and/or
5.\" modify it under the terms of the GNU General Public License
6.\" as published by the Free Software Foundation; either version 2
7.\" of the License, or (at your option) any later version.
8.\"
9.\" This program is distributed in the hope that it will be useful,
10.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
11.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12.\" GNU General Public License for more details.
13.\"
14.\" You should have received a copy of the GNU General Public License
15.\" along with this program; if not, write to the Free Software
16.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17.\" 02110-1301, USA.
18.\"
43a44bfc 19.TH RTCWAKE 8 "June 2015" "util-linux" "System Administration"
76700389 20.SH NAME
61ef38eb 21rtcwake \- enter a system sleep state until specified wakeup time
76700389 22.SH SYNOPSIS
1955cf60 23.B rtcwake
61ef38eb 24[options]
1955cf60
PB
25.RB [ \-d
26.IR device ]
27.RB [ \-m
28.IR standby_mode ]
61ef38eb 29.RB { "\-s \fIseconds\fP" | "\-t \fItime_t\fP" }
76700389 30.SH DESCRIPTION
61ef38eb
BS
31This program is used to enter a system sleep state and to automatically
32wake from it at a specified time.
76700389
BW
33.PP
34This uses cross-platform Linux interfaces to enter a system sleep state, and
35leave it no later than a specified time. It uses any RTC framework driver that
36supports standard driver model wakeup flags.
37.PP
38This is normally used like the old \fBapmsleep\fP utility, to wake from a suspend
39state like ACPI S1 (standby) or S3 (suspend-to-RAM). Most platforms can
40implement those without analogues of BIOS, APM, or ACPI.
61ef38eb 41.PP
76700389
BW
42On some systems, this can also be used like \fBnvram-wakeup\fP, waking from states
43like ACPI S4 (suspend to disk). Not all systems have persistent media that are
44appropriate for such suspend modes.
82e8ddac
KZ
45.PP
46Note that alarm functionality depends on hardware; not every RTC is able to setup
47an alarm up to 24 hours in the future.
a85c3901
KZ
48.PP
49The suspend setup maybe be interrupted by active hardware; for example wireless USB
50input devices that continue to send events for some fraction of a second after the
c8ff2e55 51return key is pressed.
559ee54a 52.B rtcwake
c8ff2e55
SK
53tries to avoid this problem and it waits to terminal to settle down before
54entering a system sleep.
55
61ef38eb 56.SH OPTIONS
76700389 57.TP
61ef38eb
BS
58.BR \-A , " \-\-adjfile " \fIfile
59Specify an alternative path to the adjust file.
76700389 60.TP
61ef38eb
BS
61.BR \-a , " \-\-auto"
62Read the clock mode (whether the hardware clock is set to UTC or local time)
63from the \fIadjtime\fP file, where
1955cf60 64.BR hwclock (8)
61ef38eb 65stores that information. This is the default.
76700389 66.TP
a10ce9a3
SK
67.BR \-\-date " \fItimestamp"
68Set the wakeup time to the value of the timestamp. Format of the
73afd3f8 69timestamp can be any of the following:
a10ce9a3
SK
70.TS
71tab(|);
934a6fa8 72l2 l.
a10ce9a3
SK
73YYYYMMDDhhmmss
74YYYY-MM-DD hh:mm:ss
75YYYY-MM-DD hh:mm|(seconds will be set to 00)
76YYYY-MM-DD|(time will be set to 00:00:00)
77hh:mm:ss|(date will be set to today)
78hh:mm|(date will be set to today, seconds to 00)
79tomorrow|(time is set to 00:00:00)
80+5min
81.TE
82.TP
61ef38eb
BS
83.BR \-d , " \-\-device " \fIdevice
84Use the specified \fIdevice\fP instead of \fBrtc0\fP as realtime clock.
85This option is only relevant if your system has more than one RTC.
86You may specify \fBrtc1\fP, \fBrtc2\fP, ... here.
76700389 87.TP
61ef38eb
BS
88.BR \-l , " \-\-local"
89Assume that the hardware clock is set to local time, regardless of the
90contents of the \fIadjtime\fP file.
76700389 91.TP
43a44bfc
SK
92.B \-\-list\-modes
93List available \-\-mode option arguments.
94.TP
61ef38eb
BS
95.BR \-m , " \-\-mode " \fImode
96Go into the given standby state. Valid values for \fImode\fP are:
8e88e8fc
KZ
97.RS
98.TP
99.B standby
61ef38eb
BS
100ACPI state S1. This state offers minimal, though real, power savings, while
101providing a very low-latency transition back to a working system. This is the
8e88e8fc
KZ
102default mode.
103.TP
61ef38eb
BS
104.B freeze
105The processes are frozen, all the devices are suspended and all the processors
106idled. This state is a general state that does not need any platform-specific
107support, but it saves less power than Suspend-to-RAM, because the system is
108still in a running state. (Available since Linux 3.9.)
109.TP
8e88e8fc 110.B mem
61ef38eb 111ACPI state S3 (Suspend-to-RAM). This state offers significant power savings as
8e88e8fc
KZ
112everything in the system is put into a low-power state, except for memory,
113which is placed in self-refresh mode to retain its contents.
114.TP
115.B disk
61ef38eb 116ACPI state S4 (Suspend-to-disk). This state offers the greatest power savings,
8e88e8fc 117and can be used even in the absence of low-level platform support for power
61ef38eb 118management. This state operates similarly to Suspend-to-RAM, but includes a
8e88e8fc
KZ
119final step of writing memory contents to disk.
120.TP
77f5744c 121.B off
61ef38eb
BS
122ACPI state S5 (Poweroff). This is done by calling '/sbin/shutdown'.
123Not officially supported by ACPI, but it usually works.
77f5744c 124.TP
8e88e8fc 125.B no
61ef38eb 126Don't suspend, only set the RTC wakeup time.
8e88e8fc
KZ
127.TP
128.B on
61ef38eb
BS
129Don't suspend, but read the RTC device until an alarm time appears.
130This mode is useful for debugging.
bb8b11f1
MO
131.TP
132.B disable
61ef38eb 133Disable a previously set alarm.
fcf67294
MO
134.TP
135.B show
136Print alarm information in format: "alarm: off|on <time>".
137The time is in ctime() output format, e.g. "alarm: on Tue Nov 16 04:48:45 2010".
a0d4e9d9 138.RE
61ef38eb
BS
139.TP
140.BR \-n , " \-\-dry-run"
141This option does everything apart from actually setting up the alarm,
142suspending the system, or waiting for the alarm.
143.TP
144.BR \-s , " \-\-seconds " \fIseconds
145Set the wakeup time to \fIseconds\fP in the future from now.
146.TP
147.BR \-t , " \-\-time " \fItime_t
148Set the wakeup time to the absolute time \fItime_t\fP. \fItime_t\fP
149is the time in seconds since 1970-01-01, 00:00 UTC. Use the
150.BR date (1)
151tool to convert between human-readable time and \fItime_t\fP.
152.TP
153.BR \-u , " \-\-utc"
154Assume that the hardware clock is set to UTC (Universal Time Coordinated),
155regardless of the contents of the \fIadjtime\fP file.
156.TP
157.BR \-v , " \-\-verbose"
158Be verbose.
159.TP
160.BR \-V , " \-\-version"
161Display version information and exit.
162.TP
163.BR \-h , " \-\-help"
164Display help text and exit.
2148b051 165.SH NOTES
61ef38eb 166Some PC systems can't currently exit sleep states such as \fBmem\fP
2148b051
DB
167using only the kernel code accessed by this driver.
168They need help from userspace code to make the framebuffer work again.
61ef38eb
BS
169.SH FILES
170.I @ADJTIME_PATH@
76700389 171.SH HISTORY
2148b051
DB
172The program was posted several times on LKML and other lists
173before appearing in kernel commit message for Linux 2.6 in the GIT
76700389 174commit 87ac84f42a7a580d0dd72ae31d6a5eb4bfe04c6d.
61ef38eb 175.SH AUTHORS
2148b051
DB
176The program was written by David Brownell <dbrownell@users.sourceforge.net>
177and improved by Bernhard Walle <bwalle@suse.de>.
76700389 178.SH COPYRIGHT
61ef38eb
BS
179This is free software. You may redistribute copies of it under the terms
180of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
76700389
BW
181There is NO WARRANTY, to the extent permitted by law.
182.SH "SEE ALSO"
183.BR hwclock (8),
184.BR date (1)
61ef38eb
BS
185.SH AVAILABILITY
186The rtcwake command is part of the util-linux package and is available from the
d673b74e 187.UR https://\:www.kernel.org\:/pub\:/linux\:/utils\:/util-linux/
61ef38eb 188Linux Kernel Archive
a10ce9a3 189.UE .