sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget//translations/zh_CN/admin-guide/pm/sleep-statesmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget//translations/zh_TW/admin-guide/pm/sleep-statesmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget//translations/it_IT/admin-guide/pm/sleep-statesmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget//translations/ja_JP/admin-guide/pm/sleep-statesmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget//translations/ko_KR/admin-guide/pm/sleep-statesmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget//translations/sp_SP/admin-guide/pm/sleep-statesmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhI/var/lib/git/docbuild/linux/Documentation/admin-guide/pm/sleep-states.rsthKubh)}(h4This data file has been placed in the public domain.h]h4This data file has been placed in the public domain.}hhsbah}(h]h ]h"]h$]h&]hhuh1hhhhhho/srv/docbuild/lib/venvs/build-kernel-docs/lib64/python3.9/site-packages/docutils/parsers/rst/include/isonum.txthKubh)}(hDerived from the Unicode character mappings available from . Processed by unicode2rstsubs.py, part of Docutils: .h]hDerived from the Unicode character mappings available from . Processed by unicode2rstsubs.py, part of Docutils: .}hhsbah}(h]h ]h"]h$]h&]hhuh1hhhhhhhhKubhsubstitution_definition)}(h*.. |amp| unicode:: U+00026 .. AMPERSANDh]h&}hhsbah}(h]h ]h"]ampah$]h&]uh1hhhhKhhhhubh)}(h+.. |apos| unicode:: U+00027 .. APOSTROPHEh]h'}hhsbah}(h]h ]h"]aposah$]h&]uh1hhhhKhhhhubh)}(h).. |ast| unicode:: U+0002A .. ASTERISKh]h*}hhsbah}(h]h ]h"]astah$]h&]uh1hhhhK hhhhubh)}(h+.. |brvbar| unicode:: U+000A6 .. BROKEN BARh]h¦}hjsbah}(h]h ]h"]brvbarah$]h&]uh1hhhhK hhhhubh)}(h0.. |bsol| unicode:: U+0005C .. REVERSE SOLIDUSh]h\}hjsbah}(h]h ]h"]bsolah$]h&]uh1hhhhK hhhhubh)}(h*.. |cent| unicode:: U+000A2 .. CENT SIGNh]h¢}hjsbah}(h]h ]h"]centah$]h&]uh1hhhhK hhhhubh)}(h&.. |colon| unicode:: U+0003A .. COLONh]h:}hj-sbah}(h]h ]h"]colonah$]h&]uh1hhhhK hhhhubh)}(h&.. |comma| unicode:: U+0002C .. COMMAh]h,}hj<sbah}(h]h ]h"]commaah$]h&]uh1hhhhKhhhhubh)}(h... |commat| unicode:: U+00040 .. COMMERCIAL ATh]h@}hjKsbah}(h]h ]h"]commatah$]h&]uh1hhhhKhhhhubh)}(h/.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGNh]h©}hjZsbah}(h]h ]h"]copyah$]h&]uh1hhhhKhhhhubh)}(h... |curren| unicode:: U+000A4 .. CURRENCY SIGNh]h¤}hjisbah}(h]h ]h"]currenah$]h&]uh1hhhhKhhhhubh)}(h0.. |darr| unicode:: U+02193 .. DOWNWARDS ARROWh]h↓}hjxsbah}(h]h ]h"]darrah$]h&]uh1hhhhKhhhhubh)}(h,.. |deg| unicode:: U+000B0 .. DEGREE SIGNh]h°}hjsbah}(h]h ]h"]degah$]h&]uh1hhhhKhhhhubh)}(h... |divide| unicode:: U+000F7 .. DIVISION SIGNh]h÷}hjsbah}(h]h ]h"]divideah$]h&]uh1hhhhKhhhhubh)}(h,.. |dollar| unicode:: U+00024 .. DOLLAR SIGNh]h$}hjsbah}(h]h ]h"]dollarah$]h&]uh1hhhhKhhhhubh)}(h,.. |equals| unicode:: U+0003D .. EQUALS SIGNh]h=}hjsbah}(h]h ]h"]equalsah$]h&]uh1hhhhKhhhhubh)}(h1.. |excl| unicode:: U+00021 .. EXCLAMATION MARKh]h!}hjsbah}(h]h ]h"]exclah$]h&]uh1hhhhKhhhhubh)}(h9.. |frac12| unicode:: U+000BD .. VULGAR FRACTION ONE HALFh]h½}hjsbah}(h]h ]h"]frac12ah$]h&]uh1hhhhKhhhhubh)}(h<.. |frac14| unicode:: U+000BC .. VULGAR FRACTION ONE QUARTERh]h¼}hjsbah}(h]h ]h"]frac14ah$]h&]uh1hhhhKhhhhubh)}(h;.. |frac18| unicode:: U+0215B .. VULGAR FRACTION ONE EIGHTHh]h⅛}hjsbah}(h]h ]h"]frac18ah$]h&]uh1hhhhKhhhhubh)}(h?.. |frac34| unicode:: U+000BE .. VULGAR FRACTION THREE QUARTERSh]h¾}hjsbah}(h]h ]h"]frac34ah$]h&]uh1hhhhKhhhhubh)}(h>.. |frac38| unicode:: U+0215C .. VULGAR FRACTION THREE EIGHTHSh]h⅜}hjsbah}(h]h ]h"]frac38ah$]h&]uh1hhhhKhhhhubh)}(h=.. |frac58| unicode:: U+0215D .. VULGAR FRACTION FIVE EIGHTHSh]h⅝}hjsbah}(h]h ]h"]frac58ah$]h&]uh1hhhhKhhhhubh)}(h>.. |frac78| unicode:: U+0215E .. VULGAR FRACTION SEVEN EIGHTHSh]h⅞}hj,sbah}(h]h ]h"]frac78ah$]h&]uh1hhhhKhhhhubh)}(h2.. |gt| unicode:: U+0003E .. GREATER-THAN SIGNh]h>}hj;sbah}(h]h ]h"]gtah$]h&]uh1hhhhKhhhhubh)}(h9.. |half| unicode:: U+000BD .. VULGAR FRACTION ONE HALFh]h½}hjJsbah}(h]h ]h"]halfah$]h&]uh1hhhhK hhhhubh)}(h/.. |horbar| unicode:: U+02015 .. HORIZONTAL BARh]h―}hjYsbah}(h]h ]h"]horbarah$]h&]uh1hhhhK!hhhhubh)}(h'.. |hyphen| unicode:: U+02010 .. HYPHENh]h‐}hjhsbah}(h]h ]h"]hyphenah$]h&]uh1hhhhK"hhhhubh)}(h:.. |iexcl| unicode:: U+000A1 .. INVERTED EXCLAMATION MARKh]h¡}hjwsbah}(h]h ]h"]iexclah$]h&]uh1hhhhK#hhhhubh)}(h7.. |iquest| unicode:: U+000BF .. INVERTED QUESTION MARKh]h¿}hjsbah}(h]h ]h"]iquestah$]h&]uh1hhhhK$hhhhubh)}(hJ.. |laquo| unicode:: U+000AB .. LEFT-POINTING DOUBLE ANGLE QUOTATION MARKh]h«}hjsbah}(h]h ]h"]laquoah$]h&]uh1hhhhK%hhhhubh)}(h0.. |larr| unicode:: U+02190 .. LEFTWARDS ARROWh]h←}hjsbah}(h]h ]h"]larrah$]h&]uh1hhhhK&hhhhubh)}(h3.. |lcub| unicode:: U+0007B .. LEFT CURLY BRACKETh]h{}hjsbah}(h]h ]h"]lcubah$]h&]uh1hhhhK'hhhhubh)}(h;.. |ldquo| unicode:: U+0201C .. LEFT DOUBLE QUOTATION MARKh]h“}hjsbah}(h]h ]h"]ldquoah$]h&]uh1hhhhK(hhhhubh)}(h).. |lowbar| unicode:: U+0005F .. LOW LINEh]h_}hjsbah}(h]h ]h"]lowbarah$]h&]uh1hhhhK)hhhhubh)}(h1.. |lpar| unicode:: U+00028 .. LEFT PARENTHESISh]h(}hjsbah}(h]h ]h"]lparah$]h&]uh1hhhhK*hhhhubh)}(h4.. |lsqb| unicode:: U+0005B .. LEFT SQUARE BRACKETh]h[}hjsbah}(h]h ]h"]lsqbah$]h&]uh1hhhhK+hhhhubh)}(h;.. |lsquo| unicode:: U+02018 .. LEFT SINGLE QUOTATION MARKh]h‘}hjsbah}(h]h ]h"]lsquoah$]h&]uh1hhhhK,hhhhubh)}(h/.. |lt| unicode:: U+0003C .. LESS-THAN SIGNh]h<}hj sbah}(h]h ]h"]ltah$]h&]uh1hhhhK-hhhhubh)}(h+.. |micro| unicode:: U+000B5 .. MICRO SIGNh]hµ}hjsbah}(h]h ]h"]microah$]h&]uh1hhhhK.hhhhubh)}(h+.. |middot| unicode:: U+000B7 .. MIDDLE DOTh]h·}hj+sbah}(h]h ]h"]middotah$]h&]uh1hhhhK/hhhhubh)}(h/.. |nbsp| unicode:: U+000A0 .. NO-BREAK SPACEh]h }hj:sbah}(h]h ]h"]nbspah$]h&]uh1hhhhK0hhhhubh)}(h).. |not| unicode:: U+000AC .. NOT SIGNh]h¬}hjIsbah}(h]h ]h"]notah$]h&]uh1hhhhK1hhhhubh)}(h,.. |num| unicode:: U+00023 .. NUMBER SIGNh]h#}hjXsbah}(h]h ]h"]numah$]h&]uh1hhhhK2hhhhubh)}(h).. |ohm| unicode:: U+02126 .. OHM SIGNh]hΩ}hjgsbah}(h]h ]h"]ohmah$]h&]uh1hhhhK3hhhhubh)}(h;.. |ordf| unicode:: U+000AA .. FEMININE ORDINAL INDICATORh]hª}hjvsbah}(h]h ]h"]ordfah$]h&]uh1hhhhK4hhhhubh)}(h<.. |ordm| unicode:: U+000BA .. MASCULINE ORDINAL INDICATORh]hº}hjsbah}(h]h ]h"]ordmah$]h&]uh1hhhhK5hhhhubh)}(h-.. |para| unicode:: U+000B6 .. PILCROW SIGNh]h¶}hjsbah}(h]h ]h"]paraah$]h&]uh1hhhhK6hhhhubh)}(h-.. |percnt| unicode:: U+00025 .. PERCENT SIGNh]h%}hjsbah}(h]h ]h"]percntah$]h&]uh1hhhhK7hhhhubh)}(h*.. |period| unicode:: U+0002E .. FULL STOPh]h.}hjsbah}(h]h ]h"]periodah$]h&]uh1hhhhK8hhhhubh)}(h*.. |plus| unicode:: U+0002B .. PLUS SIGNh]h+}hjsbah}(h]h ]h"]plusah$]h&]uh1hhhhK9hhhhubh)}(h0.. |plusmn| unicode:: U+000B1 .. PLUS-MINUS SIGNh]h±}hjsbah}(h]h ]h"]plusmnah$]h&]uh1hhhhK:hhhhubh)}(h+.. |pound| unicode:: U+000A3 .. POUND SIGNh]h£}hjsbah}(h]h ]h"]poundah$]h&]uh1hhhhK;hhhhubh)}(h... |quest| unicode:: U+0003F .. QUESTION MARKh]h?}hjsbah}(h]h ]h"]questah$]h&]uh1hhhhKhhhhubh)}(h1.. |rarr| unicode:: U+02192 .. RIGHTWARDS ARROWh]h→}hjsbah}(h]h ]h"]rarrah$]h&]uh1hhhhK?hhhhubh)}(h4.. |rcub| unicode:: U+0007D .. RIGHT CURLY BRACKETh]h}}hj*sbah}(h]h ]h"]rcubah$]h&]uh1hhhhK@hhhhubh)}(h<.. |rdquo| unicode:: U+0201D .. RIGHT DOUBLE QUOTATION MARKh]h”}hj9sbah}(h]h ]h"]rdquoah$]h&]uh1hhhhKAhhhhubh)}(h0.. |reg| unicode:: U+000AE .. REGISTERED SIGNh]h®}hjHsbah}(h]h ]h"]regah$]h&]uh1hhhhKBhhhhubh)}(h2.. |rpar| unicode:: U+00029 .. RIGHT PARENTHESISh]h)}hjWsbah}(h]h ]h"]rparah$]h&]uh1hhhhKChhhhubh)}(h5.. |rsqb| unicode:: U+0005D .. RIGHT SQUARE BRACKETh]h]}hjfsbah}(h]h ]h"]rsqbah$]h&]uh1hhhhKDhhhhubh)}(h<.. |rsquo| unicode:: U+02019 .. RIGHT SINGLE QUOTATION MARKh]h’}hjusbah}(h]h ]h"]rsquoah$]h&]uh1hhhhKEhhhhubh)}(h-.. |sect| unicode:: U+000A7 .. SECTION SIGNh]h§}hjsbah}(h]h ]h"]sectah$]h&]uh1hhhhKFhhhhubh)}(h*.. |semi| unicode:: U+0003B .. SEMICOLONh]h;}hjsbah}(h]h ]h"]semiah$]h&]uh1hhhhKGhhhhubh)}(h,.. |shy| unicode:: U+000AD .. SOFT HYPHENh]h­}hjsbah}(h]h ]h"]shyah$]h&]uh1hhhhKHhhhhubh)}(h(.. |sol| unicode:: U+0002F .. SOLIDUSh]h/}hjsbah}(h]h ]h"]solah$]h&]uh1hhhhKIhhhhubh)}(h,.. |sung| unicode:: U+0266A .. EIGHTH NOTEh]h♪}hjsbah}(h]h ]h"]sungah$]h&]uh1hhhhKJhhhhubh)}(h0.. |sup1| unicode:: U+000B9 .. SUPERSCRIPT ONEh]h¹}hjsbah}(h]h ]h"]sup1ah$]h&]uh1hhhhKKhhhhubh)}(h0.. |sup2| unicode:: U+000B2 .. SUPERSCRIPT TWOh]h²}hjsbah}(h]h ]h"]sup2ah$]h&]uh1hhhhKLhhhhubh)}(h2.. |sup3| unicode:: U+000B3 .. SUPERSCRIPT THREEh]h³}hjsbah}(h]h ]h"]sup3ah$]h&]uh1hhhhKMhhhhubh)}(h4.. |times| unicode:: U+000D7 .. MULTIPLICATION SIGNh]h×}hjsbah}(h]h ]h"]timesah$]h&]uh1hhhhKNhhhhubh)}(h0.. |trade| unicode:: U+02122 .. TRADE MARK SIGNh]h™}hj sbah}(h]h ]h"]tradeah$]h&]uh1hhhhKOhhhhubh)}(h... |uarr| unicode:: U+02191 .. UPWARDS ARROWh]h↑}hjsbah}(h]h ]h"]uarrah$]h&]uh1hhhhKPhhhhubh)}(h... |verbar| unicode:: U+0007C .. VERTICAL LINEh]h|}hj)sbah}(h]h ]h"]verbarah$]h&]uh1hhhhKQhhhhubh)}(h*.. |yen| unicode:: U+000A5 .. YEN SIGN h]h¥}hj8sbah}(h]h ]h"]yenah$]h&]uh1hhhhKRhhhhubhsection)}(hhh](htitle)}(hSystem Sleep Statesh]hSystem Sleep States}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jLhjIhhhhhKubh field_list)}(hhh](hfield)}(hhh](h field_name)}(h Copyrighth]h Copyright}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jfhjchhhKubh field_body)}(h|copy| 2017 Intel Corporation h]h paragraph)}(h|copy| 2017 Intel Corporationh](h©}(hj~hhhNhNubh 2017 Intel Corporation}(hj~hhhNhNubeh}(h]h ]h"]h$]h&]uh1j|hhhKhjxubah}(h]h ]h"]h$]h&]uh1jvhjcubeh}(h]h ]h"]h$]h&]uh1jahhhKhj^hhubjb)}(hhh](jg)}(hAuthorh]hAuthor}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jfhjhhhKubjw)}(h0Rafael J. Wysocki h]j})}(h.Rafael J. Wysocki h](hRafael J. Wysocki <}(hjhhhNhNubh reference)}(hrafael.j.wysocki@intel.comh]hrafael.j.wysocki@intel.com}(hjhhhNhNubah}(h]h ]h"]h$]h&]refuri!mailto:rafael.j.wysocki@intel.comuh1jhjubh>}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j|hhhK hjubah}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jahhhK hj^hhubeh}(h]h ]h"]h$]h&]uh1j\hjIhhhhhKubj})}(hSleep states are global low-power states of the entire system in which user space code cannot be executed and the overall system activity is significantly reduced.h]hSleep states are global low-power states of the entire system in which user space code cannot be executed and the overall system activity is significantly reduced.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhK hjIhhubjH)}(hhh](jM)}(h"Sleep States That Can Be Supportedh]h"Sleep States That Can Be Supported}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jLhjhhhhhKubj})}(hXDepending on its configuration and the capabilities of the platform it runs on, the Linux kernel can support up to four system sleep states, including hibernation and up to three variants of system suspend. The sleep states that can be supported by the kernel are listed below.h]hXDepending on its configuration and the capabilities of the platform it runs on, the Linux kernel can support up to four system sleep states, including hibernation and up to three variants of system suspend. The sleep states that can be supported by the kernel are listed below.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhjhhubhtarget)}(h .. _s2idle:h]h}(h]h ]h"]h$]h&]refids2idleuh1jhKphjhhhhubjH)}(hhh](jM)}(hSuspend-to-Idleh]hSuspend-to-Idle}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jLhj"hhhhhKubj})}(hXThis is a generic, pure software, light-weight variant of system suspend (also referred to as S2I or S2Idle). It allows more energy to be saved relative to runtime idle by freezing user space, suspending the timekeeping and putting all I/O devices into low-power states (possibly lower-power than available in the working state), such that the processors can spend time in their deepest idle states while the system is suspended.h]hXThis is a generic, pure software, light-weight variant of system suspend (also referred to as S2I or S2Idle). It allows more energy to be saved relative to runtime idle by freezing user space, suspending the timekeeping and putting all I/O devices into low-power states (possibly lower-power than available in the working state), such that the processors can spend time in their deepest idle states while the system is suspended.}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhj"hhubj})}(hThe system is woken up from this state by in-band interrupts, so theoretically any devices that can cause interrupts to be generated in the working state can also be set up as wakeup devices for S2Idle.h]hThe system is woken up from this state by in-band interrupts, so theoretically any devices that can cause interrupts to be generated in the working state can also be set up as wakeup devices for S2Idle.}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhK&hj"hhubj})}(hX=This state can be used on platforms without support for :ref:`standby ` or :ref:`suspend-to-RAM `, or it can be used in addition to any of the deeper system suspend variants to provide reduced resume latency. It is always supported if the :c:macro:`CONFIG_SUSPEND` kernel configuration option is set.h](h8This state can be used on platforms without support for }(hjOhhhNhNubh)}(h:ref:`standby `h]hinline)}(hjYh]hstandby}(hj]hhhNhNubah}(h]h ](xrefstdstd-refeh"]h$]h&]uh1j[hjWubah}(h]h ]h"]h$]h&]refdocadmin-guide/pm/sleep-states refdomainjhreftyperef refexplicitrefwarn reftargetstandbyuh1hhhhK*hjOubh or }(hjOhhhNhNubh)}(h:ref:`suspend-to-RAM `h]j\)}(hjh]hsuspend-to-RAM}(hjhhhNhNubah}(h]h ](jgstdstd-refeh"]h$]h&]uh1j[hjubah}(h]h ]h"]h$]h&]refdocjt refdomainjreftyperef refexplicitrefwarnjzs2ramuh1hhhhK*hjOubh, or it can be used in addition to any of the deeper system suspend variants to provide reduced resume latency. It is always supported if the }(hjOhhhNhNubh)}(h:c:macro:`CONFIG_SUSPEND`h]hliteral)}(hjh]hCONFIG_SUSPEND}(hjhhhNhNubah}(h]h ](jgcc-macroeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocjt refdomainjreftypemacro refexplicitrefwarnjzCONFIG_SUSPENDuh1hhhhK*hjOubh$ kernel configuration option is set.}(hjOhhhNhNubeh}(h]h ]h"]h$]h&]uh1j|hhhK*hj"hhubj)}(h .. _standby:h]h}(h]h ]h"]h$]h&]j standbyuh1jhKhj"hhhhubeh}(h](suspend-to-idlej!eh ]h"](suspend-to-idles2idleeh$]h&]uh1jGhjhhhhhKexpect_referenced_by_name}jjsexpect_referenced_by_id}j!jsubjH)}(hhh](jM)}(hStandbyh]hStandby}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jLhjhhhhhK2ubj})}(hXThis state, if supported, offers moderate, but real, energy savings, while providing a relatively straightforward transition back to the working state. No operating state is lost (the system core logic retains power), so the system can go back to where it left off easily enough.h]hXThis state, if supported, offers moderate, but real, energy savings, while providing a relatively straightforward transition back to the working state. No operating state is lost (the system core logic retains power), so the system can go back to where it left off easily enough.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhK4hjhhubj})}(hXIn addition to freezing user space, suspending the timekeeping and putting all I/O devices into low-power states, which is done for :ref:`suspend-to-idle ` too, nonboot CPUs are taken offline and all low-level system functions are suspended during transitions into this state. For this reason, it should allow more energy to be saved relative to :ref:`suspend-to-idle `, but the resume latency will generally be greater than for that state.h](hIn addition to freezing user space, suspending the timekeeping and putting all I/O devices into low-power states, which is done for }(hjhhhNhNubh)}(h:ref:`suspend-to-idle `h]j\)}(hjh]hsuspend-to-idle}(hjhhhNhNubah}(h]h ](jgstdstd-refeh"]h$]h&]uh1j[hjubah}(h]h ]h"]h$]h&]refdocjt refdomainjreftyperef refexplicitrefwarnjzs2idleuh1hhhhK9hjubh too, nonboot CPUs are taken offline and all low-level system functions are suspended during transitions into this state. For this reason, it should allow more energy to be saved relative to }(hjhhhNhNubh)}(h:ref:`suspend-to-idle `h]j\)}(hj5h]hsuspend-to-idle}(hj7hhhNhNubah}(h]h ](jgstdstd-refeh"]h$]h&]uh1j[hj3ubah}(h]h ]h"]h$]h&]refdocjt refdomainjAreftyperef refexplicitrefwarnjzs2idleuh1hhhhK9hjubhG, but the resume latency will generally be greater than for that state.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j|hhhK9hjhhubj})}(hThe set of devices that can wake up the system from this state usually is reduced relative to :ref:`suspend-to-idle ` and it may be necessary to rely on the platform for setting up the wakeup functionality as appropriate.h](h^The set of devices that can wake up the system from this state usually is reduced relative to }(hj]hhhNhNubh)}(h:ref:`suspend-to-idle `h]j\)}(hjgh]hsuspend-to-idle}(hjihhhNhNubah}(h]h ](jgstdstd-refeh"]h$]h&]uh1j[hjeubah}(h]h ]h"]h$]h&]refdocjt refdomainjsreftyperef refexplicitrefwarnjzs2idleuh1hhhhK@hj]ubhh and it may be necessary to rely on the platform for setting up the wakeup functionality as appropriate.}(hj]hhhNhNubeh}(h]h ]h"]h$]h&]uh1j|hhhK@hjhhubj})}(hX This state is supported if the :c:macro:`CONFIG_SUSPEND` kernel configuration option is set and the support for it is registered by the platform with the core system suspend subsystem. On ACPI-based systems this state is mapped to the S1 system state defined by ACPI.h](hThis state is supported if the }(hjhhhNhNubh)}(h:c:macro:`CONFIG_SUSPEND`h]j)}(hjh]hCONFIG_SUSPEND}(hjhhhNhNubah}(h]h ](jgjc-macroeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocjt refdomainjreftypemacro refexplicitrefwarnjzCONFIG_SUSPENDuh1hhhhKDhjubh kernel configuration option is set and the support for it is registered by the platform with the core system suspend subsystem. On ACPI-based systems this state is mapped to the S1 system state defined by ACPI.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j|hhhKDhjhhubj)}(h .. _s2ram:h]h}(h]h ]h"]h$]h&]j s2ramuh1jhKhjhhhhubeh}(h](jid1eh ]h"]standbyah$]standbyah&]uh1jGhjhhhhhK2 referencedKj}jjsj}jjsubjH)}(hhh](jM)}(hSuspend-to-RAMh]hSuspend-to-RAM}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jLhjhhhhhKLubj})}(hXThis state (also referred to as STR or S2RAM), if supported, offers significant energy savings as everything in the system is put into a low-power state, except for memory, which should be placed into the self-refresh mode to retain its contents. All of the steps carried out when entering :ref:`standby ` are also carried out during transitions to S2RAM. Additional operations may take place depending on the platform capabilities. In particular, on ACPI-based systems the kernel passes control to the platform firmware (BIOS) as the last step during S2RAM transitions and that usually results in powering down some more low-level components that are not directly controlled by the kernel.h](hX#This state (also referred to as STR or S2RAM), if supported, offers significant energy savings as everything in the system is put into a low-power state, except for memory, which should be placed into the self-refresh mode to retain its contents. All of the steps carried out when entering }(hjhhhNhNubh)}(h:ref:`standby `h]j\)}(hjh]hstandby}(hjhhhNhNubah}(h]h ](jgstdstd-refeh"]h$]h&]uh1j[hjubah}(h]h ]h"]h$]h&]refdocjt refdomainjreftyperef refexplicitrefwarnjzstandbyuh1hhhhKNhjubhX are also carried out during transitions to S2RAM. Additional operations may take place depending on the platform capabilities. In particular, on ACPI-based systems the kernel passes control to the platform firmware (BIOS) as the last step during S2RAM transitions and that usually results in powering down some more low-level components that are not directly controlled by the kernel.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j|hhhKNhjhhubj})}(hXThe state of devices and CPUs is saved and held in memory. All devices are suspended and put into low-power states. In many cases, all peripheral buses lose power when entering S2RAM, so devices must be able to handle the transition back to the "on" state.h]hXThe state of devices and CPUs is saved and held in memory. All devices are suspended and put into low-power states. In many cases, all peripheral buses lose power when entering S2RAM, so devices must be able to handle the transition back to the “on” state.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKXhjhhubj})}(hOn ACPI-based systems S2RAM requires some minimal boot-strapping code in the platform firmware to resume the system from it. This may be the case on other platforms too.h]hOn ACPI-based systems S2RAM requires some minimal boot-strapping code in the platform firmware to resume the system from it. This may be the case on other platforms too.}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhK]hjhhubj})}(hThe set of devices that can wake up the system from S2RAM usually is reduced relative to :ref:`suspend-to-idle ` and :ref:`standby ` and it may be necessary to rely on the platform for setting up the wakeup functionality as appropriate.h](hYThe set of devices that can wake up the system from S2RAM usually is reduced relative to }(hj6hhhNhNubh)}(h:ref:`suspend-to-idle `h]j\)}(hj@h]hsuspend-to-idle}(hjBhhhNhNubah}(h]h ](jgstdstd-refeh"]h$]h&]uh1j[hj>ubah}(h]h ]h"]h$]h&]refdocjt refdomainjLreftyperef refexplicitrefwarnjzs2idleuh1hhhhKahj6ubh and }(hj6hhhNhNubh)}(h:ref:`standby `h]j\)}(hjdh]hstandby}(hjfhhhNhNubah}(h]h ](jgstdstd-refeh"]h$]h&]uh1j[hjbubah}(h]h ]h"]h$]h&]refdocjt refdomainjpreftyperef refexplicitrefwarnjzstandbyuh1hhhhKahj6ubhh and it may be necessary to rely on the platform for setting up the wakeup functionality as appropriate.}(hj6hhhNhNubeh}(h]h ]h"]h$]h&]uh1j|hhhKahjhhubj})}(hS2RAM is supported if the :c:macro:`CONFIG_SUSPEND` kernel configuration option is set and the support for it is registered by the platform with the core system suspend subsystem. On ACPI-based systems it is mapped to the S3 system state defined by ACPI.h](hS2RAM is supported if the }(hjhhhNhNubh)}(h:c:macro:`CONFIG_SUSPEND`h]j)}(hjh]hCONFIG_SUSPEND}(hjhhhNhNubah}(h]h ](jgjc-macroeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocjt refdomainjreftypemacro refexplicitrefwarnjzCONFIG_SUSPENDuh1hhhhKfhjubh kernel configuration option is set and the support for it is registered by the platform with the core system suspend subsystem. On ACPI-based systems it is mapped to the S3 system state defined by ACPI.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j|hhhKfhjhhubj)}(h.. _hibernation:h]h}(h]h ]h"]h$]h&]j  hibernationuh1jhKhjhhhhubeh}(h](suspend-to-ramjeh ]h"](suspend-to-rams2rameh$]h&]uh1jGhjhhhhhKLj}jjsj}jjsubjH)}(hhh](jM)}(h Hibernationh]h Hibernation}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jLhjhhhhhKnubj})}(hX%This state (also referred to as Suspend-to-Disk or STD) offers the greatest energy savings and can be used even in the absence of low-level platform support for system suspend. However, it requires some low-level code for resuming the system to be present for the underlying CPU architecture.h]hX%This state (also referred to as Suspend-to-Disk or STD) offers the greatest energy savings and can be used even in the absence of low-level platform support for system suspend. However, it requires some low-level code for resuming the system to be present for the underlying CPU architecture.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKphjhhubj})}(hHibernation is significantly different from any of the system suspend variants. It takes three system state changes to put it into hibernation and two system state changes to resume it.h]hHibernation is significantly different from any of the system suspend variants. It takes three system state changes to put it into hibernation and two system state changes to resume it.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKuhjhhubj})}(hXFirst, when hibernation is triggered, the kernel stops all system activity and creates a snapshot image of memory to be written into persistent storage. Next, the system goes into a state in which the snapshot image can be saved, the image is written out and finally the system goes into the target low-power state in which power is cut from almost all of its hardware components, including memory, except for a limited set of wakeup devices.h]hXFirst, when hibernation is triggered, the kernel stops all system activity and creates a snapshot image of memory to be written into persistent storage. Next, the system goes into a state in which the snapshot image can be saved, the image is written out and finally the system goes into the target low-power state in which power is cut from almost all of its hardware components, including memory, except for a limited set of wakeup devices.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKyhjhhubj})}(hXOnce the snapshot image has been written out, the system may either enter a special low-power state (like ACPI S4), or it may simply power down itself. Powering down means minimum power draw and it allows this mechanism to work on any system. However, entering a special low-power state may allow additional means of system wakeup to be used (e.g. pressing a key on the keyboard or opening a laptop lid).h]hXOnce the snapshot image has been written out, the system may either enter a special low-power state (like ACPI S4), or it may simply power down itself. Powering down means minimum power draw and it allows this mechanism to work on any system. However, entering a special low-power state may allow additional means of system wakeup to be used (e.g. pressing a key on the keyboard or opening a laptop lid).}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhjhhubj})}(hXbAfter wakeup, control goes to the platform firmware that runs a boot loader which boots a fresh instance of the kernel (control may also go directly to the boot loader, depending on the system configuration, but anyway it causes a fresh instance of the kernel to be booted). That new instance of the kernel (referred to as the ``restore kernel``) looks for a hibernation image in persistent storage and if one is found, it is loaded into memory. Next, all activity in the system is stopped and the restore kernel overwrites itself with the image contents and jumps into a special trampoline area in the original kernel stored in the image (referred to as the ``image kernel``), which is where the special architecture-specific low-level code is needed. Finally, the image kernel restores the system to the pre-hibernation state and allows user space to run again.h](hXHAfter wakeup, control goes to the platform firmware that runs a boot loader which boots a fresh instance of the kernel (control may also go directly to the boot loader, depending on the system configuration, but anyway it causes a fresh instance of the kernel to be booted). That new instance of the kernel (referred to as the }(hj hhhNhNubj)}(h``restore kernel``h]hrestore kernel}(hj$ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubhX;) looks for a hibernation image in persistent storage and if one is found, it is loaded into memory. Next, all activity in the system is stopped and the restore kernel overwrites itself with the image contents and jumps into a special trampoline area in the original kernel stored in the image (referred to as the }(hj hhhNhNubj)}(h``image kernel``h]h image kernel}(hj6 hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh), which is where the special architecture-specific low-level code is needed. Finally, the image kernel restores the system to the pre-hibernation state and allows user space to run again.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1j|hhhKhjhhubj})}(hHibernation is supported if the :c:macro:`CONFIG_HIBERNATION` kernel configuration option is set. However, this option can only be set if support for the given CPU architecture includes the low-level code for system resume.h](h Hibernation is supported if the }(hjN hhhNhNubh)}(h:c:macro:`CONFIG_HIBERNATION`h]j)}(hjX h]hCONFIG_HIBERNATION}(hjZ hhhNhNubah}(h]h ](jgjc-macroeh"]h$]h&]uh1jhjV ubah}(h]h ]h"]h$]h&]refdocjt refdomainjreftypemacro refexplicitrefwarnjzCONFIG_HIBERNATIONuh1hhhhKhjN ubh kernel configuration option is set. However, this option can only be set if support for the given CPU architecture includes the low-level code for system resume.}(hjN hhhNhNubeh}(h]h ]h"]h$]h&]uh1j|hhhKhjhhubeh}(h](jid2eh ]h"] hibernationah$] hibernationah&]uh1jGhjhhhhhKnjKj}j jsj}jjsubeh}(h]"sleep-states-that-can-be-supportedah ]h"]"sleep states that can be supportedah$]h&]uh1jGhjIhhhhhKubjH)}(hhh](jM)}(h=Basic ``sysfs`` Interfaces for System Suspend and Hibernationh](hBasic }(hj hhhNhNubj)}(h ``sysfs``h]hsysfs}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh. Interfaces for System Suspend and Hibernation}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1jLhj hhhhhKubj})}(hXMThe power management subsystem provides userspace with a unified ``sysfs`` interface for system sleep regardless of the underlying system architecture or platform. That interface is located in the :file:`/sys/power/` directory (assuming that ``sysfs`` is mounted at :file:`/sys`) and it consists of the following attributes (files):h](hAThe power management subsystem provides userspace with a unified }(hj hhhNhNubj)}(h ``sysfs``h]hsysfs}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh| interface for system sleep regardless of the underlying system architecture or platform. That interface is located in the }(hj hhhNhNubj)}(h:file:`/sys/power/`h]h /sys/power/}(hj hhhNhNubah}(h]h ]fileah"]h$]h&]rolefileuh1jhj ubh directory (assuming that }(hj hhhNhNubj)}(h ``sysfs``h]hsysfs}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh is mounted at }(hj hhhNhNubj)}(h :file:`/sys`h]h/sys}(hj hhhNhNubah}(h]h ]fileah"]h$]h&]rolefileuh1jhj ubh6) and it consists of the following attributes (files):}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1j|hhhKhj hhubhdefinition_list)}(hhh](hdefinition_list_item)}(hXr``state`` This file contains a list of strings representing sleep states supported by the kernel. Writing one of these strings into it causes the kernel to start a transition of the system into the sleep state represented by that string. In particular, the "disk", "freeze" and "standby" strings represent the :ref:`hibernation `, :ref:`suspend-to-idle ` and :ref:`standby ` sleep states, respectively. The "mem" string is interpreted in accordance with the contents of the ``mem_sleep`` file described below. If the kernel does not support any system sleep states, this file is not present. h](hterm)}(h ``state``h]j)}(hj h]hstate}(hj" hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j hhhKhj ubh definition)}(hhh](j})}(hThis file contains a list of strings representing sleep states supported by the kernel. Writing one of these strings into it causes the kernel to start a transition of the system into the sleep state represented by that string.h]hThis file contains a list of strings representing sleep states supported by the kernel. Writing one of these strings into it causes the kernel to start a transition of the system into the sleep state represented by that string.}(hj: hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhj7 ubj})}(hX.In particular, the "disk", "freeze" and "standby" strings represent the :ref:`hibernation `, :ref:`suspend-to-idle ` and :ref:`standby ` sleep states, respectively. The "mem" string is interpreted in accordance with the contents of the ``mem_sleep`` file described below.h](hTIn particular, the “disk”, “freeze” and “standby” strings represent the }(hjH hhhNhNubh)}(h :ref:`hibernation `h]j\)}(hjR h]h hibernation}(hjT hhhNhNubah}(h]h ](jgstdstd-refeh"]h$]h&]uh1j[hjP ubah}(h]h ]h"]h$]h&]refdocjt refdomainj^ reftyperef refexplicitrefwarnjz hibernationuh1hhhhKhjH ubh, }(hjH hhhNhNubh)}(h:ref:`suspend-to-idle `h]j\)}(hjv h]hsuspend-to-idle}(hjx hhhNhNubah}(h]h ](jgstdstd-refeh"]h$]h&]uh1j[hjt ubah}(h]h ]h"]h$]h&]refdocjt refdomainj reftyperef refexplicitrefwarnjzs2idleuh1hhhhKhjH ubh and }(hjH hhhNhNubh)}(h:ref:`standby `h]j\)}(hj h]hstandby}(hj hhhNhNubah}(h]h ](jgstdstd-refeh"]h$]h&]uh1j[hj ubah}(h]h ]h"]h$]h&]refdocjt refdomainj reftyperef refexplicitrefwarnjzstandbyuh1hhhhKhjH ubhi sleep states, respectively. The “mem” string is interpreted in accordance with the contents of the }(hjH hhhNhNubj)}(h ``mem_sleep``h]h mem_sleep}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjH ubh file described below.}(hjH hhhNhNubeh}(h]h ]h"]h$]h&]uh1j|hhhKhj7 ubj})}(hQIf the kernel does not support any system sleep states, this file is not present.h]hQIf the kernel does not support any system sleep states, this file is not present.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhj7 ubeh}(h]h ]h"]h$]h&]uh1j5 hj ubeh}(h]h ]h"]h$]h&]uh1j hhhKhj ubj )}(hXk``mem_sleep`` This file contains a list of strings representing supported system suspend variants and allows user space to select the variant to be associated with the "mem" string in the ``state`` file described above. The strings that may be present in this file are "s2idle", "shallow" and "deep". The "s2idle" string always represents :ref:`suspend-to-idle ` and, by convention, "shallow" and "deep" represent :ref:`standby ` and :ref:`suspend-to-RAM `, respectively. Writing one of the listed strings into this file causes the system suspend variant represented by it to be associated with the "mem" string in the ``state`` file. The string representing the suspend variant currently associated with the "mem" string in the ``state`` file is shown in square brackets. If the kernel does not support system suspend, this file is not present. h](j )}(h ``mem_sleep``h]j)}(hj h]h mem_sleep}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j hhhKhj ubj6 )}(hhh](j})}(hThis file contains a list of strings representing supported system suspend variants and allows user space to select the variant to be associated with the "mem" string in the ``state`` file described above.h](hThis file contains a list of strings representing supported system suspend variants and allows user space to select the variant to be associated with the “mem” string in the }(hj hhhNhNubj)}(h ``state``h]hstate}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh file described above.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1j|hhhKhj ubj})}(hXThe strings that may be present in this file are "s2idle", "shallow" and "deep". The "s2idle" string always represents :ref:`suspend-to-idle ` and, by convention, "shallow" and "deep" represent :ref:`standby ` and :ref:`suspend-to-RAM `, respectively.h](hThe strings that may be present in this file are “s2idle”, “shallow” and “deep”. The “s2idle” string always represents }(hj, hhhNhNubh)}(h:ref:`suspend-to-idle `h]j\)}(hj6 h]hsuspend-to-idle}(hj8 hhhNhNubah}(h]h ](jgstdstd-refeh"]h$]h&]uh1j[hj4 ubah}(h]h ]h"]h$]h&]refdocjt refdomainjB reftyperef refexplicitrefwarnjzs2idleuh1hhhhKhj, ubh< and, by convention, “shallow” and “deep” represent }(hj, hhhNhNubh)}(h:ref:`standby `h]j\)}(hjZ h]hstandby}(hj\ hhhNhNubah}(h]h ](jgstdstd-refeh"]h$]h&]uh1j[hjX ubah}(h]h ]h"]h$]h&]refdocjt refdomainjf reftyperef refexplicitrefwarnjzstandbyuh1hhhhKhj, ubh and }(hj, hhhNhNubh)}(h:ref:`suspend-to-RAM `h]j\)}(hj~ h]hsuspend-to-RAM}(hj hhhNhNubah}(h]h ](jgstdstd-refeh"]h$]h&]uh1j[hj| ubah}(h]h ]h"]h$]h&]refdocjt refdomainj reftyperef refexplicitrefwarnjzs2ramuh1hhhhKhj, ubh, respectively.}(hj, hhhNhNubeh}(h]h ]h"]h$]h&]uh1j|hhhKhj ubj})}(hX-Writing one of the listed strings into this file causes the system suspend variant represented by it to be associated with the "mem" string in the ``state`` file. The string representing the suspend variant currently associated with the "mem" string in the ``state`` file is shown in square brackets.h](hWriting one of the listed strings into this file causes the system suspend variant represented by it to be associated with the “mem” string in the }(hj hhhNhNubj)}(h ``state``h]hstate}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubhj file. The string representing the suspend variant currently associated with the “mem” string in the }(hj hhhNhNubj)}(h ``state``h]hstate}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh" file is shown in square brackets.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1j|hhhKhj ubj})}(hHIf the kernel does not support system suspend, this file is not present.h]hHIf the kernel does not support system suspend, this file is not present.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhj ubeh}(h]h ]h"]h$]h&]uh1j5 hj ubeh}(h]h ]h"]h$]h&]uh1j hhhKhj hhubj )}(hXV``disk`` This file controls the operating mode of hibernation (Suspend-to-Disk). Specifically, it tells the kernel what to do after creating a hibernation image. Reading from it returns a list of supported options encoded as: ``platform`` Put the system into a special low-power state (e.g. ACPI S4) to make additional wakeup options available and possibly allow the platform firmware to take a simplified initialization path after wakeup. It is only available if the platform provides a special mechanism to put the system to sleep after creating a hibernation image (platforms with ACPI do that as a rule, for example). ``shutdown`` Power off the system. ``reboot`` Reboot the system (useful for diagnostics mostly). ``suspend`` Hybrid system suspend. Put the system into the suspend sleep state selected through the ``mem_sleep`` file described above. If the system is successfully woken up from that state, discard the hibernation image and continue. Otherwise, use the image to restore the previous state of the system. It is available if system suspend is supported. ``test_resume`` Diagnostic operation. Load the image as though the system had just woken up from hibernation and the currently running kernel instance was a restore kernel and follow up with full system resume. Writing one of the strings listed above into this file causes the option represented by it to be selected. The currently selected option is shown in square brackets, which means that the operation represented by it will be carried out after creating and saving the image when hibernation is triggered by writing ``disk`` to :file:`/sys/power/state`. If the kernel does not support hibernation, this file is not present. h](j )}(h``disk``h]j)}(hj h]hdisk}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j hhhKhj ubj6 )}(hhh](j})}(hThis file controls the operating mode of hibernation (Suspend-to-Disk). Specifically, it tells the kernel what to do after creating a hibernation image.h]hThis file controls the operating mode of hibernation (Suspend-to-Disk). Specifically, it tells the kernel what to do after creating a hibernation image.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhj ubj})}(h?Reading from it returns a list of supported options encoded as:h]h?Reading from it returns a list of supported options encoded as:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhj ubj )}(hhh](j )}(hX``platform`` Put the system into a special low-power state (e.g. ACPI S4) to make additional wakeup options available and possibly allow the platform firmware to take a simplified initialization path after wakeup. It is only available if the platform provides a special mechanism to put the system to sleep after creating a hibernation image (platforms with ACPI do that as a rule, for example). h](j )}(h ``platform``h]j)}(hj5 h]hplatform}(hj7 hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3 ubah}(h]h ]h"]h$]h&]uh1j hhhKhj/ ubj6 )}(hhh](j})}(hPut the system into a special low-power state (e.g. ACPI S4) to make additional wakeup options available and possibly allow the platform firmware to take a simplified initialization path after wakeup.h]hPut the system into a special low-power state (e.g. ACPI S4) to make additional wakeup options available and possibly allow the platform firmware to take a simplified initialization path after wakeup.}(hjM hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhjJ ubj})}(hIt is only available if the platform provides a special mechanism to put the system to sleep after creating a hibernation image (platforms with ACPI do that as a rule, for example).h]hIt is only available if the platform provides a special mechanism to put the system to sleep after creating a hibernation image (platforms with ACPI do that as a rule, for example).}(hj[ hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhjJ ubeh}(h]h ]h"]h$]h&]uh1j5 hj/ ubeh}(h]h ]h"]h$]h&]uh1j hhhKhj, ubj )}(h#``shutdown`` Power off the system. h](j )}(h ``shutdown``h]j)}(hj{ h]hshutdown}(hj} hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjy ubah}(h]h ]h"]h$]h&]uh1j hhhKhju ubj6 )}(hhh]j})}(hPower off the system.h]hPower off the system.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhj ubah}(h]h ]h"]h$]h&]uh1j5 hju ubeh}(h]h ]h"]h$]h&]uh1j hhhKhj, ubj )}(h>``reboot`` Reboot the system (useful for diagnostics mostly). h](j )}(h ``reboot``h]j)}(hj h]hreboot}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j hhhKhj ubj6 )}(hhh]j})}(h2Reboot the system (useful for diagnostics mostly).h]h2Reboot the system (useful for diagnostics mostly).}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhj ubah}(h]h ]h"]h$]h&]uh1j5 hj ubeh}(h]h ]h"]h$]h&]uh1j hhhKhj, ubj )}(hXe``suspend`` Hybrid system suspend. Put the system into the suspend sleep state selected through the ``mem_sleep`` file described above. If the system is successfully woken up from that state, discard the hibernation image and continue. Otherwise, use the image to restore the previous state of the system. It is available if system suspend is supported. h](j )}(h ``suspend``h]j)}(hj h]hsuspend}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j hhhKhj ubj6 )}(hhh](j})}(hX'Hybrid system suspend. Put the system into the suspend sleep state selected through the ``mem_sleep`` file described above. If the system is successfully woken up from that state, discard the hibernation image and continue. Otherwise, use the image to restore the previous state of the system.h](hYHybrid system suspend. Put the system into the suspend sleep state selected through the }(hj hhhNhNubj)}(h ``mem_sleep``h]h mem_sleep}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh file described above. If the system is successfully woken up from that state, discard the hibernation image and continue. Otherwise, use the image to restore the previous state of the system.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1j|hhhKhj ubj})}(h/It is available if system suspend is supported.h]h/It is available if system suspend is supported.}(hj# hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhj ubeh}(h]h ]h"]h$]h&]uh1j5 hj ubeh}(h]h ]h"]h$]h&]uh1j hhhKhj, ubj )}(h``test_resume`` Diagnostic operation. Load the image as though the system had just woken up from hibernation and the currently running kernel instance was a restore kernel and follow up with full system resume. h](j )}(h``test_resume``h]j)}(hjC h]h test_resume}(hjE hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjA ubah}(h]h ]h"]h$]h&]uh1j hhhKhj= ubj6 )}(hhh]j})}(hDiagnostic operation. Load the image as though the system had just woken up from hibernation and the currently running kernel instance was a restore kernel and follow up with full system resume.h]hDiagnostic operation. Load the image as though the system had just woken up from hibernation and the currently running kernel instance was a restore kernel and follow up with full system resume.}(hj[ hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhjX ubah}(h]h ]h"]h$]h&]uh1j5 hj= ubeh}(h]h ]h"]h$]h&]uh1j hhhKhj, ubeh}(h]h ]h"]h$]h&]uh1j hj ubj})}(hjWriting one of the strings listed above into this file causes the option represented by it to be selected.h]hjWriting one of the strings listed above into this file causes the option represented by it to be selected.}(hj{ hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhj ubj})}(hThe currently selected option is shown in square brackets, which means that the operation represented by it will be carried out after creating and saving the image when hibernation is triggered by writing ``disk`` to :file:`/sys/power/state`.h](hThe currently selected option is shown in square brackets, which means that the operation represented by it will be carried out after creating and saving the image when hibernation is triggered by writing }(hj hhhNhNubj)}(h``disk``h]hdisk}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh to }(hj hhhNhNubj)}(h:file:`/sys/power/state`h]h/sys/power/state}(hj hhhNhNubah}(h]h ]fileah"]h$]h&]rolefileuh1jhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1j|hhhKhj ubj})}(hEIf the kernel does not support hibernation, this file is not present.h]hEIf the kernel does not support hibernation, this file is not present.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhj ubeh}(h]h ]h"]h$]h&]uh1j5 hj ubeh}(h]h ]h"]h$]h&]uh1j hhhKhj hhubj )}(hX``image_size`` This file controls the size of hibernation images. It can be written a string representing a non-negative integer that will be used as a best-effort upper limit of the image size, in bytes. The hibernation core will do its best to ensure that the image size will not exceed that number, but if that turns out to be impossible to achieve, a hibernation image will still be created and its size will be as small as possible. In particular, writing '0' to this file causes the size of hibernation images to be minimum. Reading from it returns the current image size limit, which is set to around 2/5 of the available RAM size by default. h](j )}(h``image_size``h]j)}(hj h]h image_size}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j hhhMhj ubj6 )}(hhh](j})}(h2This file controls the size of hibernation images.h]h2This file controls the size of hibernation images.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhj ubj})}(hXIt can be written a string representing a non-negative integer that will be used as a best-effort upper limit of the image size, in bytes. The hibernation core will do its best to ensure that the image size will not exceed that number, but if that turns out to be impossible to achieve, a hibernation image will still be created and its size will be as small as possible. In particular, writing '0' to this file causes the size of hibernation images to be minimum.h]hXIt can be written a string representing a non-negative integer that will be used as a best-effort upper limit of the image size, in bytes. The hibernation core will do its best to ensure that the image size will not exceed that number, but if that turns out to be impossible to achieve, a hibernation image will still be created and its size will be as small as possible. In particular, writing ‘0’ to this file causes the size of hibernation images to be minimum.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhj ubj})}(hvReading from it returns the current image size limit, which is set to around 2/5 of the available RAM size by default.h]hvReading from it returns the current image size limit, which is set to around 2/5 of the available RAM size by default.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhMhj ubeh}(h]h ]h"]h$]h&]uh1j5 hj ubeh}(h]h ]h"]h$]h&]uh1j hhhMhj hhubj )}(hX``pm_trace`` This file controls the "PM trace" mechanism saving the last suspend or resume event point in the RTC memory across reboots. It helps to debug hard lockups or reboots due to device driver failures that occur during system suspend or resume (which is more common) more effectively. If it contains "1", the fingerprint of each suspend/resume event point in turn will be stored in the RTC memory (overwriting the actual RTC information), so it will survive a system crash if one occurs right after storing it and it can be used later to identify the driver that caused the crash to happen. It contains "0" by default, which may be changed to "1" by writing a string representing a nonzero integer into it. h](j )}(h ``pm_trace``h]j)}(hj2h]hpm_trace}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubah}(h]h ]h"]h$]h&]uh1j hhhMhj,ubj6 )}(hhh](j})}(hXThis file controls the "PM trace" mechanism saving the last suspend or resume event point in the RTC memory across reboots. It helps to debug hard lockups or reboots due to device driver failures that occur during system suspend or resume (which is more common) more effectively.h]hXThis file controls the “PM trace” mechanism saving the last suspend or resume event point in the RTC memory across reboots. It helps to debug hard lockups or reboots due to device driver failures that occur during system suspend or resume (which is more common) more effectively.}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhMhjGubj})}(hX1If it contains "1", the fingerprint of each suspend/resume event point in turn will be stored in the RTC memory (overwriting the actual RTC information), so it will survive a system crash if one occurs right after storing it and it can be used later to identify the driver that caused the crash to happen.h]hX5If it contains “1”, the fingerprint of each suspend/resume event point in turn will be stored in the RTC memory (overwriting the actual RTC information), so it will survive a system crash if one occurs right after storing it and it can be used later to identify the driver that caused the crash to happen.}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhM hjGubj})}(hsIt contains "0" by default, which may be changed to "1" by writing a string representing a nonzero integer into it.h]h{It contains “0” by default, which may be changed to “1” by writing a string representing a nonzero integer into it.}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhMhjGubeh}(h]h ]h"]h$]h&]uh1j5 hj,ubeh}(h]h ]h"]h$]h&]uh1j hhhMhj hhubeh}(h]h ]h"]h$]h&]uh1j hj hhhhhNubj})}(hXAccording to the above, there are two ways to make the system go into the :ref:`suspend-to-idle ` state. The first one is to write "freeze" directly to :file:`/sys/power/state`. The second one is to write "s2idle" to :file:`/sys/power/mem_sleep` and then to write "mem" to :file:`/sys/power/state`. Likewise, there are two ways to make the system go into the :ref:`standby ` state (the strings to write to the control files in that case are "standby" or "shallow" and "mem", respectively) if that state is supported by the platform. However, there is only one way to make the system go into the :ref:`suspend-to-RAM ` state (write "deep" into :file:`/sys/power/mem_sleep` and "mem" into :file:`/sys/power/state`).h](hJAccording to the above, there are two ways to make the system go into the }(hjhhhNhNubh)}(h:ref:`suspend-to-idle `h]j\)}(hjh]hsuspend-to-idle}(hjhhhNhNubah}(h]h ](jgstdstd-refeh"]h$]h&]uh1j[hjubah}(h]h ]h"]h$]h&]refdocjt refdomainjreftyperef refexplicitrefwarnjzs2idleuh1hhhhMhjubh< state. The first one is to write “freeze” directly to }(hjhhhNhNubj)}(h:file:`/sys/power/state`h]h/sys/power/state}(hjhhhNhNubah}(h]h ]fileah"]h$]h&]rolefileuh1jhjubh.. The second one is to write “s2idle” to }(hjhhhNhNubj)}(h:file:`/sys/power/mem_sleep`h]h/sys/power/mem_sleep}(hjhhhNhNubah}(h]h ]fileah"]h$]h&]rolefileuh1jhjubh and then to write “mem” to }(hjhhhNhNubj)}(h:file:`/sys/power/state`h]h/sys/power/state}(hjhhhNhNubah}(h]h ]fileah"]h$]h&]rolefileuh1jhjubh?. Likewise, there are two ways to make the system go into the }(hjhhhNhNubh)}(h:ref:`standby `h]j\)}(hjh]hstandby}(hjhhhNhNubah}(h]h ](jgstdstd-refeh"]h$]h&]uh1j[hjubah}(h]h ]h"]h$]h&]refdocjt refdomainjreftyperef refexplicitrefwarnjzstandbyuh1hhhhMhjubh state (the strings to write to the control files in that case are “standby” or “shallow” and “mem”, respectively) if that state is supported by the platform. However, there is only one way to make the system go into the }(hjhhhNhNubh)}(h:ref:`suspend-to-RAM `h]j\)}(hjh]hsuspend-to-RAM}(hjhhhNhNubah}(h]h ](jgstdstd-refeh"]h$]h&]uh1j[hjubah}(h]h ]h"]h$]h&]refdocjt refdomainj#reftyperef refexplicitrefwarnjzs2ramuh1hhhhMhjubh state (write “deep” into }(hjhhhNhNubj)}(h:file:`/sys/power/mem_sleep`h]h/sys/power/mem_sleep}(hj9hhhNhNubah}(h]h ]fileah"]h$]h&]rolefileuh1jhjubh and “mem” into }(hjhhhNhNubj)}(h:file:`/sys/power/state`h]h/sys/power/state}(hjNhhhNhNubah}(h]h ]fileah"]h$]h&]rolefileuh1jhjubh).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j|hhhMhj hhubj})}(hXThe default suspend variant (ie. the one to be used without writing anything into :file:`/sys/power/mem_sleep`) is either "deep" (on the majority of systems supporting :ref:`suspend-to-RAM `) or "s2idle", but it can be overridden by the value of the ``mem_sleep_default`` parameter in the kernel command line. On some systems with ACPI, depending on the information in the ACPI tables, the default may be "s2idle" even if :ref:`suspend-to-RAM ` is supported in principle.h](hRThe default suspend variant (ie. the one to be used without writing anything into }(hjihhhNhNubj)}(h:file:`/sys/power/mem_sleep`h]h/sys/power/mem_sleep}(hjqhhhNhNubah}(h]h ]fileah"]h$]h&]rolefileuh1jhjiubh>) is either “deep” (on the majority of systems supporting }(hjihhhNhNubh)}(h:ref:`suspend-to-RAM `h]j\)}(hjh]hsuspend-to-RAM}(hjhhhNhNubah}(h]h ](jgstdstd-refeh"]h$]h&]uh1j[hjubah}(h]h ]h"]h$]h&]refdocjt refdomainjreftyperef refexplicitrefwarnjzs2ramuh1hhhhMhjiubh@) or “s2idle”, but it can be overridden by the value of the }(hjihhhNhNubj)}(h``mem_sleep_default``h]hmem_sleep_default}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjiubh parameter in the kernel command line. On some systems with ACPI, depending on the information in the ACPI tables, the default may be “s2idle” even if }(hjihhhNhNubh)}(h:ref:`suspend-to-RAM `h]j\)}(hjh]hsuspend-to-RAM}(hjhhhNhNubah}(h]h ](jgstdstd-refeh"]h$]h&]uh1j[hjubah}(h]h ]h"]h$]h&]refdocjt refdomainjreftyperef refexplicitrefwarnjzs2ramuh1hhhhMhjiubh is supported in principle.}(hjihhhNhNubeh}(h]h ]h"]h$]h&]uh1j|hhhMhj hhubeh}(h]9basic-sysfs-interfaces-for-system-suspend-and-hibernationah ]h"]9basic sysfs interfaces for system suspend and hibernationah$]h&]uh1jGhjIhhhhhKubeh}(h]system-sleep-statesah ]h"]system sleep statesah$]h&]uh1jGhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(jLN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}(hhhhhhj jjjj*jj9j-jHj<jWjKjfjZjujijjxjjjjjjjjjjjjjjjjj jjjj)jj8j,jGj;jVjJjejYjtjhjjwjjjjjjjjjjjjjjjjj jjj j(jj7j+jFj:jUjIjdjXjsjgjjvjjjjjjjjjjjjjjjjj jjj j'jj6j*jEj9jTjHjcjWjrjfjjujjjjjjjjjjjjjjjjjjjj j&jj5j)jDj8usubstitution_names}(amphߌaposhasthbrvbarj bsoljcentj*colonj9commajHcommatjWcopyjfcurrenjudarrjdegjdividejdollarjequalsjexcljfrac12jfrac14jfrac18jfrac34j frac38jfrac58j)frac78j8gtjGhalfjVhorbarjehyphenjtiexcljiquestjlaquojlarrjlcubjldquojlowbarjlparjlsqbjlsquoj ltjmicroj(middotj7nbspjFnotjUnumjdohmjsordfjordmjparajpercntjperiodjplusjplusmnjpoundjquestjquotj raquojrarrj'rcubj6rdquojEregjTrparjcrsqbjrrsquojsectjsemijshyjsoljsungjsup1jsup2jsup3jtimesjtradejuarrj&verbarj5yenjDurefnames}refids}(j!]jaj]jaj]jaj]jaunameids}(jjj j jj!jjjjjjjjj jjju nametypes}(jj jjjjjj juh}(jjIj jj!j"jj"jjjjjjjjjjj jjj u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}j'KsRparse_messages](hsystem_message)}(hhh]j})}(h*Duplicate implicit target name: "standby".h]h.Duplicate implicit target name: “standby”.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j|hjubah}(h]h ]h"]h$]h&]jalevelKtypeINFOsourcehlineK2uh1jhjhhhhhK2ubj)}(hhh]j})}(h.Duplicate implicit target name: "hibernation".h]h2Duplicate implicit target name: “hibernation”.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j|hjubah}(h]h ]h"]h$]h&]j alevelKtypejsourcehlineKnuh1jhjhhhhhKnubetransform_messages](j)}(hhh]j})}(hhh]h,Hyperlink target "s2idle" is not referenced.}hj sbah}(h]h ]h"]h$]h&]uh1j|hjubah}(h]h ]h"]h$]h&]levelKtypejsourcehlineKpuh1jubj)}(hhh]j})}(hhh]h-Hyperlink target "standby" is not referenced.}hj#sbah}(h]h ]h"]h$]h&]uh1j|hj ubah}(h]h ]h"]h$]h&]levelKtypejsourcehlineKuh1jubj)}(hhh]j})}(hhh]h+Hyperlink target "s2ram" is not referenced.}hj=sbah}(h]h ]h"]h$]h&]uh1j|hj:ubah}(h]h ]h"]h$]h&]levelKtypejsourcehlineKuh1jubj)}(hhh]j})}(hhh]h1Hyperlink target "hibernation" is not referenced.}hjWsbah}(h]h ]h"]h$]h&]uh1j|hjTubah}(h]h ]h"]h$]h&]levelKtypejsourcehlineKuh1jube transformerN include_log]-Documentation/admin-guide/pm/sleep-states.rst(NNNNta decorationNhhub.