systemd/man/systemd-sleep.conf.html
2015-05-25 11:04:44 +02:00

112 lines
9.5 KiB
HTML

<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>systemd-sleep.conf</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>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 220</span><hr><div class="refentry"><a name="systemd-sleep.conf"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-sleep.conf, sleep.conf.d — Suspend and hibernation configuration file</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/systemd/sleep.conf</code></p><p><code class="filename">/etc/systemd/sleep.conf.d/*.conf</code></p><p><code class="filename">/run/systemd/sleep.conf.d/*.conf</code></p><p><code class="filename">/usr/lib/systemd/sleep.conf.d/*.conf</code></p></div><div class="refsect1"><a name="idm140080813273520"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><span class="command"><strong>systemd</strong></span> supports three general
power-saving modes:</p><div class="variablelist"><dl class="variablelist"><dt id="suspend"><span class="term">suspend</span><a class="headerlink" title="Permalink to this term" href="#suspend"></a></dt><dd><p>a low-power state
where execution of the OS is paused,
and complete power loss might result
in lost data, and which is fast to
enter and exit. This corresponds to
suspend, standby, or freeze states as
understood by the kernel.
</p></dd><dt id="hibernate"><span class="term">hibernate</span><a class="headerlink" title="Permalink to this term" href="#hibernate"></a></dt><dd><p>a low-power state
where execution of the OS is paused,
and complete power loss does not
result in lost data, and which might
be slow to enter and exit. This
corresponds to the hibernation as
understood by the kernel.
</p></dd><dt id="hybrid-sleep"><span class="term">hybrid-sleep</span><a class="headerlink" title="Permalink to this term" href="#hybrid-sleep"></a></dt><dd><p>a low-power state
where execution of the OS is paused,
which might be slow to enter, and on
complete power loss does not result in
lost data but might be slower to exit
in that case. This mode is called
suspend-to-both by the kernel.
</p></dd></dl></div><p>Settings in these files determine what strings
will be written to
<code class="filename">/sys/power/disk</code> and
<code class="filename">/sys/power/state</code> by
<a href="systemd-sleep.html"><span class="citerefentry"><span class="refentrytitle">systemd-sleep</span>(8)</span></a>
when
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
attempts to suspend or hibernate the machine.</p></div><div class="refsection"><a name="main-conf"></a><h2>Configuration Directories and Precedence</h2><p>Default configuration is defined during compilation, so a
configuration file is only needed when it is necessary to deviate
from those defaults. By default the configuration file in
<code class="filename">/etc/systemd/</code> contains commented out entries
showing the defaults as a guide to the administrator. This file
can be edited to create local overrides.
</p><p>When packages need to customize the configuration, they can
install configuration snippets in
<code class="filename">/usr/lib/systemd/*.conf.d/</code>. Files in
<code class="filename">/etc/</code> are reserved for the local
administrator, who may use this logic to override the
configuration files installed by vendor packages. The main
configuration file is read before any of the configuration
directories, and has the lowest precedence; entries in a file in
any configuration directory override entries in the single
configuration file. Files in the
<code class="filename">*.conf.d/</code> configuration subdirectories
are sorted by their filename in lexicographic order, regardless of
which of the subdirectories they reside in. If multiple files
specify the same option, the entry in the file with the
lexicographically latest name takes precedence. It is recommended
to prefix all filenames in those subdirectories with a two-digit
number and a dash, to simplify the ordering of the files.</p><p>To disable a configuration file supplied by the vendor, the
recommended way is to place a symlink to
<code class="filename">/dev/null</code> in the configuration directory in
<code class="filename">/etc/</code>, with the same filename as the vendor
configuration file.</p></div><div class="refsect1"><a name="idm140080808363376"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options"></a></h2><p>The following options 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:</p><div class="variablelist"><dl class="variablelist"><dt id="SuspendMode="><span class="term"><code class="varname">SuspendMode=</code>, </span><span class="term"><code class="varname">HibernateMode=</code>, </span><span class="term"><code class="varname">HybridSleepMode=</code></span><a class="headerlink" title="Permalink to this term" href="#SuspendMode="></a></dt><dd><p>The string to be written to
<code class="filename">/sys/power/disk</code> by,
respectively,
<a href="systemd-suspend.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-suspend.service</span>(8)</span></a>,
<a href="systemd-hibernate.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hibernate.service</span>(8)</span></a>, or
<a href="systemd-hybrid-sleep.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hybrid-sleep.service</span>(8)</span></a>.
More than one value can be specified by separating
multiple values with whitespace. They will be tried
in turn, until one is written without error. If
neither succeeds, the operation will be aborted.
</p></dd><dt id="SuspendState="><span class="term"><code class="varname">SuspendState=</code>, </span><span class="term"><code class="varname">HibernateState=</code>, </span><span class="term"><code class="varname">HybridSleepState=</code></span><a class="headerlink" title="Permalink to this term" href="#SuspendState="></a></dt><dd><p>The string to be written to
<code class="filename">/sys/power/state</code> by,
respectively,
<a href="systemd-suspend.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-suspend.service</span>(8)</span></a>,
<a href="systemd-hibernate.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hibernate.service</span>(8)</span></a>, or
<a href="systemd-hybrid-sleep.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hybrid-sleep.service</span>(8)</span></a>.
More than one value can be specified by separating
multiple values with whitespace. They will be tried
in turn, until one is written without error. If
neither succeeds, the operation will be aborted.
</p></dd></dl></div></div><div class="refsect1"><a name="idm140080808348496"></a><h2 id="Example: freeze">Example: freeze<a class="headerlink" title="Permalink to this headline" href="#Example:%20freeze"></a></h2><p>Example: to exploit the <span class="quote"><span class="quote">freeze</span></span> mode added
in Linux 3.9, one can use <span class="command"><strong>systemctl suspend</strong></span>
with
</p><pre class="programlisting">[Sleep]
SuspendState=freeze</pre></div><div class="refsect1"><a name="idm140080808345840"></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.html"><span class="citerefentry"><span class="refentrytitle">systemd-sleep</span>(8)</span></a>,
<a href="systemd-suspend.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-suspend.service</span>(8)</span></a>,
<a href="systemd-hibernate.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hibernate.service</span>(8)</span></a>,
<a href="systemd-hybrid-sleep.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hybrid-sleep.service</span>(8)</span></a>,
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="systemd.directives.html"><span class="citerefentry"><span class="refentrytitle">systemd.directives</span>(7)</span></a>
</p></div></div></body></html>