sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}(hhparenthuba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget /translations/zh_CN/power/swsuspmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}(hhhh2ubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget /translations/zh_TW/power/swsuspmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}(hhhhFubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget /translations/it_IT/power/swsuspmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}(hhhhZubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget /translations/ja_JP/power/swsuspmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}(hhhhnubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget /translations/ko_KR/power/swsuspmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}(hhhhubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget /translations/sp_SP/power/swsuspmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(h Swap suspendh]h Swap suspend}(hhhhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhh:/var/lib/git/docbuild/linux/Documentation/power/swsusp.rsthKubh paragraph)}(hSome warnings, first.h]hSome warnings, first.}(hhhhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubhwarning)}(hXP**BIG FAT WARNING** If you touch anything on disk between suspend and resume... ...kiss your data goodbye. If you do resume from initrd after your filesystems are mounted... ...bye bye root partition. [this is actually same case as above] If you have unsupported ( ) devices using DMA, you may have some problems. If your disk driver does not support suspend... (IDE does), it may cause some problems, too. If you change kernel command line between suspend and resume, it may do something wrong. If you change your hardware while system is suspended... well, it was not good idea; but it will probably only crash. ( ) suspend/resume support is needed to make it safe. If you have any filesystems on USB devices mounted before software suspend, they won't be accessible after resume and you may lose data, as though you have unplugged the USB devices with mounted filesystems on them; see the FAQ below for details. (This is not true for more traditional power states like "standby", which normally don't turn USB off.)h](h)}(h**BIG FAT WARNING**h]hstrong)}(hhh]hBIG FAT WARNING}(hhhhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhubah}(h]h ]h"]h$]h&]uh1hhhhK hhubhdefinition_list)}(hhh](hdefinition_list_item)}(hWIf you touch anything on disk between suspend and resume... ...kiss your data goodbye. h](hterm)}(h;If you touch anything on disk between suspend and resume...h]h;If you touch anything on disk between suspend and resume...}(hhhhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhubh definition)}(hhh]h)}(h...kiss your data goodbye.h]h...kiss your data goodbye.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hjubah}(h]h ]h"]h$]h&]uh1jhhubeh}(h]h ]h"]h$]h&]uh1hhhhK hhubh)}(hIf you do resume from initrd after your filesystems are mounted... ...bye bye root partition. [this is actually same case as above] h](h)}(hBIf you do resume from initrd after your filesystems are mounted...h]hBIf you do resume from initrd after your filesystems are mounted...}(hj&hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubj)}(hhh](h block_quote)}(hhh]h)}(h...bye bye root partition.h]h...bye bye root partition.}(hj<hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj7ubah}(h]h ]h"]h$]h&]uh1j5hj2ubh)}(h%[this is actually same case as above]h]h%[this is actually same case as above]}(hjPhjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj2ubeh}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1hhhhKhhubeh}(h]h ]h"]h$]h&]uh1hhhubh)}(hXvIf you have unsupported ( ) devices using DMA, you may have some problems. If your disk driver does not support suspend... (IDE does), it may cause some problems, too. If you change kernel command line between suspend and resume, it may do something wrong. If you change your hardware while system is suspended... well, it was not good idea; but it will probably only crash.h]hXvIf you have unsupported ( ) devices using DMA, you may have some problems. If your disk driver does not support suspend... (IDE does), it may cause some problems, too. If you change kernel command line between suspend and resume, it may do something wrong. If you change your hardware while system is suspended... well, it was not good idea; but it will probably only crash.}(hjphjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhubh)}(h5( ) suspend/resume support is needed to make it safe.h]h5( ) suspend/resume support is needed to make it safe.}(hj~hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhubh)}(hX_If you have any filesystems on USB devices mounted before software suspend, they won't be accessible after resume and you may lose data, as though you have unplugged the USB devices with mounted filesystems on them; see the FAQ below for details. (This is not true for more traditional power states like "standby", which normally don't turn USB off.)h]hXgIf you have any filesystems on USB devices mounted before software suspend, they won’t be accessible after resume and you may lose data, as though you have unplugged the USB devices with mounted filesystems on them; see the FAQ below for details. (This is not true for more traditional power states like “standby”, which normally don’t turn USB off.)}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhubeh}(h]h ]h"]h$]h&]uh1hhhhhhhhNubh)}(hhh](h)}(hSwap partition: You need to append resume=/dev/your_swap_partition to kernel command line or specify it using /sys/power/resume. h](h)}(hSwap partition:h]hSwap partition:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK$hjubj)}(hhh]h)}(hpYou need to append resume=/dev/your_swap_partition to kernel command line or specify it using /sys/power/resume.h]hpYou need to append resume=/dev/your_swap_partition to kernel command line or specify it using /sys/power/resume.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK#hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhK$hjubh)}(hSwap file: If using a swapfile you can also specify a resume offset using resume_offset= on the kernel command line or specify it in /sys/power/resume_offset. h](h)}(h Swap file:h]h Swap file:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK)hjubj)}(hhh]h)}(hIf using a swapfile you can also specify a resume offset using resume_offset= on the kernel command line or specify it in /sys/power/resume_offset.h]hIf using a swapfile you can also specify a resume offset using resume_offset= on the kernel command line or specify it in /sys/power/resume_offset.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK'hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhK)hjhhubeh}(h]h ]h"]h$]h&]uh1hhhhhhhhNubh)}(h%After preparing then you suspend by::h]h$After preparing then you suspend by:}(h$After preparing then you suspend by:hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK+hhhhubh literal_block)}(h=echo shutdown > /sys/power/disk; echo disk > /sys/power/stateh]h=echo shutdown > /sys/power/disk; echo disk > /sys/power/state}(hhhjubah}(h]h ]h"]h$]h&] xml:spacepreserveuh1jhhhK-hhhhubh bullet_list)}(hhh](h list_item)}(hIf you feel ACPI works pretty well on your system, you might try:: echo platform > /sys/power/disk; echo disk > /sys/power/state h](h)}(hBIf you feel ACPI works pretty well on your system, you might try::h]hAIf you feel ACPI works pretty well on your system, you might try:}(hAIf you feel ACPI works pretty well on your system, you might try:hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK/hj-ubj)}(h=echo platform > /sys/power/disk; echo disk > /sys/power/stateh]h=echo platform > /sys/power/disk; echo disk > /sys/power/state}(hhhj@ubah}(h]h ]h"]h$]h&]j$j%uh1jhhhK1hj-ubeh}(h]h ]h"]h$]h&]uh1j+hj(hhhhhNubj,)}(hIf you would like to write hibernation image to swap and then suspend to RAM (provided your platform supports it), you can try:: echo suspend > /sys/power/disk; echo disk > /sys/power/state h](h)}(hIf you would like to write hibernation image to swap and then suspend to RAM (provided your platform supports it), you can try::h]hIf you would like to write hibernation image to swap and then suspend to RAM (provided your platform supports it), you can try:}(hIf you would like to write hibernation image to swap and then suspend to RAM (provided your platform supports it), you can try:hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK3hjTubj)}(h /sys/power/disk; echo disk > /sys/power/stateh]h /sys/power/disk; echo disk > /sys/power/state}(hhhjgubah}(h]h ]h"]h$]h&]j$j%uh1jhhhK6hjTubeh}(h]h ]h"]h$]h&]uh1j+hj(hhhhhNubj,)}(hXIf you have SATA disks, you'll need recent kernels with SATA suspend support. For suspend and resume to work, make sure your disk drivers are built into kernel -- not modules. [There's way to make suspend/resume with modular disk drivers, see FAQ, but you probably should not do that.] h]h)}(hXIf you have SATA disks, you'll need recent kernels with SATA suspend support. For suspend and resume to work, make sure your disk drivers are built into kernel -- not modules. [There's way to make suspend/resume with modular disk drivers, see FAQ, but you probably should not do that.]h]hX!If you have SATA disks, you’ll need recent kernels with SATA suspend support. For suspend and resume to work, make sure your disk drivers are built into kernel -- not modules. [There’s way to make suspend/resume with modular disk drivers, see FAQ, but you probably should not do that.]}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK8hj{ubah}(h]h ]h"]h$]h&]uh1j+hj(hhhhhNubeh}(h]h ]h"]h$]h&]bullet-uh1j&hhhK/hhhhubh)}(hhhhhubj)}(hecho N > /sys/power/image_sizeh]hecho N > /sys/power/image_size}(hhhjubah}(h]h ]h"]h$]h&]j$j%uh1jhhhK@hhhhubh)}(hIbefore suspend (it is limited to around 2/5 of available RAM by default).h]hIbefore suspend (it is limited to around 2/5 of available RAM by default).}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKBhhhhubj')}(hhh](j,)}(hThe resume process checks for the presence of the resume device, if found, it then checks the contents for the hibernation image signature. If both are found, it resumes the hibernation image. h]h)}(hThe resume process checks for the presence of the resume device, if found, it then checks the contents for the hibernation image signature. If both are found, it resumes the hibernation image.h]hThe resume process checks for the presence of the resume device, if found, it then checks the contents for the hibernation image signature. If both are found, it resumes the hibernation image.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKDhjubah}(h]h ]h"]h$]h&]uh1j+hjhhhhhNubj,)}(hX The resume process may be triggered in two ways: 1) During lateinit: If resume=/dev/your_swap_partition is specified on the kernel command line, lateinit runs the resume process. If the resume device has not been probed yet, the resume process fails and bootup continues. 2) Manually from an initrd or initramfs: May be run from the init script by using the /sys/power/resume file. It is vital that this be done prior to remounting any filesystems (even as read-only) otherwise data may be corrupted. h](h)}(h0The resume process may be triggered in two ways:h]h0The resume process may be triggered in two ways:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKHhjubhenumerated_list)}(hhh](j,)}(hDuring lateinit: If resume=/dev/your_swap_partition is specified on the kernel command line, lateinit runs the resume process. If the resume device has not been probed yet, the resume process fails and bootup continues.h]h)}(hDuring lateinit: If resume=/dev/your_swap_partition is specified on the kernel command line, lateinit runs the resume process. If the resume device has not been probed yet, the resume process fails and bootup continues.h]hDuring lateinit: If resume=/dev/your_swap_partition is specified on the kernel command line, lateinit runs the resume process. If the resume device has not been probed yet, the resume process fails and bootup continues.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKJhjubah}(h]h ]h"]h$]h&]uh1j+hjubj,)}(hManually from an initrd or initramfs: May be run from the init script by using the /sys/power/resume file. It is vital that this be done prior to remounting any filesystems (even as read-only) otherwise data may be corrupted. h]h)}(hManually from an initrd or initramfs: May be run from the init script by using the /sys/power/resume file. It is vital that this be done prior to remounting any filesystems (even as read-only) otherwise data may be corrupted.h]hManually from an initrd or initramfs: May be run from the init script by using the /sys/power/resume file. It is vital that this be done prior to remounting any filesystems (even as read-only) otherwise data may be corrupted.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKNhjubah}(h]h ]h"]h$]h&]uh1j+hjubeh}(h]h ]h"]h$]h&]enumtypearabicprefixhsuffix)uh1jhjubeh}(h]h ]h"]h$]h&]uh1j+hjhhhNhNubeh}(h]h ]h"]h$]h&]jjuh1j&hhhKDhhhhubh)}(hhh](h)}(hDArticle about goals and implementation of Software Suspend for Linuxh]hDArticle about goals and implementation of Software Suspend for Linux}(hjDhjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj?hhhhhKTubh)}(h /proc/acpi/sleep # for standby echo 2 > /proc/acpi/sleep # for suspend to ram echo 3 > /proc/acpi/sleep # for suspend to ram, but with more power # conservative echo 4 > /proc/acpi/sleep # for suspend to disk echo 5 > /proc/acpi/sleep # for shutdown unfriendly the systemh]hXVecho 1 > /proc/acpi/sleep # for standby echo 2 > /proc/acpi/sleep # for suspend to ram echo 3 > /proc/acpi/sleep # for suspend to ram, but with more power # conservative echo 4 > /proc/acpi/sleep # for suspend to disk echo 5 > /proc/acpi/sleep # for shutdown unfriendly the system}(hhhjubah}(h]h ]h"]h$]h&]j$j%uh1jhhhKwhjhhubh)}(h and perhaps::h]h and perhaps:}(h and perhaps:hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK~hjhhubj)}(h@echo 4b > /proc/acpi/sleep # for suspend to disk via s4biosh]h@echo 4b > /proc/acpi/sleep # for suspend to disk via s4bios}(hhhj0ubah}(h]h ]h"]h$]h&]j$j%uh1jhhhKhjhhubeh}(h]sleep-states-summaryah ]h"]sleep states summaryah$]h&]uh1hhhhhhhhKpubh)}(hhh](h)}(hFrequently Asked Questionsh]hFrequently Asked Questions}(hjKhjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFhhhhhKubh)}(hhh](h)}(hTQ: well, suspending a server is IMHO a really stupid thing, but... (Diego Zuccato): h](h)}(hQ:h]hQ:}(hj`hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjZubj)}(hhh]h)}(hPwell, suspending a server is IMHO a really stupid thing, but... (Diego Zuccato):h]hPwell, suspending a server is IMHO a really stupid thing, but... (Diego Zuccato):}(hjqhjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjlubah}(h]h ]h"]h$]h&]uh1jhjZubeh}(h]h ]h"]h$]h&]uh1hhhhKhjWubh)}(hXA: You bought new UPS for your server. How do you install it without bringing machine down? Suspend to disk, rearrange power cables, resume. You have your server on UPS. Power died, and UPS is indicating 30 seconds to failure. What do you do? Suspend to disk. h](h)}(hA:h]hA:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj)}(hhh](h)}(hYou bought new UPS for your server. How do you install it without bringing machine down? Suspend to disk, rearrange power cables, resume.h]hYou bought new UPS for your server. How do you install it without bringing machine down? Suspend to disk, rearrange power cables, resume.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hvYou have your server on UPS. Power died, and UPS is indicating 30 seconds to failure. What do you do? Suspend to disk.h]hvYou have your server on UPS. Power died, and UPS is indicating 30 seconds to failure. What do you do? Suspend to disk.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhKhjWhhubh)}(hJQ: Maybe I'm missing something, but why don't the regular I/O paths work? h](h)}(hQ:h]hQ:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj)}(hhh]h)}(hFMaybe I'm missing something, but why don't the regular I/O paths work?h]hJMaybe I’m missing something, but why don’t the regular I/O paths work?}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhKhjWhhubh)}(hXA: We do use the regular I/O paths. However we cannot restore the data to its original location as we load it. That would create an inconsistent kernel state which would certainly result in an oops. Instead, we load the image into unused memory and then atomically copy it back to it original location. This implies, of course, a maximum image size of half the amount of memory. There are two solutions to this: * require half of memory to be free during suspend. That way you can read "new" data onto free spots, then cli and copy * assume we had special "polling" ide driver that only uses memory between 0-640KB. That way, I'd have to make sure that 0-640KB is free during suspending, but otherwise it would work... suspend2 shares this fundamental limitation, but does not include user data and disk caches into "used memory" by saving them in advance. That means that the limitation goes away in practice. h](h)}(hA:h]hA:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj)}(hhh](h)}(hXwWe do use the regular I/O paths. However we cannot restore the data to its original location as we load it. That would create an inconsistent kernel state which would certainly result in an oops. Instead, we load the image into unused memory and then atomically copy it back to it original location. This implies, of course, a maximum image size of half the amount of memory.h]hXwWe do use the regular I/O paths. However we cannot restore the data to its original location as we load it. That would create an inconsistent kernel state which would certainly result in an oops. Instead, we load the image into unused memory and then atomically copy it back to it original location. This implies, of course, a maximum image size of half the amount of memory.}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(h There are two solutions to this:h]h There are two solutions to this:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj')}(hhh](j,)}(hvrequire half of memory to be free during suspend. That way you can read "new" data onto free spots, then cli and copy h]h)}(hurequire half of memory to be free during suspend. That way you can read "new" data onto free spots, then cli and copyh]hyrequire half of memory to be free during suspend. That way you can read “new” data onto free spots, then cli and copy}(hj/hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj)ubah}(h]h ]h"]h$]h&]uh1j+hj&ubj,)}(hassume we had special "polling" ide driver that only uses memory between 0-640KB. That way, I'd have to make sure that 0-640KB is free during suspending, but otherwise it would work... h]h)}(hassume we had special "polling" ide driver that only uses memory between 0-640KB. That way, I'd have to make sure that 0-640KB is free during suspending, but otherwise it would work...h]hassume we had special “polling” ide driver that only uses memory between 0-640KB. That way, I’d have to make sure that 0-640KB is free during suspending, but otherwise it would work...}(hjGhjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjAubah}(h]h ]h"]h$]h&]uh1j+hj&ubeh}(h]h ]h"]h$]h&]j*uh1j&hhhKhjubh)}(hsuspend2 shares this fundamental limitation, but does not include user data and disk caches into "used memory" by saving them in advance. That means that the limitation goes away in practice.h]hsuspend2 shares this fundamental limitation, but does not include user data and disk caches into “used memory” by saving them in advance. That means that the limitation goes away in practice.}(hjbhj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhKhjWhhubh)}(hQ: Does linux support ACPI S4? h](h)}(hQ:h]hQ:}(hjhj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjzubj)}(hhh]h)}(hDoes linux support ACPI S4?h]hDoes linux support ACPI S4?}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjzubeh}(h]h ]h"]h$]h&]uh1hhhhKhjWhhubh)}(h:A: Yes. That's what echo platform > /sys/power/disk does. h](h)}(hA:h]hA:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj)}(hhh]h)}(h6Yes. That's what echo platform > /sys/power/disk does.h]h8Yes. That’s what echo platform > /sys/power/disk does.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhKhjWhhubh)}(hQ: What is 'suspend2'? h](h)}(hQ:h]hQ:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj)}(hhh]h)}(hWhat is 'suspend2'?h]hWhat is ‘suspend2’?}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhKhjWhhubh)}(hXA: suspend2 is 'Software Suspend 2', a forked implementation of suspend-to-disk which is available as separate patches for 2.4 and 2.6 kernels from swsusp.sourceforge.net. It includes support for SMP, 4GB highmem and preemption. It also has a extensible architecture that allows for arbitrary transformations on the image (compression, encryption) and arbitrary backends for writing the image (eg to swap or an NFS share[Work In Progress]). Questions regarding suspend2 should be sent to the mailing list available through the suspend2 website, and not to the Linux Kernel Mailing List. We are working toward merging suspend2 into the mainline kernel. h](h)}(hA:h]hA:}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj)}(hhh]h)}(hXsuspend2 is 'Software Suspend 2', a forked implementation of suspend-to-disk which is available as separate patches for 2.4 and 2.6 kernels from swsusp.sourceforge.net. It includes support for SMP, 4GB highmem and preemption. It also has a extensible architecture that allows for arbitrary transformations on the image (compression, encryption) and arbitrary backends for writing the image (eg to swap or an NFS share[Work In Progress]). Questions regarding suspend2 should be sent to the mailing list available through the suspend2 website, and not to the Linux Kernel Mailing List. We are working toward merging suspend2 into the mainline kernel.h]hXsuspend2 is ‘Software Suspend 2’, a forked implementation of suspend-to-disk which is available as separate patches for 2.4 and 2.6 kernels from swsusp.sourceforge.net. It includes support for SMP, 4GB highmem and preemption. It also has a extensible architecture that allows for arbitrary transformations on the image (compression, encryption) and arbitrary backends for writing the image (eg to swap or an NFS share[Work In Progress]). Questions regarding suspend2 should be sent to the mailing list available through the suspend2 website, and not to the Linux Kernel Mailing List. We are working toward merging suspend2 into the mainline kernel.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhKhjWhhubh)}(h:Q: What is the freezing of tasks and why are we using it? h](h)}(hQ:h]hQ:}(hj<hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj6ubj)}(hhh]h)}(h6What is the freezing of tasks and why are we using it?h]h6What is the freezing of tasks and why are we using it?}(hjMhjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjHubah}(h]h ]h"]h$]h&]uh1jhj6ubeh}(h]h ]h"]h$]h&]uh1hhhhKhjWhhubh)}(hA: The freezing of tasks is a mechanism by which user space processes and some kernel threads are controlled during hibernation or system-wide suspend (on some architectures). See freezing-of-tasks.txt for details. h](h)}(hA:h]hA:}(hjkhjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjeubj)}(hhh]h)}(hThe freezing of tasks is a mechanism by which user space processes and some kernel threads are controlled during hibernation or system-wide suspend (on some architectures). See freezing-of-tasks.txt for details.h]hThe freezing of tasks is a mechanism by which user space processes and some kernel threads are controlled during hibernation or system-wide suspend (on some architectures). See freezing-of-tasks.txt for details.}(hj|hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjwubah}(h]h ]h"]h$]h&]uh1jhjeubeh}(h]h ]h"]h$]h&]uh1hhhhKhjWhhubh)}(h=Q: What is the difference between "platform" and "shutdown"? h](h)}(hQ:h]hQ:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj)}(hhh]h)}(h9What is the difference between "platform" and "shutdown"?h]hAWhat is the difference between “platform” and “shutdown”?}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhKhjWhhubh)}(hXA: shutdown: save state in linux, then tell bios to powerdown platform: save state in linux, then tell bios to powerdown and blink "suspended led" "platform" is actually right thing to do where supported, but "shutdown" is most reliable (except on ACPI systems). h](h)}(hA:h]hA:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj)}(hhh](h)}(hhh](h)}(h;shutdown: save state in linux, then tell bios to powerdown h](h)}(h shutdown:h]h shutdown:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj)}(hhh]h)}(h0save state in linux, then tell bios to powerdownh]h0save state in linux, then tell bios to powerdown}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hUplatform: save state in linux, then tell bios to powerdown and blink "suspended led" h](h)}(h platform:h]h platform:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubj)}(hhh]h)}(hJsave state in linux, then tell bios to powerdown and blink "suspended led"h]hNsave state in linux, then tell bios to powerdown and blink “suspended led”}(hj!hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]h ]h"]h$]h&]uh1hhjubh)}(hs"platform" is actually right thing to do where supported, but "shutdown" is most reliable (except on ACPI systems).h]h{“platform” is actually right thing to do where supported, but “shutdown” is most reliable (except on ACPI systems).}(hjAhj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhKhjWhhubh)}(hYQ: I do not understand why you have such strong objections to idea of selective suspend. h](h)}(hQ:h]hQ:}(hj_hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjYubj)}(hhh]h)}(hUI do not understand why you have such strong objections to idea of selective suspend.h]hUI do not understand why you have such strong objections to idea of selective suspend.}(hjphjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjkubah}(h]h ]h"]h$]h&]uh1jhjYubeh}(h]h ]h"]h$]h&]uh1hhhhKhjWhhubh)}(hXA: Do selective suspend during runtime power management, that's okay. But it's useless for suspend-to-disk. (And I do not see how you could use it for suspend-to-ram, I hope you do not want that). Lets see, so you suggest to * SUSPEND all but swap device and parents * Snapshot * Write image to disk * SUSPEND swap device and parents * Powerdown Oh no, that does not work, if swap device or its parents uses DMA, you've corrupted data. You'd have to do * SUSPEND all but swap device and parents * FREEZE swap device and parents * Snapshot * UNFREEZE swap device and parents * Write * SUSPEND swap device and parents Which means that you still need that FREEZE state, and you get more complicated code. (And I have not yet introduce details like system devices). h](h)}(hA:h]hA:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj)}(hhh](h)}(hDo selective suspend during runtime power management, that's okay. But it's useless for suspend-to-disk. (And I do not see how you could use it for suspend-to-ram, I hope you do not want that).h]hDo selective suspend during runtime power management, that’s okay. But it’s useless for suspend-to-disk. (And I do not see how you could use it for suspend-to-ram, I hope you do not want that).}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hLets see, so you suggest toh]hLets see, so you suggest to}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj')}(hhh](j,)}(h'SUSPEND all but swap device and parentsh]h)}(hjh]h'SUSPEND all but swap device and parents}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j+hjubj,)}(hSnapshoth]h)}(hjh]hSnapshot}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j+hjubj,)}(hWrite image to diskh]h)}(hjh]hWrite image to disk}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j+hjubj,)}(hSUSPEND swap device and parentsh]h)}(hjh]hSUSPEND swap device and parents}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j+hjubj,)}(h Powerdown h]h)}(h Powerdownh]h Powerdown}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j+hjubeh}(h]h ]h"]h$]h&]jj_uh1j&hhhKhjubh)}(hjOh no, that does not work, if swap device or its parents uses DMA, you've corrupted data. You'd have to doh]hnOh no, that does not work, if swap device or its parents uses DMA, you’ve corrupted data. You’d have to do}(hj8hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj')}(hhh](j,)}(h'SUSPEND all but swap device and parentsh]h)}(hjIh]h'SUSPEND all but swap device and parents}(hjIhjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjGubah}(h]h ]h"]h$]h&]uh1j+hjDubj,)}(hFREEZE swap device and parentsh]h)}(hj`h]hFREEZE swap device and parents}(hj`hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj^ubah}(h]h ]h"]h$]h&]uh1j+hjDubj,)}(hSnapshoth]h)}(hjwh]hSnapshot}(hjwhjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjuubah}(h]h ]h"]h$]h&]uh1j+hjDubj,)}(h UNFREEZE swap device and parentsh]h)}(hjh]h UNFREEZE swap device and parents}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j+hjDubj,)}(hWriteh]h)}(hjh]hWrite}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j+hjDubj,)}(h SUSPEND swap device and parents h]h)}(hSUSPEND swap device and parentsh]hSUSPEND swap device and parents}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j+hjDubeh}(h]h ]h"]h$]h&]jj_uh1j&hhhKhjubh)}(hWhich means that you still need that FREEZE state, and you get more complicated code. (And I have not yet introduce details like system devices).h]hWhich means that you still need that FREEZE state, and you get more complicated code. (And I have not yet introduce details like system devices).}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhKhjWhhubh)}(hcQ: There don't seem to be any generally useful behavioral distinctions between SUSPEND and FREEZE. h](h)}(hQ:h]hQ:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj)}(hhh]h)}(h_There don't seem to be any generally useful behavioral distinctions between SUSPEND and FREEZE.h]haThere don’t seem to be any generally useful behavioral distinctions between SUSPEND and FREEZE.}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhKhjWhhubh)}(hXA: Doing SUSPEND when you are asked to do FREEZE is always correct, but it may be unnecessarily slow. If you want your driver to stay simple, slowness may not matter to you. It can always be fixed later. For devices like disk it does matter, you do not want to spindown for FREEZE. h](h)}(hA:h]hA:}(hj' hj% hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj! ubj)}(hhh](h)}(hDoing SUSPEND when you are asked to do FREEZE is always correct, but it may be unnecessarily slow. If you want your driver to stay simple, slowness may not matter to you. It can always be fixed later.h]hDoing SUSPEND when you are asked to do FREEZE is always correct, but it may be unnecessarily slow. If you want your driver to stay simple, slowness may not matter to you. It can always be fixed later.}(hj8 hj6 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj3 ubh)}(hMFor devices like disk it does matter, you do not want to spindown for FREEZE.h]hMFor devices like disk it does matter, you do not want to spindown for FREEZE.}(hjF hjD hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj3 ubeh}(h]h ]h"]h$]h&]uh1jhj! ubeh}(h]h ]h"]h$]h&]uh1hhhhKhjWhhubh)}(hPQ: After resuming, system is paging heavily, leading to very bad interactivity. h](h)}(hQ:h]hQ:}(hjd hjb hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj^ ubj)}(hhh]h)}(hLAfter resuming, system is paging heavily, leading to very bad interactivity.h]hLAfter resuming, system is paging heavily, leading to very bad interactivity.}(hju hjs hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjp ubah}(h]h ]h"]h$]h&]uh1jhj^ ubeh}(h]h ]h"]h$]h&]uh1hhhhMhjWhhubh)}(hA: Try running:: cat /proc/[0-9]*/maps | grep / | sed 's:.* /:/:' | sort -u | while read file do test -f "$file" && cat "$file" > /dev/null done after resume. swapoff -a; swapon -a may also be useful. h](h)}(hA:h]hA:}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubj)}(hhh](h)}(h Try running::h]h Try running:}(h Try running:hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubj)}(hcat /proc/[0-9]*/maps | grep / | sed 's:.* /:/:' | sort -u | while read file do test -f "$file" && cat "$file" > /dev/null doneh]hcat /proc/[0-9]*/maps | grep / | sed 's:.* /:/:' | sort -u | while read file do test -f "$file" && cat "$file" > /dev/null done}(hhhj ubah}(h]h ]h"]h$]h&]j$j%uh1jhhhMhj ubh)}(h7after resume. swapoff -a; swapon -a may also be useful.h]h7after resume. swapoff -a; swapon -a may also be useful.}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubeh}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1hhhhM hjWhhubh)}(hYQ: What happens to devices during swsusp? They seem to be resumed during system suspend? h](h)}(hQ:h]hQ:}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubj)}(hhh]h)}(hUWhat happens to devices during swsusp? They seem to be resumed during system suspend?h]hUWhat happens to devices during swsusp? They seem to be resumed during system suspend?}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1hhhhMhjWhhubh)}(hX,A: That's correct. We need to resume them if we want to write image to disk. Whole sequence goes like **Suspend part** running system, user asks for suspend-to-disk user processes are stopped suspend(PMSG_FREEZE): devices are frozen so that they don't interfere with state snapshot state snapshot: copy of whole used memory is taken with interrupts disabled resume(): devices are woken up so that we can write image to swap write image to swap suspend(PMSG_SUSPEND): suspend devices so that we can power off turn the power off **Resume part** (is actually pretty similar) running system, user asks for suspend-to-disk user processes are stopped (in common case there are none, but with resume-from-initrd, no one knows) read image from disk suspend(PMSG_FREEZE): devices are frozen so that they don't interfere with image restoration image restoration: rewrite memory with image resume(): devices are woken up so that system can continue thaw all user processes h](h)}(hA:h]hA:}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM;hj ubj)}(hhh](h)}(hbThat's correct. We need to resume them if we want to write image to disk. Whole sequence goes likeh]hdThat’s correct. We need to resume them if we want to write image to disk. Whole sequence goes like}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubj6)}(hhh](h)}(h**Suspend part**h]h)}(hj0 h]h Suspend part}(hhhj2 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj. ubah}(h]h ]h"]h$]h&]uh1hhhhMhj+ ubh)}(h-running system, user asks for suspend-to-diskh]h-running system, user asks for suspend-to-disk}(hjG hjE hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj+ ubh)}(huser processes are stoppedh]huser processes are stopped}(hjU hjS hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj+ ubh)}(hYsuspend(PMSG_FREEZE): devices are frozen so that they don't interfere with state snapshoth]h[suspend(PMSG_FREEZE): devices are frozen so that they don’t interfere with state snapshot}(hjc hja hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj+ ubh)}(hKstate snapshot: copy of whole used memory is taken with interrupts disabledh]hKstate snapshot: copy of whole used memory is taken with interrupts disabled}(hjq hjo hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj+ ubh)}(hAresume(): devices are woken up so that we can write image to swaph]hAresume(): devices are woken up so that we can write image to swap}(hj hj} hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hj+ ubh)}(hwrite image to swaph]hwrite image to swap}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hj+ ubh)}(h?suspend(PMSG_SUSPEND): suspend devices so that we can power offh]h?suspend(PMSG_SUSPEND): suspend devices so that we can power off}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM%hj+ ubh)}(hturn the power offh]hturn the power off}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM'hj+ ubh)}(h**Resume part**h]h)}(hj h]h Resume part}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]uh1hhhhM)hj+ ubh)}(h(is actually pretty similar)h]h(is actually pretty similar)}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM+hj+ ubh)}(h-running system, user asks for suspend-to-diskh]h-running system, user asks for suspend-to-disk}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM-hj+ ubh)}(heuser processes are stopped (in common case there are none, but with resume-from-initrd, no one knows)h]heuser processes are stopped (in common case there are none, but with resume-from-initrd, no one knows)}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM/hj+ ubh)}(hread image from diskh]hread image from disk}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM2hj+ ubh)}(h\suspend(PMSG_FREEZE): devices are frozen so that they don't interfere with image restorationh]h^suspend(PMSG_FREEZE): devices are frozen so that they don’t interfere with image restoration}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM4hj+ ubh)}(h,image restoration: rewrite memory with imageh]h,image restoration: rewrite memory with image}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM7hj+ ubh)}(h:resume(): devices are woken up so that system can continueh]h:resume(): devices are woken up so that system can continue}(hj" hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM9hj+ ubh)}(hthaw all user processesh]hthaw all user processes}(hj0 hj. hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM;hj+ ubeh}(h]h ]h"]h$]h&]uh1j5hj ubeh}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1hhhhM;hjWhhubh)}(h-Q: What is this 'Encrypt suspend image' for? h](h)}(hQ:h]hQ:}(hjT hjR hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM>hjN ubj)}(hhh]h)}(h)What is this 'Encrypt suspend image' for?h]h-What is this ‘Encrypt suspend image’ for?}(hje hjc hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM>hj` ubah}(h]h ]h"]h$]h&]uh1jhjN ubeh}(h]h ]h"]h$]h&]uh1hhhhM>hjWhhubh)}(hXA: First of all: it is not a replacement for dm-crypt encrypted swap. It cannot protect your computer while it is suspended. Instead it does protect from leaking sensitive data after resume from suspend. Think of the following: you suspend while an application is running that keeps sensitive data in memory. The application itself prevents the data from being swapped out. Suspend, however, must write these data to swap to be able to resume later on. Without suspend encryption your sensitive data are then stored in plaintext on disk. This means that after resume your sensitive data are accessible to all applications having direct access to the swap device which was used for suspend. If you don't need swap after resume these data can remain on disk virtually forever. Thus it can happen that your system gets broken in weeks later and sensitive data which you thought were encrypted and protected are retrieved and stolen from the swap device. To prevent this situation you should use 'Encrypt suspend image'. During suspend a temporary key is created and this key is used to encrypt the data written to disk. When, during resume, the data was read back into memory the temporary key is destroyed which simply means that all data written to disk during suspend are then inaccessible so they can't be stolen later on. The only thing that you must then take care of is that you call 'mkswap' for the swap partition used for suspend as early as possible during regular boot. This asserts that any temporary key from an oopsed suspend or from a failed or aborted resume is erased from the swap device. As a rule of thumb use encrypted swap to protect your data while your system is shut down or suspended. Additionally use the encrypted suspend image to prevent sensitive data from being stolen after resume. h](h)}(hA:h]hA:}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM_hj} ubj)}(hhh](h)}(hFirst of all: it is not a replacement for dm-crypt encrypted swap. It cannot protect your computer while it is suspended. Instead it does protect from leaking sensitive data after resume from suspend.h]hFirst of all: it is not a replacement for dm-crypt encrypted swap. It cannot protect your computer while it is suspended. Instead it does protect from leaking sensitive data after resume from suspend.}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMAhj ubh)}(hX-Think of the following: you suspend while an application is running that keeps sensitive data in memory. The application itself prevents the data from being swapped out. Suspend, however, must write these data to swap to be able to resume later on. Without suspend encryption your sensitive data are then stored in plaintext on disk. This means that after resume your sensitive data are accessible to all applications having direct access to the swap device which was used for suspend. If you don't need swap after resume these data can remain on disk virtually forever. Thus it can happen that your system gets broken in weeks later and sensitive data which you thought were encrypted and protected are retrieved and stolen from the swap device. To prevent this situation you should use 'Encrypt suspend image'.h]hX3Think of the following: you suspend while an application is running that keeps sensitive data in memory. The application itself prevents the data from being swapped out. Suspend, however, must write these data to swap to be able to resume later on. Without suspend encryption your sensitive data are then stored in plaintext on disk. This means that after resume your sensitive data are accessible to all applications having direct access to the swap device which was used for suspend. If you don’t need swap after resume these data can remain on disk virtually forever. Thus it can happen that your system gets broken in weeks later and sensitive data which you thought were encrypted and protected are retrieved and stolen from the swap device. To prevent this situation you should use ‘Encrypt suspend image’.}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMEhj ubh)}(hXLDuring suspend a temporary key is created and this key is used to encrypt the data written to disk. When, during resume, the data was read back into memory the temporary key is destroyed which simply means that all data written to disk during suspend are then inaccessible so they can't be stolen later on. The only thing that you must then take care of is that you call 'mkswap' for the swap partition used for suspend as early as possible during regular boot. This asserts that any temporary key from an oopsed suspend or from a failed or aborted resume is erased from the swap device.h]hXRDuring suspend a temporary key is created and this key is used to encrypt the data written to disk. When, during resume, the data was read back into memory the temporary key is destroyed which simply means that all data written to disk during suspend are then inaccessible so they can’t be stolen later on. The only thing that you must then take care of is that you call ‘mkswap’ for the swap partition used for suspend as early as possible during regular boot. This asserts that any temporary key from an oopsed suspend or from a failed or aborted resume is erased from the swap device.}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMRhj ubh)}(hAs a rule of thumb use encrypted swap to protect your data while your system is shut down or suspended. Additionally use the encrypted suspend image to prevent sensitive data from being stolen after resume.h]hAs a rule of thumb use encrypted swap to protect your data while your system is shut down or suspended. Additionally use the encrypted suspend image to prevent sensitive data from being stolen after resume.}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM\hj ubeh}(h]h ]h"]h$]h&]uh1jhj} ubeh}(h]h ]h"]h$]h&]uh1hhhhM_hjWhhubh)}(h!Q: Can I suspend to a swap file? h](h)}(hQ:h]hQ:}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMbhj ubj)}(hhh]h)}(hCan I suspend to a swap file?h]hCan I suspend to a swap file?}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMbhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1hhhhMbhjWhhubh)}(hXA: Generally, yes, you can. However, it requires you to use the "resume=" and "resume_offset=" kernel command line parameters, so the resume from a swap file cannot be initiated from an initrd or initramfs image. See swsusp-and-swap-files.txt for details. h](h)}(hA:h]hA:}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhhj ubj)}(hhh]h)}(hGenerally, yes, you can. However, it requires you to use the "resume=" and "resume_offset=" kernel command line parameters, so the resume from a swap file cannot be initiated from an initrd or initramfs image. See swsusp-and-swap-files.txt for details.h]hXGenerally, yes, you can. However, it requires you to use the “resume=” and “resume_offset=” kernel command line parameters, so the resume from a swap file cannot be initiated from an initrd or initramfs image. See swsusp-and-swap-files.txt for details.}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMehj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1hhhhMhhjWhhubh)}(hCQ: Is there a maximum system RAM size that is supported by swsusp? h](h)}(hQ:h]hQ:}(hj: hj8 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMkhj4 ubj)}(hhh]h)}(h?Is there a maximum system RAM size that is supported by swsusp?h]h?Is there a maximum system RAM size that is supported by swsusp?}(hjK hjI hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMkhjF ubah}(h]h ]h"]h$]h&]uh1jhj4 ubeh}(h]h ]h"]h$]h&]uh1hhhhMkhjWhhubh)}(h%A: It should work okay with highmem. h](h)}(hA:h]hA:}(hji hjg hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMnhjc ubj)}(hhh]h)}(h!It should work okay with highmem.h]h!It should work okay with highmem.}(hjz hjx hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMnhju ubah}(h]h ]h"]h$]h&]uh1jhjc ubeh}(h]h ]h"]h$]h&]uh1hhhhMnhjWhhubh)}(hQ: Does swsusp (to disk) use only one swap partition or can it use multiple swap partitions (aggregate them into one logical space)? h](h)}(hQ:h]hQ:}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMrhj ubj)}(hhh]h)}(hDoes swsusp (to disk) use only one swap partition or can it use multiple swap partitions (aggregate them into one logical space)?h]hDoes swsusp (to disk) use only one swap partition or can it use multiple swap partitions (aggregate them into one logical space)?}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMqhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1hhhhMrhjWhhubh)}(h#A: Only one swap partition, sorry. h](h)}(hA:h]hA:}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMuhj ubj)}(hhh]h)}(hOnly one swap partition, sorry.h]hOnly one swap partition, sorry.}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMuhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1hhhhMuhjWhhubh)}(hQ: If my application(s) causes lots of memory & swap space to be used (over half of the total system RAM), is it correct that it is likely to be useless to try to suspend to disk while that app is running? h](h)}(hQ:h]hQ:}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMzhj ubj)}(hhh]h)}(hIf my application(s) causes lots of memory & swap space to be used (over half of the total system RAM), is it correct that it is likely to be useless to try to suspend to disk while that app is running?h]hIf my application(s) causes lots of memory & swap space to be used (over half of the total system RAM), is it correct that it is likely to be useless to try to suspend to disk while that app is running?}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMxhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1hhhhMzhjWhhubh)}(hmA: No, it should work okay, as long as your app does not mlock() it. Just prepare big enough swap partition. h](h)}(hA:h]hA:}(hj% hj# hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM~hj ubj)}(hhh]h)}(hiNo, it should work okay, as long as your app does not mlock() it. Just prepare big enough swap partition.h]hiNo, it should work okay, as long as your app does not mlock() it. Just prepare big enough swap partition.}(hj6 hj4 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM}hj1 ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1hhhhM~hjWhhubh)}(hFQ: What information is useful for debugging suspend-to-disk problems? h](h)}(hQ:h]hQ:}(hjT hjR hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjN ubj)}(hhh]h)}(hBWhat information is useful for debugging suspend-to-disk problems?h]hBWhat information is useful for debugging suspend-to-disk problems?}(hje hjc hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj` ubah}(h]h ]h"]h$]h&]uh1jhjN ubeh}(h]h ]h"]h$]h&]uh1hhhhMhjWhhubh)}(hXA: Well, last messages on the screen are always useful. If something is broken, it is usually some kernel driver, therefore trying with as little as possible modules loaded helps a lot. I also prefer people to suspend from console, preferably without X running. Booting with init=/bin/bash, then swapon and starting suspend sequence manually usually does the trick. Then it is good idea to try with latest vanilla kernel. h](h)}(hA:h]hA:}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj} ubj)}(hhh]h)}(hXWell, last messages on the screen are always useful. If something is broken, it is usually some kernel driver, therefore trying with as little as possible modules loaded helps a lot. I also prefer people to suspend from console, preferably without X running. Booting with init=/bin/bash, then swapon and starting suspend sequence manually usually does the trick. Then it is good idea to try with latest vanilla kernel.h]hXWell, last messages on the screen are always useful. If something is broken, it is usually some kernel driver, therefore trying with as little as possible modules loaded helps a lot. I also prefer people to suspend from console, preferably without X running. Booting with init=/bin/bash, then swapon and starting suspend sequence manually usually does the trick. Then it is good idea to try with latest vanilla kernel.}(hj hj hhhNhNubah}(.Mh]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhj} ubeh}(h]h ]h"]h$]h&]uh1hhhhMhjWhhubh)}(hfQ: How can distributions ship a swsusp-supporting kernel with modular disk drivers (especially SATA)? h](h)}(hQ:h]hQ:}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubj)}(hhh]h)}(hbHow can distributions ship a swsusp-supporting kernel with modular disk drivers (especially SATA)?h]hbHow can distributions ship a swsusp-supporting kernel with modular disk drivers (especially SATA)?}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1hhhhMhjWhhubh)}(hA: Well, it can be done, load the drivers, then do echo into /sys/power/resume file from initrd. Be sure not to mount anything, not even read-only mount, or you are going to lose your data. h](h)}(hA:h]hA:}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubj)}(hhh]h)}(hWell, it can be done, load the drivers, then do echo into /sys/power/resume file from initrd. Be sure not to mount anything, not even read-only mount, or you are going to lose your data.h]hWell, it can be done, load the drivers, then do echo into /sys/power/resume file from initrd. Be sure not to mount anything, not even read-only mount, or you are going to lose your data.}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1hhhhMhjWhhubh)}(h'Q: How do I make suspend more verbose? h](h)}(hQ:h]hQ:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubj)}(hhh]h)}(h#How do I make suspend more verbose?h]h#How do I make suspend more verbose?}(hj!hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1hhhhMhjWhhubh)}(hX9A: If you want to see any non-error kernel messages on the virtual terminal the kernel switches to during suspend, you have to set the kernel console loglevel to at least 4 (KERN_WARNING), for example by doing:: # save the old loglevel read LOGLEVEL DUMMY < /proc/sys/kernel/printk # set the loglevel so we see the progress bar. # if the level is higher than needed, we leave it alone. if [ $LOGLEVEL -lt 5 ]; then echo 5 > /proc/sys/kernel/printk fi IMG_SZ=0 read IMG_SZ < /sys/power/image_size echo -n disk > /sys/power/state RET=$? # # the logic here is: # if image_size > 0 (without kernel support, IMG_SZ will be zero), # then try again with image_size set to zero. if [ $RET -ne 0 -a $IMG_SZ -ne 0 ]; then # try again with minimal image size echo 0 > /sys/power/image_size echo -n disk > /sys/power/state RET=$? fi # restore previous loglevel echo $LOGLEVEL > /proc/sys/kernel/printk exit $RET h](h)}(hA:h]hA:}(hj?hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj9ubj)}(hhh](h)}(hIf you want to see any non-error kernel messages on the virtual terminal the kernel switches to during suspend, you have to set the kernel console loglevel to at least 4 (KERN_WARNING), for example by doing::h]hIf you want to see any non-error kernel messages on the virtual terminal the kernel switches to during suspend, you have to set the kernel console loglevel to at least 4 (KERN_WARNING), for example by doing:}(hIf you want to see any non-error kernel messages on the virtual terminal the kernel switches to during suspend, you have to set the kernel console loglevel to at least 4 (KERN_WARNING), for example by doing:hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjKubj)}(hX# save the old loglevel read LOGLEVEL DUMMY < /proc/sys/kernel/printk # set the loglevel so we see the progress bar. # if the level is higher than needed, we leave it alone. if [ $LOGLEVEL -lt 5 ]; then echo 5 > /proc/sys/kernel/printk fi IMG_SZ=0 read IMG_SZ < /sys/power/image_size echo -n disk > /sys/power/state RET=$? # # the logic here is: # if image_size > 0 (without kernel support, IMG_SZ will be zero), # then try again with image_size set to zero. if [ $RET -ne 0 -a $IMG_SZ -ne 0 ]; then # try again with minimal image size echo 0 > /sys/power/image_size echo -n disk > /sys/power/state RET=$? fi # restore previous loglevel echo $LOGLEVEL > /proc/sys/kernel/printk exit $RETh]hX# save the old loglevel read LOGLEVEL DUMMY < /proc/sys/kernel/printk # set the loglevel so we see the progress bar. # if the level is higher than needed, we leave it alone. if [ $LOGLEVEL -lt 5 ]; then echo 5 > /proc/sys/kernel/printk fi IMG_SZ=0 read IMG_SZ < /sys/power/image_size echo -n disk > /sys/power/state RET=$? # # the logic here is: # if image_size > 0 (without kernel support, IMG_SZ will be zero), # then try again with image_size set to zero. if [ $RET -ne 0 -a $IMG_SZ -ne 0 ]; then # try again with minimal image size echo 0 > /sys/power/image_size echo -n disk > /sys/power/state RET=$? fi # restore previous loglevel echo $LOGLEVEL > /proc/sys/kernel/printk exit $RET}(hhhj]ubah}(h]h ]h"]h$]h&]j$j%uh1jhhhMhjKubeh}(h]h ]h"]h$]h&]uh1jhj9ubeh}(h]h ]h"]h$]h&]uh1hhhhMhjWhhubh)}(hQ: Is this true that if I have a mounted filesystem on a USB device and I suspend to disk, I can lose data unless the filesystem has been mounted with "sync"? h](h)}(hQ:h]hQ:}(hj}hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjwubj)}(hhh]h)}(hIs this true that if I have a mounted filesystem on a USB device and I suspend to disk, I can lose data unless the filesystem has been mounted with "sync"?h]hIs this true that if I have a mounted filesystem on a USB device and I suspend to disk, I can lose data unless the filesystem has been mounted with “sync”?}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjwubeh}(h]h ]h"]h$]h&]uh1hhhhMhjWhhubh)}(hX$A: That's right ... if you disconnect that device, you may lose data. In fact, even with "-o sync" you can lose data if your programs have information in buffers they haven't written out to a disk you disconnect, or if you disconnect before the device finished saving data you wrote. Software suspend normally powers down USB controllers, which is equivalent to disconnecting all USB devices attached to your system. Your system might well support low-power modes for its USB controllers while the system is asleep, maintaining the connection, using true sleep modes like "suspend-to-RAM" or "standby". (Don't write "disk" to the /sys/power/state file; write "standby" or "mem".) We've not seen any hardware that can use these modes through software suspend, although in theory some systems might support "platform" modes that won't break the USB connections. Remember that it's always a bad idea to unplug a disk drive containing a mounted filesystem. That's true even when your system is asleep! The safest thing is to unmount all filesystems on removable media (such USB, Firewire, CompactFlash, MMC, external SATA, or even IDE hotplug bays) before suspending; then remount them after resuming. There is a work-around for this problem. For more information, see Documentation/driver-api/usb/persist.rst. h](h)}(hA:h]hA:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubj)}(hhh](h)}(hXThat's right ... if you disconnect that device, you may lose data. In fact, even with "-o sync" you can lose data if your programs have information in buffers they haven't written out to a disk you disconnect, or if you disconnect before the device finished saving data you wrote.h]hX That’s right ... if you disconnect that device, you may lose data. In fact, even with “-o sync” you can lose data if your programs have information in buffers they haven’t written out to a disk you disconnect, or if you disconnect before the device finished saving data you wrote.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hSoftware suspend normally powers down USB controllers, which is equivalent to disconnecting all USB devices attached to your system.h]hSoftware suspend normally powers down USB controllers, which is equivalent to disconnecting all USB devices attached to your system.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hXYour system might well support low-power modes for its USB controllers while the system is asleep, maintaining the connection, using true sleep modes like "suspend-to-RAM" or "standby". (Don't write "disk" to the /sys/power/state file; write "standby" or "mem".) We've not seen any hardware that can use these modes through software suspend, although in theory some systems might support "platform" modes that won't break the USB connections.h]hXYour system might well support low-power modes for its USB controllers while the system is asleep, maintaining the connection, using true sleep modes like “suspend-to-RAM” or “standby”. (Don’t write “disk” to the /sys/power/state file; write “standby” or “mem”.) We’ve not seen any hardware that can use these modes through software suspend, although in theory some systems might support “platform” modes that won’t break the USB connections.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hXSRemember that it's always a bad idea to unplug a disk drive containing a mounted filesystem. That's true even when your system is asleep! The safest thing is to unmount all filesystems on removable media (such USB, Firewire, CompactFlash, MMC, external SATA, or even IDE hotplug bays) before suspending; then remount them after resuming.h]hXWRemember that it’s always a bad idea to unplug a disk drive containing a mounted filesystem. That’s true even when your system is asleep! The safest thing is to unmount all filesystems on removable media (such USB, Firewire, CompactFlash, MMC, external SATA, or even IDE hotplug bays) before suspending; then remount them after resuming.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hmThere is a work-around for this problem. For more information, see Documentation/driver-api/usb/persist.rst.h]hmThere is a work-around for this problem. For more information, see Documentation/driver-api/usb/persist.rst.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhMhjWhhubh)}(h;Q: Can I suspend-to-disk using a swap partition under LVM? h](h)}(hQ:h]hQ:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubj)}(hhh]h)}(h7Can I suspend-to-disk using a swap partition under LVM?h]h7Can I suspend-to-disk using a swap partition under LVM?}(hj$hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1hhhhMhjWhhubh)}(hXA: Yes and No. You can suspend successfully, but the kernel will not be able to resume on its own. You need an initramfs that can recognize the resume situation, activate the logical volume containing the swap volume (but not touch any filesystems!), and eventually call:: echo -n "$major:$minor" > /sys/power/resume where $major and $minor are the respective major and minor device numbers of the swap volume. uswsusp works with LVM, too. See http://suspend.sourceforge.net/ h](h)}(hA:h]hA:}(hjBhj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj<ubj)}(hhh](h)}(hXYes and No. You can suspend successfully, but the kernel will not be able to resume on its own. You need an initramfs that can recognize the resume situation, activate the logical volume containing the swap volume (but not touch any filesystems!), and eventually call::h]hXYes and No. You can suspend successfully, but the kernel will not be able to resume on its own. You need an initramfs that can recognize the resume situation, activate the logical volume containing the swap volume (but not touch any filesystems!), and eventually call:}(hXYes and No. You can suspend successfully, but the kernel will not be able to resume on its own. You need an initramfs that can recognize the resume situation, activate the logical volume containing the swap volume (but not touch any filesystems!), and eventually call:hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjNubj)}(h+echo -n "$major:$minor" > /sys/power/resumeh]h+echo -n "$major:$minor" > /sys/power/resume}(hhhj`ubah}(h]h ]h"]h$]h&]j$j%uh1jhhhMhjNubh)}(h]where $major and $minor are the respective major and minor device numbers of the swap volume.h]h]where $major and $minor are the respective major and minor device numbers of the swap volume.}(hjphjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjNubh)}(hAuswsusp works with LVM, too. See http://suspend.sourceforge.net/h](h"uswsusp works with LVM, too. See }(h"uswsusp works with LVM, too. See hj|hhhNhNubh reference)}(hhttp://suspend.sourceforge.net/h]hhttp://suspend.sourceforge.net/}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhj|ubeh}(h]h ]h"]h$]h&]uh1hhhhMhjNubeh}(h]h ]h"]h$]h&]uh1jhj<ubeh}(h]h ]h"]h$]h&]uh1hhhhMhjWhhubh)}(hX Q: I upgraded the kernel from 2.6.15 to 2.6.16. Both kernels were compiled with the similar configuration files. Anyway I found that suspend to disk (and resume) is much slower on 2.6.16 compared to 2.6.15. Any idea for why that might happen or how can I speed it up? h](h)}(hQ:h]hQ:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubj)}(hhh]h)}(hXI upgraded the kernel from 2.6.15 to 2.6.16. Both kernels were compiled with the similar configuration files. Anyway I found that suspend to disk (and resume) is much slower on 2.6.16 compared to 2.6.15. Any idea for why that might happen or how can I speed it up?h]hXI upgraded the kernel from 2.6.15 to 2.6.16. Both kernels were compiled with the similar configuration files. Anyway I found that suspend to disk (and resume) is much slower on 2.6.16 compared to 2.6.15. Any idea for why that might happen or how can I speed it up?}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhMhjWhhubh)}(hXA: This is because the size of the suspend image is now greater than for 2.6.15 (by saving more data we can get more responsive system after resume). There's the /sys/power/image_size knob that controls the size of the image. If you set it to 0 (eg. by echo 0 > /sys/power/image_size as root), the 2.6.15 behavior should be restored. If it is still too slow, take a look at suspend.sf.net -- userland suspend is faster and supports LZF compression to speed it up further.h](h)}(hA:h]hA:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubj)}(hhh](h)}(hThis is because the size of the suspend image is now greater than for 2.6.15 (by saving more data we can get more responsive system after resume).h]hThis is because the size of the suspend image is now greater than for 2.6.15 (by saving more data we can get more responsive system after resume).}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hXCThere's the /sys/power/image_size knob that controls the size of the image. If you set it to 0 (eg. by echo 0 > /sys/power/image_size as root), the 2.6.15 behavior should be restored. If it is still too slow, take a look at suspend.sf.net -- userland suspend is faster and supports LZF compression to speed it up further.h]hXEThere’s the /sys/power/image_size knob that controls the size of the image. If you set it to 0 (eg. by echo 0 > /sys/power/image_size as root), the 2.6.15 behavior should be restored. If it is still too slow, take a look at suspend.sf.net -- userland suspend is faster and supports LZF compression to speed it up further.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhMhjWhhubeh}(h]h ]h"]h$]h&]uh1hhjFhhhhhNubeh}(h]frequently-asked-questionsah ]h"]frequently asked questionsah$]h&]uh1hhhhhhhhKubeh}(h] swap-suspendah ]h"] swap suspendah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN 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_handlerjMerror_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.confapep_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_spacefile_insertion_enabled raw_enabledKline_length_limitM'syntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_link embed_imagesenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(j'j$jjjjjCj@jju nametypes}(j'NjNjNjCNjNuh}(j$hjj?jj^j@jjjFu footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.