1RTCWAKE(8)                   System Administration                  RTCWAKE(8)
2
3
4

NAME

6       rtcwake - enter a system sleep state until specified wakeup time
7

SYNOPSIS

9       rtcwake [options] [-d device] [-m standby_mode] {-s seconds|-t time_t}
10

DESCRIPTION

12       This program is used to enter a system sleep state and to automatically
13       wake from it at a specified time.
14
15       This uses cross-platform Linux interfaces to enter a system sleep
16       state, and leave it no later than a specified time. It uses any RTC
17       framework driver that supports standard driver model wakeup flags.
18
19       This is normally used like the old apmsleep utility, to wake from a
20       suspend state like ACPI S1 (standby) or S3 (suspend-to-RAM). Most
21       platforms can implement those without analogues of BIOS, APM, or ACPI.
22
23       On some systems, this can also be used like nvram-wakeup, waking from
24       states like ACPI S4 (suspend to disk). Not all systems have persistent
25       media that are appropriate for such suspend modes.
26
27       Note that alarm functionality depends on hardware; not every RTC is
28       able to setup an alarm up to 24 hours in the future.
29
30       The suspend setup may be interrupted by active hardware; for example
31       wireless USB input devices that continue to send events for some
32       fraction of a second after the return key is pressed. rtcwake tries to
33       avoid this problem and it waits to the terminal to settle down before
34       entering a system sleep.
35

OPTIONS

37       -A, --adjfile file
38           Specify an alternative path to the adjust file.
39
40       -a, --auto
41           Read the clock mode (whether the hardware clock is set to UTC or
42           local time) from the adjtime file, where hwclock(8) stores that
43           information. This is the default.
44
45       --date timestamp
46           Set the wakeup time to the value of the timestamp. Format of the
47           timestamp can be any of the following:
48
49       ┌────────────────────┬───────────────────────────┐
50       │                    │                           │
51       │YYYYMMDDhhmmss      │                           │
52       ├────────────────────┼───────────────────────────┤
53       │                    │                           │
54       │YYYY-MM-DD hh:mm:ss │                           │
55       ├────────────────────┼───────────────────────────┤
56       │                    │                           │
57       │YYYY-MM-DD hh:mm    │ (seconds will be set to   │
58       │                    │ 00)                       │
59       ├────────────────────┼───────────────────────────┤
60       │                    │                           │
61       │YYYY-MM-DD          │ (time will be set to      │
62       │                    │ 00:00:00)                 │
63       ├────────────────────┼───────────────────────────┤
64       │                    │                           │
65       │hh:mm:ss            │ (date will be set to      │
66       │                    │ today)                    │
67       ├────────────────────┼───────────────────────────┤
68       │                    │                           │
69       │hh:mm               │ (date will be set to      │
70       │                    │ today, seconds to 00)     │
71       ├────────────────────┼───────────────────────────┤
72       │                    │                           │
73       │tomorrow            │ (time is set to 00:00:00) │
74       ├────────────────────┼───────────────────────────┤
75       │                    │                           │
76       │+5min               │                           │
77       └────────────────────┴───────────────────────────┘
78
79       -d, --device device
80           Use the specified device instead of rtc0 as realtime clock. This
81           option is only relevant if your system has more than one RTC. You
82           may specify rtc1, rtc2, ... here.
83
84       -l, --local
85           Assume that the hardware clock is set to local time, regardless of
86           the contents of the adjtime file.
87
88       --list-modes
89           List available --mode option arguments.
90
91       -m, --mode mode
92           Go into the given standby state. Valid values for mode are:
93
94           standby
95               ACPI state S1. This state offers minimal, though real, power
96               savings, while providing a very low-latency transition back to
97               a working system. This is the default mode.
98
99           freeze
100               The processes are frozen, all the devices are suspended and all
101               the processors idled. This state is a general state that does
102               not need any platform-specific support, but it saves less power
103               than Suspend-to-RAM, because the system is still in a running
104               state. (Available since Linux 3.9.)
105
106           mem
107               ACPI state S3 (Suspend-to-RAM). This state offers significant
108               power savings as everything in the system is put into a
109               low-power state, except for memory, which is placed in
110               self-refresh mode to retain its contents.
111
112           disk
113               ACPI state S4 (Suspend-to-disk). This state offers the greatest
114               power savings, and can be used even in the absence of low-level
115               platform support for power management. This state operates
116               similarly to Suspend-to-RAM, but includes a final step of
117               writing memory contents to disk.
118
119           off
120               ACPI state S5 (Poweroff). This is done by calling
121               '/sbin/shutdown'. Not officially supported by ACPI, but it
122               usually works.
123
124           no
125               Don’t suspend, only set the RTC wakeup time.
126
127           on
128               Don’t suspend, but read the RTC device until an alarm time
129               appears. This mode is useful for debugging.
130
131           disable
132               Disable a previously set alarm.
133
134           show
135               Print alarm information in format: "alarm: off|on <time>". The
136               time is in ctime() output format, e.g., "alarm: on Tue Nov 16
137               04:48:45 2010".
138
139       -n, --dry-run
140           This option does everything apart from actually setting up the
141           alarm, suspending the system, or waiting for the alarm.
142
143       -s, --seconds seconds
144           Set the wakeup time to seconds in the future from now.
145
146       -t, --time time_t
147           Set the wakeup time to the absolute time time_t. time_t is the time
148           in seconds since 1970-01-01, 00:00 UTC. Use the date(1) tool to
149           convert between human-readable time and time_t.
150
151       -u, --utc
152           Assume that the hardware clock is set to UTC (Universal Time
153           Coordinated), regardless of the contents of the adjtime file.
154
155       -v, --verbose
156           Be verbose.
157
158       -h, --help
159           Display help text and exit.
160
161       -V, --version
162           Print version and exit.
163

NOTES

165       Some PC systems can’t currently exit sleep states such as mem using
166       only the kernel code accessed by this driver. They need help from
167       userspace code to make the framebuffer work again.
168

FILES

170       /etc/adjtime
171

HISTORY

173       The program was posted several times on LKML and other lists before
174       appearing in kernel commit message for Linux 2.6 in the GIT commit
175       87ac84f42a7a580d0dd72ae31d6a5eb4bfe04c6d.
176

AUTHORS

178       The program was written by David Brownell
179       <dbrownell@users.sourceforge.net> and improved by Bernhard Walle
180       <bwalle@suse.de>.
181
183       This is free software. You may redistribute copies of it under the
184       terms of the GNU General Public License
185       <http://www.gnu.org/licenses/gpl.html>. There is NO WARRANTY, to the
186       extent permitted by law.
187

SEE ALSO

189       adjtime_config(5), hwclock(8), date(1)
190

REPORTING BUGS

192       For bug reports, use the issue tracker at
193       https://github.com/util-linux/util-linux/issues.
194

AVAILABILITY

196       The rtcwake command is part of the util-linux package which can be
197       downloaded from Linux Kernel Archive
198       <https://www.kernel.org/pub/linux/utils/util-linux/>.
199
200
201
202util-linux 2.38                   2022-02-17                        RTCWAKE(8)
Impressum