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