]>
Commit | Line | Data |
---|---|---|
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 | 21 | rtcwake \- 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 |
31 | This program is used to enter a system sleep state and to automatically |
32 | wake from it at a specified time. | |
76700389 BW |
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. | |
61ef38eb | 41 | .PP |
76700389 BW |
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. | |
82e8ddac KZ |
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. | |
a85c3901 KZ |
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 | |
c8ff2e55 | 51 | return key is pressed. |
559ee54a | 52 | .B rtcwake |
c8ff2e55 SK |
53 | tries to avoid this problem and it waits to terminal to settle down before |
54 | entering a system sleep. | |
55 | ||
61ef38eb | 56 | .SH OPTIONS |
76700389 | 57 | .TP |
61ef38eb BS |
58 | .BR \-A , " \-\-adjfile " \fIfile |
59 | Specify an alternative path to the adjust file. | |
76700389 | 60 | .TP |
61ef38eb BS |
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 | |
1955cf60 | 64 | .BR hwclock (8) |
61ef38eb | 65 | stores that information. This is the default. |
76700389 | 66 | .TP |
a10ce9a3 SK |
67 | .BR \-\-date " \fItimestamp" |
68 | Set the wakeup time to the value of the timestamp. Format of the | |
73afd3f8 | 69 | timestamp can be any of the following: |
a10ce9a3 SK |
70 | .TS |
71 | tab(|); | |
934a6fa8 | 72 | l2 l. |
a10ce9a3 SK |
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 | |
61ef38eb BS |
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. | |
76700389 | 87 | .TP |
61ef38eb BS |
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. | |
76700389 | 91 | .TP |
43a44bfc SK |
92 | .B \-\-list\-modes |
93 | List available \-\-mode option arguments. | |
94 | .TP | |
61ef38eb BS |
95 | .BR \-m , " \-\-mode " \fImode |
96 | Go into the given standby state. Valid values for \fImode\fP are: | |
8e88e8fc KZ |
97 | .RS |
98 | .TP | |
99 | .B standby | |
61ef38eb BS |
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 | |
8e88e8fc KZ |
102 | default mode. |
103 | .TP | |
61ef38eb BS |
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 | |
8e88e8fc | 110 | .B mem |
61ef38eb | 111 | ACPI state S3 (Suspend-to-RAM). This state offers significant power savings as |
8e88e8fc KZ |
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 | |
61ef38eb | 116 | ACPI state S4 (Suspend-to-disk). This state offers the greatest power savings, |
8e88e8fc | 117 | and can be used even in the absence of low-level platform support for power |
61ef38eb | 118 | management. This state operates similarly to Suspend-to-RAM, but includes a |
8e88e8fc KZ |
119 | final step of writing memory contents to disk. |
120 | .TP | |
77f5744c | 121 | .B off |
61ef38eb BS |
122 | ACPI state S5 (Poweroff). This is done by calling '/sbin/shutdown'. |
123 | Not officially supported by ACPI, but it usually works. | |
77f5744c | 124 | .TP |
8e88e8fc | 125 | .B no |
61ef38eb | 126 | Don't suspend, only set the RTC wakeup time. |
8e88e8fc KZ |
127 | .TP |
128 | .B on | |
61ef38eb BS |
129 | Don't suspend, but read the RTC device until an alarm time appears. |
130 | This mode is useful for debugging. | |
bb8b11f1 MO |
131 | .TP |
132 | .B disable | |
61ef38eb | 133 | Disable a previously set alarm. |
fcf67294 MO |
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". | |
a0d4e9d9 | 138 | .RE |
61ef38eb BS |
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. | |
2148b051 | 165 | .SH NOTES |
61ef38eb | 166 | Some PC systems can't currently exit sleep states such as \fBmem\fP |
2148b051 DB |
167 | using only the kernel code accessed by this driver. |
168 | They 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 |
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 | |
76700389 | 174 | commit 87ac84f42a7a580d0dd72ae31d6a5eb4bfe04c6d. |
61ef38eb | 175 | .SH AUTHORS |
2148b051 DB |
176 | The program was written by David Brownell <dbrownell@users.sourceforge.net> |
177 | and improved by Bernhard Walle <bwalle@suse.de>. | |
76700389 | 178 | .SH COPYRIGHT |
61ef38eb BS |
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>. | |
76700389 BW |
181 | There 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 |
186 | The 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 | 188 | Linux Kernel Archive |
a10ce9a3 | 189 | .UE . |