1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
3 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
4 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
7 This file is part of systemd.
9 Copyright 2013 Zbigniew Jędrzejewski-Szmek
11 systemd is free software; you can redistribute it and/or modify it
12 under the terms of the GNU Lesser General Public License as published by
13 the Free Software Foundation; either version 2.1 of the License, or
14 (at your option) any later version.
16 systemd is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 Lesser General Public License for more details.
21 You should have received a copy of the GNU Lesser General Public License
22 along with systemd; If not, see <http://www.gnu.org/licenses/>.
25 <refentry id="systemd-sleep.conf">
27 <title>systemd-sleep.conf</title>
28 <productname>systemd</productname>
32 <contrib>Developer</contrib>
33 <firstname>Zbigniew</firstname>
34 <surname>Jędrzejewski-Szmek</surname>
35 <email>zbyszek@in.waw.pl</email>
41 <refentrytitle>systemd-sleep.conf</refentrytitle>
42 <manvolnum>5</manvolnum>
46 <refname>systemd-sleep.conf</refname>
47 <refpurpose>Suspend and hibernation configuration file</refpurpose>
51 <para><filename>/etc/systemd/sleep.conf</filename></para>
55 <title>Description</title>
57 <para><command>systemd</command> supports three general
58 power-saving modes:</para>
64 <listitem><para>a low-power state
65 where execution of the OS is paused,
66 and complete power loss might result
67 in lost data, and which is fast to
68 enter and exit. This corresponds to
69 suspend, standby, or freeze states as
70 understood by the kernel.
75 <term>hibernate</term>
77 <listitem><para>a low-power state
78 where execution of the OS is paused,
79 and complete power loss does not
80 result in lost data, and which might
81 be slow to enter and exit. This
82 corresponds to the hibernation as
83 understood by the kernel.
88 <term>hybrid-sleep</term>
90 <listitem><para>a low-power state
91 where execution of the OS is paused,
92 which might be slow to enter, and on
93 complete power loss does not result in
94 lost data but might be slower to exit
95 in that case. This mode is called
96 suspend-to-both by the kernel.
101 <para>Settings in this file determine what strings
103 <filename>/sys/power/disk</filename> and
104 <filename>/sys/power/state</filename> by
105 <citerefentry><refentrytitle>systemd-sleep</refentrytitle><manvolnum>8</manvolnum></citerefentry>
107 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
108 attempts to suspend or hibernate the machine.</para>
112 <title>Options</title>
114 <para>The following options can be configured in the
115 <literal>[Sleep]</literal> section of
116 <filename>/etc/systemd/sleep.conf</filename>:</para>
118 <variablelist class='systemd-directives'>
120 <term><varname>SuspendMode=</varname></term>
121 <term><varname>HibernateMode=</varname></term>
122 <term><varname>HybridSleepMode=</varname></term>
124 <listitem><para>The string to be written to
125 <filename>/sys/power/disk</filename> by,
127 <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
128 <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, or
129 <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
130 More than one value can be specified by separating
131 multiple values with whitespace. They will be tried
132 in turn, until one is written without error. If
133 neither succeeds, the operation will be aborted.
138 <term><varname>SuspendState=</varname></term>
139 <term><varname>HibernateState=</varname></term>
140 <term><varname>HybridSleepState=</varname></term>
142 <listitem><para>The string to be written to
143 <filename>/sys/power/state</filename> by,
145 <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
146 <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, or
147 <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
148 More than one value can be specified by separating
149 multiple values with whitespace. They will be tried
150 in turn, until one is written without error. If
151 neither succeeds, the operation will be aborted.
158 <title>Example: freeze</title>
160 <para>Example: to exploit the <quote>freeze</quote> mode added
161 in Linux 3.9, one can use <command>systemctl suspend</command>
163 <programlisting>[Sleep]
164 SuspendState=freeze</programlisting></para>
168 <title>See Also</title>
170 <citerefentry><refentrytitle>systemd-sleep</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
171 <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
172 <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
173 <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
174 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
175 <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>