]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.sbin/efiwake/efiwake.8
dwc: Rename if_dwc.h to dwc1000_reg.h
[FreeBSD/FreeBSD.git] / usr.sbin / efiwake / efiwake.8
1 .\"
2 .\" SPDX-License-Identifier: BSD-2-Clause
3 .\"
4 .\" Copyright (c) 2023 Johannes Totz
5 .\"
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
8 .\" are met:
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\"    notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\"    notice, this list of conditions and the following disclaimer in the
13 .\"    documentation and/or other materials provided with the distribution.
14 .\"
15 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 .\" SUCH DAMAGE.
26 .\"
27 .Dd May 9, 2023
28 .Dt EFIWAKE 8
29 .Os
30 .Sh NAME
31 .Nm efiwake
32 .Nd manipulate the EFI wake timer
33 .Sh SYNOPSIS
34 .Nm
35 .Nm
36 .Fl d
37 .Nm
38 .Fl e Ar yyyy-mm-ddThh:mm:ss
39 .Sh DESCRIPTION
40 .Nm
41 reports the current value of, disables or enables the EFI wake timer that can
42 wake your machine from S3 sleep at a given time.
43 .Pp
44 If invoked without arguments, the current EFI time and the current value of the
45 wake timer will be printed, followed by an
46 .Em enabled
47 status and a
48 .Em pending
49 status.
50 EFI time is supposed to be in UTC.
51 Note that it can be out of sync with kernel time.
52 The pending status tells whether the wake timer fired recently; it is cleared
53 upon reading.
54 .Pp
55 If invoked with the
56 .Sy -d
57 option, the wake timer is reset and disabled.
58 .Pp
59 If invoked with the
60 .Sy -e
61 option, the wake timer is set to the given time and date.
62 If the date or time is invalid, an error is returned.
63 .Pp
64 The current EFI time is always printed.
65 .Sh EXAMPLES
66 Without arguments:
67 .Bd -literal -offset indent
68 # efiwake
69 Current EFI time: 2023-05-04T15:30:45
70 EFI wake time: 2023-05-04T10:00:00; enabled=0, pending=1
71 .Ed
72 .Pp
73 Disabling and resetting the wake timer:
74 .Bd -literal -offset indent
75 # efiwake -d
76 Current EFI time: 2023-05-04T15:32:16
77 EFI wake time: 2023-05-04T15:32:16; enabled=0, pending=0
78 .Ed
79 .Pp
80 Enabling the wake timer with a valid date:
81 .Bd -literal -offset indent
82 # efiwake -e 2023-05-04T15:35:00
83 Current EFI time: 2023-05-04T15:34:05
84 EFI wake time: 2023-05-04T15:35:00; enabled=1, pending=0
85 .Ed
86 .Pp
87 Trying to enable with an invalid date (there is no 31st of April):
88 .Bd -literal -offset indent
89 # efiwake -e 2023-04-31T15:35:00
90 Current EFI time: 2023-05-04T15:35:25
91 efiwake: cannot enable EFI wake time: Invalid argument
92 .Ed
93 .Sh AUTHORS
94 .An -nosplit
95 The tool and manual page were written by
96 .An Johannes Totz Aq Mt jo@bruelltuete.com .
97 .Sh BUGS
98 The quality of EFI implementations differs widely.
99 Corruption of the wake-up date has been observed on real hardware.