summaryrefslogtreecommitdiff
path: root/man/systemd-hybrid-sleep.service.html
blob: c5d6a06b2b8ab1d1a6a8c54c44148e75c3e093ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<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>
    a.headerlink {
      color: #c60f0f;
      font-size: 0.8em;
      padding: 0 4px 0 4px;
      text-decoration: none;
      visibility: hidden;
    }

    a.headerlink:hover {
      background-color: #c60f0f;
      color: white;
    }

    h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
      visibility: visible;
    }
  </style><a href="index.html">Index </a>·
  <a href="systemd.directives.html">Directives </a>·
  <a href="../python-systemd/index.html">Python </a>·

  <span style="float:right">systemd 221</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="idm47028235926912"></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
    service that is pulled in by <code class="filename">suspend.target</code>
    and is responsible for the actual system suspend. Similarly,
    <code class="filename">systemd-hibernate.service</code> is pulled in by
    <code class="filename">hibernate.target</code> to execute the actual
    hibernation. Finally,
    <code class="filename">systemd-hybrid-sleep.service</code> is pulled in by
    <code class="filename">hybrid-sleep.target</code> to execute hybrid
    hibernation with system suspend.</p><p>Immediately before entering system suspend and/or
    hibernation <code class="filename">systemd-suspend.service</code> (and the
    other mentioned units, respectively) will run all executables in
    <code class="filename">/usr/lib/systemd/system-sleep/</code> and pass two
    arguments to them. The first argument will be
    "<code class="literal">pre</code>", the second either
    "<code class="literal">suspend</code>", "<code class="literal">hibernate</code>", or
    "<code class="literal">hybrid-sleep</code>" depending on the chosen action.
    Immediately after leaving system suspend and/or hibernation the
    same executables are run, but the first argument is now
    "<code class="literal">post</code>". All executables in this directory are
    executed in parallel, and execution of the action is not continued
    until all executables have finished.</p><p>Note that scripts or binaries dropped in
    <code class="filename">/usr/lib/systemd/system-sleep/</code> are intended
    for local use only and should be considered hacks. If applications
    want to be notified of system suspend/hibernation and resume,
    there are much nicer interfaces available.</p><p>Note that
    <code class="filename">systemd-suspend.service</code>,
    <code class="filename">systemd-hibernate.service</code>, and
    <code class="filename">systemd-hybrid-sleep.service</code>
    should never be executed directly. Instead, trigger system sleep
    states with a command such as "<code class="literal">systemctl suspend</code>"
    or similar.</p><p>Internally, this service will echo a string like
    "<code class="literal">mem</code>" into <code class="filename">/sys/power/state</code>,
    to trigger the actual system suspend. What exactly is written
    where can be configured in the "<code class="literal">[Sleep]</code>" section
    of <code class="filename">/etc/systemd/sleep.conf</code> or a
    <code class="filename">sleep.conf.d</code> file. See
    <a href="systemd-sleep.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-sleep.conf</span>(5)</span></a>.
    </p></div><div class="refsect1"><a name="idm47028230950272"></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
    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.
    </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
        hybrid sleep.</p></dd></dl></div></div><div class="refsect1"><a name="idm47028230944208"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
      <a href="systemd-sleep.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-sleep.conf</span>(5)</span></a>,
      <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
      <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
      <a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a>,
      <a href="systemd-halt.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-halt.service</span>(8)</span></a>
    </p></div></div></body></html>