chiark / gitweb /
man: document systemd-suspend.service
[elogind.git] / man / systemd-suspend.service.xml
1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3         "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4
5 <!--
6   This file is part of systemd.
7
8   Copyright 2012 Lennart Poettering
9
10   systemd is free software; you can redistribute it and/or modify it
11   under the terms of the GNU Lesser General Public License as published by
12   the Free Software Foundation; either version 2.1 of the License, or
13   (at your option) any later version.
14
15   systemd is distributed in the hope that it will be useful, but
16   WITHOUT ANY WARRANTY; without even the implied warranty of
17   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18   Lesser General Public License for more details.
19
20   You should have received a copy of the GNU Lesser General Public License
21   along with systemd; If not, see <http://www.gnu.org/licenses/>.
22 -->
23
24 <refentry id="systemd-suspend.service">
25
26         <refentryinfo>
27                 <title>systemd-suspend.service</title>
28                 <productname>systemd</productname>
29
30                 <authorgroup>
31                         <author>
32                                 <contrib>Developer</contrib>
33                                 <firstname>Lennart</firstname>
34                                 <surname>Poettering</surname>
35                                 <email>lennart@poettering.net</email>
36                         </author>
37                 </authorgroup>
38         </refentryinfo>
39
40         <refmeta>
41                 <refentrytitle>systemd-suspend.service</refentrytitle>
42                 <manvolnum>8</manvolnum>
43         </refmeta>
44
45         <refnamediv>
46                 <refname>systemd-suspend.service</refname>
47                 <refname>systemd-hibernate.service</refname>
48                 <refname>systemd-sleep</refname>
49                 <refpurpose>systemd System Suspend/Hibernate Logic</refpurpose>
50         </refnamediv>
51
52         <refsynopsisdiv>
53                 <para><filename>systemd-suspend.service</filename></para>
54                 <para><filename>systemd-hibernate.service</filename></para>
55                 <para><filename>/usr/lib/systemd/systemd-sleep</filename></para>
56         </refsynopsisdiv>
57
58         <refsect1>
59                 <title>Description</title>
60
61                 <para><filename>systemd-suspend.service</filename> is
62                 a system service that is pulled in by
63                 <filename>suspend.target</filename> and is responsible
64                 for the actual system suspend. Similar,
65                 <filename>systemd-hibernate.service</filename> is
66                 pulled in by <filename>hibernate.target</filename> to
67                 executed the actual hibernation.</para>
68
69                 <para>Immediately before entering system suspend and
70                 hibernation
71                 <filename>systemd-suspend.service</filename> will run
72                 all executables in
73                 <filename>/usr/lib/systemd/system-sleep/</filename>
74                 and pass two arguments to them. The first argument
75                 will be "<literal>pre</literal>", the second either
76                 "<literal>suspend</literal>" or
77                 "<literal>hibernate</literal>", depending on the chosen
78                 action. Immediately after leaving system suspend and
79                 hibernation the same executables are run, but the
80                 first argument is now "<literal>post</literal>". All
81                 executables in this directory are executed in
82                 parallel, and execution of the action is not continued
83                 before all executables finished.</para>
84
85                 <para>Note that scripts or binaries dropped in
86                 <filename>/usr/lib/systemd/system-sleep/</filename>
87                 are intended for local use only and should be
88                 considered hacks. If applications want to be notified
89                 of system suspend and resume there are much nicer
90                 interfaces available.</para>
91
92         </refsect1>
93
94         <refsect1>
95                 <title>See Also</title>
96                 <para>
97                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
98                         <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>
99                         <citerefentry><refentrytitle>systemd-halt.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
100                 </para>
101         </refsect1>
102
103 </refentry>