Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F133125104
D39961.id121527.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D39961.id121527.diff
View Options
diff --git a/usr.sbin/efiwake/Makefile b/usr.sbin/efiwake/Makefile
--- a/usr.sbin/efiwake/Makefile
+++ b/usr.sbin/efiwake/Makefile
@@ -3,7 +3,7 @@
PACKAGE= efi-tools
PROG= efiwake
-MAN=
+MAN= efiwake.8
SRCS= efiwake.c
diff --git a/usr.sbin/efiwake/efiwake.8 b/usr.sbin/efiwake/efiwake.8
new file mode 100644
--- /dev/null
+++ b/usr.sbin/efiwake/efiwake.8
@@ -0,0 +1,98 @@
+.\"
+.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+.\"
+.\" Copyright (c) 2023 Johannes Totz
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd May 4, 2023
+.Dt EFIWAKE 8
+.Os
+.Sh NAME
+.Nm efiwake
+.Nd manipulate the EFI wake timer
+.Sh SYNOPSIS
+.Nm
+.Op Fl d | e Ar yyyy-mm-ddThh:mm:ss
+.Sh DESCRIPTION
+.Nm
+reports the current value of, disables or enables the EFI wake timer that can
+wake up your machine from S3 sleep at a given time.
+.Pp
+If invoked without arguments the current EFI time and the current value of the
+wake timer will be printed, followed by an
+.Em enabled
+status and a
+.Em pending
+status.
+EFI time is supposed to be in UTC.
+Note that it can be out of sync with kernel time.
+The pending status tells whether the wake timer fired recently; it is cleared
+upon reading it.
+.Pp
+If invoked with the
+.Sy -d
+option the wake timer is reset and disabled.
+.Pp
+If invoked with the
+.Sy -e
+option the wake timer is programmed to the supplied time and date.
+If the date is invalid somehow an error is returned.
+.Pp
+In any case the current EFI time is always printed.
+.Sh EXAMPLES
+Without arguments:
+.Bd -literal -offset indent
+# efiwake
+Current EFI time: 2023-05-04T15:30:45
+EFI wake time: 2023-05-04T10:00:00; enabled=0, pending=1
+.Ed
+.Pp
+Disabling and resetting the wake timer:
+.Bd -literal -offset indent
+# efiwake -d
+Current EFI time: 2023-05-04T15:32:16
+EFI wake time: 2023-05-04T15:32:16; enabled=0, pending=0
+.Ed
+.Pp
+Enabling the wake timer with a valid date:
+.Bd -literal -offset indent
+# efiwake -e 2023-05-04T15:35:00
+Current EFI time: 2023-05-04T15:34:05
+EFI wake time: 2023-05-04T15:35:00; enabled=1, pending=0
+.Ed
+.Pp
+Trying to enable with an invalid date (there is no 31st of April):
+.Bd -literal -offset indent
+# efiwake -e 2023-04-31T15:35:00
+Current EFI time: 2023-05-04T15:35:25
+efiwake: cannot enable EFI wake time: Invalid argument
+.Ed
+.Sh AUTHORS
+.An -nosplit
+The tool and manual page were written by
+.An Johannes Totz .
+.Sh BUGS
+The quality of EFI implementations differs widely.
+Problems with corrupting the wake-up date have been observed on real hardware.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Oct 24, 4:31 AM (3 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
24119200
Default Alt Text
D39961.id121527.diff (3 KB)
Attached To
Mode
D39961: efiwake(8): add man page
Attached
Detach File
Event Timeline
Log In to Comment