]> git.proxmox.com Git - systemd.git/blame - man/systemd-suspend.service.html
Imported Upstream version 219
[systemd.git] / man / systemd-suspend.service.html
CommitLineData
663996b3
MS
1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>systemd-suspend.service</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
2 a.headerlink {
3 color: #c60f0f;
4 font-size: 0.8em;
5 padding: 0 4px 0 4px;
6 text-decoration: none;
7 visibility: hidden;
8 }
9
10 a.headerlink:hover {
11 background-color: #c60f0f;
12 color: white;
13 }
14
15 h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
16 visibility: visible;
17 }
18 </style><a href="index.html">Index </a>·
19 <a href="systemd.directives.html">Directives </a>·
20 <a href="../python-systemd/index.html">Python </a>·
21 <a href="../libudev/index.html">libudev </a>·
e735f4d4
MP
22 <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="systemd-suspend.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-suspend.service, systemd-hibernate.service, systemd-hybrid-sleep.service, systemd-sleep — System sleep state logic</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-suspend.service</code></p><p><code class="filename">systemd-hibernate.service</code></p><p><code class="filename">systemd-hybrid-sleep.service</code></p><p><code class="filename">/usr/lib/systemd/system-sleep</code></p></div><div class="refsect1"><a name="idm140595851644208"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-suspend.service</code> is a system
23 service that is pulled in by <code class="filename">suspend.target</code>
24 and is responsible for the actual system suspend. Similarly,
25 <code class="filename">systemd-hibernate.service</code> is pulled in by
26 <code class="filename">hibernate.target</code> to execute the actual
27 hibernation. Finally,
28 <code class="filename">systemd-hybrid-sleep.service</code> is pulled in by
29 <code class="filename">hybrid-sleep.target</code> to execute hybrid
30 hibernation with system suspend.</p><p>Immediately before entering system suspend and/or
31 hibernation <code class="filename">systemd-suspend.service</code> (and the
32 other mentioned units, respectively) will run all executables in
33 <code class="filename">/usr/lib/systemd/system-sleep/</code> and pass two
34 arguments to them. The first argument will be
35 "<code class="literal">pre</code>", the second either
36 "<code class="literal">suspend</code>", "<code class="literal">hibernate</code>", or
37 "<code class="literal">hybrid-sleep</code>" depending on the chosen action.
38 Immediately after leaving system suspend and/or hibernation the
39 same executables are run, but the first argument is now
40 "<code class="literal">post</code>". All executables in this directory are
41 executed in parallel, and execution of the action is not continued
42 until all executables have finished.</p><p>Note that scripts or binaries dropped in
43 <code class="filename">/usr/lib/systemd/system-sleep/</code> are intended
44 for local use only and should be considered hacks. If applications
45 want to be notified of system suspend/hibernation and resume,
46 there are much nicer interfaces available.</p><p>Note that
47 <code class="filename">systemd-suspend.service</code>,
48 <code class="filename">systemd-hibernate.service</code>, and
49 <code class="filename">systemd-hybrid-sleep.service</code>
50 should never be executed directly. Instead, trigger system sleep
51 states with a command such as "<code class="literal">systemctl suspend</code>"
52 or similar.</p><p>Internally, this service will echo a string like
53 "<code class="literal">mem</code>" into <code class="filename">/sys/power/state</code>,
54 to trigger the actual system suspend. What exactly is written
55 where can be configured in the "<code class="literal">[Sleep]</code>" section
56 of <code class="filename">/etc/systemd/sleep.conf</code> or a
57 <code class="filename">sleep.conf.d</code> file. See
58 <a href="systemd-sleep.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-sleep.conf</span>(5)</span></a>.
59 </p></div><div class="refsect1"><a name="idm140595855526128"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p><span class="command"><strong>systemd-sleep</strong></span> understands the
60 following commands:</p><div class="variablelist"><dl class="variablelist"><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
61 </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd><dt id="suspend"><span class="term"><code class="option">suspend</code>, </span><span class="term"><code class="option">hibernate</code>, </span><span class="term"><code class="option">hybrid-sleep</code></span><a class="headerlink" title="Permalink to this term" href="#suspend">¶</a></dt><dd><p>Suspend, hibernate, or put the system to
62 hybrid sleep.</p></dd></dl></div></div><div class="refsect1"><a name="idm140595855519600"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
63 <a href="systemd-sleep.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-sleep.conf</span>(5)</span></a>,
64 <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
65 <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
66 <a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a>,
67 <a href="systemd-halt.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-halt.service</span>(8)</span></a>
68 </p></div></div></body></html>