[GTALUG] TIL: rtcwake / wakealarm

Giles Orr gilesorr at gmail.com
Sun Apr 11 14:28:43 EDT 2021


On Fri, 9 Apr 2021 at 22:23, Stewart C. Russell via talk
<talk at gtalug.org> wrote:
> This may be old news to many of you, but today I learned you can have the computer's real time clock boot your machine at a specific time. The more proper way seems to be to use the 'rtcwake' command, but you can also do it by writing the timestamp of the startup time to /sys/class/rtc/rtc0/wakealarm
>
> Some more details of the /sys method - https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=309093&p=1849326&sid=ca7a14f7d160f929378be4691b1aed9e#p1849291

This sounded pretty useful to me too, so I thought I'd try it out on
an old netbook.  I decided to use the netbook before messing about
with power events on a computer I cared about.

    # rtcwake --date +5min --mode mem

I chose "--mode mem" because this machine has often and successfully
been suspended to RAM.  The machine started flashing the power button
orange as soon as I ran the command, which means "suspended-to-RAM."
Five minutes later the power button turned steady blue again.  But the
screen remained off, and didn't wake on many keypresses.  Including
even on the power button.  The machine was also not on the network,
un-pingable.  In the end, it was the five second press on the power
button to kill it completely.

This has left me reluctant to try this on any other machine.
Presumably it would work fine on a Raspberry Pi as it came from a Pi
forum and they're a fairly homogeneous form of hardware.  But my one
attempt doesn't recommend this ...

-- 
Giles
https://www.gilesorr.com/
gilesorr at gmail.com


More information about the talk mailing list