mirror of
https://git.proxmox.com/git/systemd
synced 2026-02-03 10:01:56 +00:00
87 lines
7.4 KiB
HTML
87 lines
7.4 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 208</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 — Suspend and hibernation configuration file</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/systemd/sleep.conf</code></p></div><div class="refsect1"><a name="idm274681512960"></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 this file 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="refsect1"><a name="idm274681502624"></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>:</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 seperating
|
|
multiple values with commas. They will be tried
|
|
in turn, until one is written without error. If
|
|
neither suceeds, 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 seperating
|
|
multiple values with commas. They will be tried
|
|
in turn, until one is written without error. If
|
|
neither suceeds, the operation will be aborted.
|
|
</p></dd></dl></div></div><div class="refsect1"><a name="idm274685437888"></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="idm274685434944"></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>
|