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