]> git.proxmox.com Git - systemd.git/blob - man/sleep.conf.d.html
Imported Upstream version 220
[systemd.git] / man / sleep.conf.d.html
1 <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>
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>·
22 <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
23 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
24 where execution of the OS is paused,
25 and complete power loss might result
26 in lost data, and which is fast to
27 enter and exit. This corresponds to
28 suspend, standby, or freeze states as
29 understood by the kernel.
30 </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
31 where execution of the OS is paused,
32 and complete power loss does not
33 result in lost data, and which might
34 be slow to enter and exit. This
35 corresponds to the hibernation as
36 understood by the kernel.
37 </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
38 where execution of the OS is paused,
39 which might be slow to enter, and on
40 complete power loss does not result in
41 lost data but might be slower to exit
42 in that case. This mode is called
43 suspend-to-both by the kernel.
44 </p></dd></dl></div><p>Settings in these files determine what strings
45 will be written to
46 <code class="filename">/sys/power/disk</code> and
47 <code class="filename">/sys/power/state</code> by
48 <a href="systemd-sleep.html"><span class="citerefentry"><span class="refentrytitle">systemd-sleep</span>(8)</span></a>
49 when
50 <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
51 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
52 configuration file is only needed when it is necessary to deviate
53 from those defaults. By default the configuration file in
54 <code class="filename">/etc/systemd/</code> contains commented out entries
55 showing the defaults as a guide to the administrator. This file
56 can be edited to create local overrides.
57 </p><p>When packages need to customize the configuration, they can
58 install configuration snippets in
59 <code class="filename">/usr/lib/systemd/*.conf.d/</code>. Files in
60 <code class="filename">/etc/</code> are reserved for the local
61 administrator, who may use this logic to override the
62 configuration files installed by vendor packages. The main
63 configuration file is read before any of the configuration
64 directories, and has the lowest precedence; entries in a file in
65 any configuration directory override entries in the single
66 configuration file. Files in the
67 <code class="filename">*.conf.d/</code> configuration subdirectories
68 are sorted by their filename in lexicographic order, regardless of
69 which of the subdirectories they reside in. If multiple files
70 specify the same option, the entry in the file with the
71 lexicographically latest name takes precedence. It is recommended
72 to prefix all filenames in those subdirectories with a two-digit
73 number and a dash, to simplify the ordering of the files.</p><p>To disable a configuration file supplied by the vendor, the
74 recommended way is to place a symlink to
75 <code class="filename">/dev/null</code> in the configuration directory in
76 <code class="filename">/etc/</code>, with the same filename as the vendor
77 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
78 "<code class="literal">[Sleep]</code>" section of
79 <code class="filename">/etc/systemd/sleep.conf</code> or a
80 <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
81 <code class="filename">/sys/power/disk</code> by,
82 respectively,
83 <a href="systemd-suspend.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-suspend.service</span>(8)</span></a>,
84 <a href="systemd-hibernate.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hibernate.service</span>(8)</span></a>, or
85 <a href="systemd-hybrid-sleep.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hybrid-sleep.service</span>(8)</span></a>.
86 More than one value can be specified by separating
87 multiple values with whitespace. They will be tried
88 in turn, until one is written without error. If
89 neither succeeds, the operation will be aborted.
90 </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
91 <code class="filename">/sys/power/state</code> by,
92 respectively,
93 <a href="systemd-suspend.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-suspend.service</span>(8)</span></a>,
94 <a href="systemd-hibernate.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hibernate.service</span>(8)</span></a>, or
95 <a href="systemd-hybrid-sleep.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hybrid-sleep.service</span>(8)</span></a>.
96 More than one value can be specified by separating
97 multiple values with whitespace. They will be tried
98 in turn, until one is written without error. If
99 neither succeeds, the operation will be aborted.
100 </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
101 in Linux 3.9, one can use <span class="command"><strong>systemctl suspend</strong></span>
102 with
103 </p><pre class="programlisting">[Sleep]
104 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>
105 <a href="systemd-sleep.html"><span class="citerefentry"><span class="refentrytitle">systemd-sleep</span>(8)</span></a>,
106 <a href="systemd-suspend.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-suspend.service</span>(8)</span></a>,
107 <a href="systemd-hibernate.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hibernate.service</span>(8)</span></a>,
108 <a href="systemd-hybrid-sleep.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hybrid-sleep.service</span>(8)</span></a>,
109 <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
110 <a href="systemd.directives.html"><span class="citerefentry"><span class="refentrytitle">systemd.directives</span>(7)</span></a>
111 </p></div></div></body></html>