summaryrefslogtreecommitdiffstats
path: root/man/systemd-hibernate-resume.service.xml
diff options
context:
space:
mode:
authorMike Yuan <me@yhndnzj.com>2024-03-31 14:52:39 +0200
committerMike Yuan <me@yhndnzj.com>2024-04-03 16:07:43 +0200
commitdfad86b83807fa8696ca94982a5ba591b6d86a80 (patch)
tree1946fe262e29d7c26012ebb48aca1587ef12f532 /man/systemd-hibernate-resume.service.xml
parenthibernate-resume: introduce --clear for clearing hibernate storage var (diff)
downloadsystemd-dfad86b83807fa8696ca94982a5ba591b6d86a80.tar.xz
systemd-dfad86b83807fa8696ca94982a5ba591b6d86a80.zip
units: introduce systemd-hibernate-clear.service that clears
stale HibernateLocation EFI variable Currently, if the HibernateLocation EFI variable exists, but we failed to resume from it, the boot carries on without clearing the stale variable. Therefore, the subsequent boots would still be waiting for the device timeout, unless the variable is purged manually. There's no point to keep trying to resume after a successful switch-root, because the hibernation image state would have been invalidated by then. OTOH, we don't want to clear the variable prematurely either, i.e. in initrd, since if the resume device is the same as root one, the boot won't succeed and the user might be able to try resuming again. So, let's introduce a unit that only runs after switch-root and clears the var. Fixes #32021
Diffstat (limited to 'man/systemd-hibernate-resume.service.xml')
-rw-r--r--man/systemd-hibernate-resume.service.xml8
1 files changed, 8 insertions, 0 deletions
diff --git a/man/systemd-hibernate-resume.service.xml b/man/systemd-hibernate-resume.service.xml
index f6cdefdd3a..c0c545cc9c 100644
--- a/man/systemd-hibernate-resume.service.xml
+++ b/man/systemd-hibernate-resume.service.xml
@@ -17,12 +17,14 @@
<refnamediv>
<refname>systemd-hibernate-resume.service</refname>
+ <refname>systemd-hibernate-clear.service</refname>
<refname>systemd-hibernate-resume</refname>
<refpurpose>Resume from hibernation</refpurpose>
</refnamediv>
<refsynopsisdiv>
<para><filename>systemd-hibernate-resume.service</filename></para>
+ <para><filename>systemd-hibernate-clear.service</filename></para>
<para><filename>/usr/lib/systemd/systemd-hibernate-resume</filename></para>
</refsynopsisdiv>
@@ -37,6 +39,12 @@
<filename>/sys/power/resume</filename>, along with the offset in memory pages
(<filename>/sys/power/resume_offset</filename>) if supported.</para>
+ <para>The resume device node is either passed directly through arguments, or automatically acquired
+ from kernel command line options and/or <varname>HibernateLocation</varname> EFI variable. The latter
+ will normally be cleared by <filename>systemd-hibernate-resume.service</filename> on resumption.
+ If a stale variable is detected, it would be cleared by
+ <filename>systemd-hibernate-clear.service</filename>.</para>
+
<para>Failing to initiate a resume is not an error condition. It may mean that there was
no resume image (e. g. if the system has been simply powered off and not hibernated).
In such cases, the boot is ordinarily continued.</para>