summaryrefslogtreecommitdiffstats
path: root/man/systemd-suspend.service.xml
diff options
context:
space:
mode:
authorAdrian Vovk <adrianvovk@gmail.com>2023-12-23 23:03:42 +0100
committerAdrian Vovk <adrianvovk@gmail.com>2024-03-05 18:12:35 +0100
commit0b958bb3eeae61dd25a1f6735477ea239981b162 (patch)
tree88bd54677d0a622355ea60bd5318c3d57f1d8824 /man/systemd-suspend.service.xml
parentbus-unit-util: Add utility to freeze/thaw units (diff)
downloadsystemd-0b958bb3eeae61dd25a1f6735477ea239981b162.tar.xz
systemd-0b958bb3eeae61dd25a1f6735477ea239981b162.zip
sleep: Always freeze user.slice
Previously, we'd only freeze user.slice in the case of s2h, because we didn't want the user session to resume while systemd was transitioning from suspend to hibernate. This commit extends this freezing behavior to all sleep modes. We also have an environment variable to disable the freezing behavior outright. This is a necessary workaround for someone that has hooks in /usr/lib/systemd/system-sleep/ which communicate with some process running under user.slice, or if someone is using the proprietary NVIDIA driver which breaks when user.slice is frozen (issue #27559) Fixes #27559
Diffstat (limited to 'man/systemd-suspend.service.xml')
-rw-r--r--man/systemd-suspend.service.xml9
1 files changed, 8 insertions, 1 deletions
diff --git a/man/systemd-suspend.service.xml b/man/systemd-suspend.service.xml
index d8ea8f5f81..9fbca6193f 100644
--- a/man/systemd-suspend.service.xml
+++ b/man/systemd-suspend.service.xml
@@ -66,7 +66,9 @@
same executables are run, but the first argument is now
<literal>post</literal>. All executables in this directory are
executed in parallel, and execution of the action is not continued
- until all executables have finished.</para>
+ until all executables have finished. Note that <filename>user.slice</filename> will
+ be frozen while the executables are running, so they should not attempt to
+ communicate with any user services expecting a reply.</para>
<para>Note that scripts or binaries dropped in
<filename>/usr/lib/systemd/system-sleep/</filename> are intended
@@ -90,6 +92,11 @@
<filename>sleep.conf.d</filename> file. See
<citerefentry><refentrytitle>systemd-sleep.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
</para>
+
+ <para>Note that by default these services freeze <filename>user.slice</filename> while they run. This prevents
+ the execution of any process in any of the user sessions while the system is entering into and resuming from
+ sleep. Thus, this prevents the hooks in <filename>/usr/lib/systemd/system-sleep/</filename>, or any other process
+ for that matter, from communicating with any user session process during sleep.</para>
</refsect1>
<refsect1>