chiark / gitweb /
man: typo fixes
[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>System sleep state 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                 execute 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
78                 chosen action. Immediately after leaving system
79                 suspend and hibernation the same executables are run,
80                 but the first argument is now
81                 "<literal>post</literal>". All executables in this
82                 directory are executed in parallel, and execution of
83                 the action is not continued before all executables
84                 finished.</para>
85
86                 <para>Note that scripts or binaries dropped in
87                 <filename>/usr/lib/systemd/system-sleep/</filename>
88                 are intended for local use only and should be
89                 considered hacks. If applications want to be notified
90                 of system suspend and resume there are much nicer
91                 interfaces available.</para>
92
93                 <para>Note that
94                 <filename>systemd-suspend.service</filename> and
95                 <filename>systemd-hibernate.service</filename> should
96                 never be executed directly. Instead, trigger system
97                 sleep states with a command such as "<literal>systemctl
98                 suspend</literal>" or suchlike.</para>
99         </refsect1>
100
101         <refsect1>
102                 <title>See Also</title>
103                 <para>
104                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
105                         <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
106                         <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
107                         <citerefentry><refentrytitle>systemd-halt.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
108                 </para>
109         </refsect1>
110
111 </refentry>