Lines Matching +full:suspend +full:- +full:to +full:- +full:disk

2 Swap suspend
11 If you touch anything on disk between suspend and resume...
20 problems. If your disk driver does not support suspend... (IDE does),
22 between suspend and resume, it may do something wrong. If you change
26 ( ) suspend/resume support is needed to make it safe.
28 If you have any filesystems on USB devices mounted before software suspend,
35 You need to append resume=/dev/your_swap_partition to kernel command
43 After preparing then you suspend by::
45 echo shutdown > /sys/power/disk; echo disk > /sys/power/state
47 - If you feel ACPI works pretty well on your system, you might try::
49 echo platform > /sys/power/disk; echo disk > /sys/power/state
51 - If you would like to write hibernation image to swap and then suspend
52 to RAM (provided your platform supports it), you can try::
54 echo suspend > /sys/power/disk; echo disk > /sys/power/state
56 - If you have SATA disks, you'll need recent kernels with SATA suspend
57 support. For suspend and resume to work, make sure your disk drivers
58 are built into kernel -- not modules. [There's way to make
59 suspend/resume with modular disk drivers, see FAQ, but you probably
62 If you want to limit the suspend image size to N bytes, do::
66 before suspend (it is limited to around 2/5 of available RAM by default).
68 - The resume process checks for the presence of the resume device,
72 - The resume process may be triggered in two ways:
80 that this be done prior to remounting any filesystems (even as
81 read-only) otherwise data may be corrupted.
83 Article about goals and implementation of Software Suspend for Linux
87 Last revised: 2003-10-20 by Pavel Machek
89 Idea and goals to achieve
90 -------------------------
92 Nowadays it is common in several laptops that they have a suspend button. It
93 saves the state of the machine to a filesystem or to a partition and switches
94 to standby mode. Later resuming the machine the saved state is loaded back to
98 to interrupt our programs so processes that are calculating something for a long
99 time shouldn't need to be written interruptible.
102 powerdowns. You must explicitly specify the swap partition to resume from with
109 of the hardware, write to the filesystems, etc.
120 echo 2 > /proc/acpi/sleep # for suspend to ram
121 echo 3 > /proc/acpi/sleep # for suspend to ram, but with more power
123 echo 4 > /proc/acpi/sleep # for suspend to disk
128 echo 4b > /proc/acpi/sleep # for suspend to disk via s4bios
139 bringing machine down? Suspend to disk, rearrange power cables,
143 seconds to failure. What do you do? Suspend to disk.
151 to its original location as we load it. That would create an
154 it back to it original location. This implies, of course, a maximum
157 There are two solutions to this:
159 * require half of memory to be free during suspend. That way you can
163 between 0-640KB. That way, I'd have to make sure that 0-640KB is free
167 data and disk caches into "used memory" by saving them in
174 Yes. That's what echo platform > /sys/power/disk does.
180 suspend2 is 'Software Suspend 2', a forked implementation of
181 suspend-to-disk which is available as separate patches for 2.4 and 2.6
185 encryption) and arbitrary backends for writing the image (eg to swap
187 should be sent to the mailing list available through the suspend2
188 website, and not to the Linux Kernel Mailing List. We are working
196 kernel threads are controlled during hibernation or system-wide suspend (on
197 some architectures). See freezing-of-tasks.txt for details.
204 save state in linux, then tell bios to powerdown
207 save state in linux, then tell bios to powerdown and blink
210 "platform" is actually right thing to do where supported, but
214 I do not understand why you have such strong objections to idea of
215 selective suspend.
218 Do selective suspend during runtime power management, that's okay. But
219 it's useless for suspend-to-disk. (And I do not see how you could use
220 it for suspend-to-ram, I hope you do not want that).
222 Lets see, so you suggest to
224 * SUSPEND all but swap device and parents
226 * Write image to disk
227 * SUSPEND swap device and parents
231 you've corrupted data. You'd have to do
233 * SUSPEND all but swap device and parents
238 * SUSPEND swap device and parents
245 There don't seem to be any generally useful behavioral
246 distinctions between SUSPEND and FREEZE.
249 Doing SUSPEND when you are asked to do FREEZE is always correct,
250 but it may be unnecessarily slow. If you want your driver to stay simple,
251 slowness may not matter to you. It can always be fixed later.
253 For devices like disk it does matter, you do not want to spindown for
257 After resuming, system is paging heavily, leading to very bad interactivity.
262 cat /proc/[0-9]*/maps | grep / | sed 's:.* /:/:' | sort -u | while read file
264 test -f "$file" && cat "$file" > /dev/null
267 after resume. swapoff -a; swapon -a may also be useful.
270 What happens to devices during swsusp? They seem to be resumed
271 during system suspend?
274 That's correct. We need to resume them if we want to write image to
275 disk. Whole sequence goes like
277 **Suspend part**
279 running system, user asks for suspend-to-disk
283 suspend(PMSG_FREEZE): devices are frozen so that they don't interfere
289 resume(): devices are woken up so that we can write image to swap
291 write image to swap
293 suspend(PMSG_SUSPEND): suspend devices so that we can power off
301 running system, user asks for suspend-to-disk
304 but with resume-from-initrd, no one knows)
306 read image from disk
308 suspend(PMSG_FREEZE): devices are frozen so that they don't interfere
318 What is this 'Encrypt suspend image' for?
321 First of all: it is not a replacement for dm-crypt encrypted swap.
323 protect from leaking sensitive data after resume from suspend.
325 Think of the following: you suspend while an application is running
327 the data from being swapped out. Suspend, however, must write these
328 data to swap to be able to resume later on. Without suspend encryption
329 your sensitive data are then stored in plaintext on disk. This means
330 that after resume your sensitive data are accessible to all
331 applications having direct access to the swap device which was used
332 for suspend. If you don't need swap after resume these data can remain
333 on disk virtually forever. Thus it can happen that your system gets
336 To prevent this situation you should use 'Encrypt suspend image'.
338 During suspend a temporary key is created and this key is used to
339 encrypt the data written to disk. When, during resume, the data was
341 means that all data written to disk during suspend are then
344 partition used for suspend as early as possible during regular
345 boot. This asserts that any temporary key from an oopsed suspend or
348 As a rule of thumb use encrypted swap to protect your data while your
350 suspend image to prevent sensitive data from being stolen after
354 Can I suspend to a swap file?
357 Generally, yes, you can. However, it requires you to use the "resume=" and
360 swsusp-and-swap-files.txt for details.
369 Does swsusp (to disk) use only one swap partition or can it use
376 If my application(s) causes lots of memory & swap space to be used
378 to be useless to try to suspend to disk while that app is running?
385 What information is useful for debugging suspend-to-disk problems?
390 little as possible modules loaded helps a lot. I also prefer people to
391 suspend from console, preferably without X running. Booting with
392 init=/bin/bash, then swapon and starting suspend sequence manually
393 usually does the trick. Then it is good idea to try with latest
397 How can distributions ship a swsusp-supporting kernel with modular
398 disk drivers (especially SATA)?
402 /sys/power/resume file from initrd. Be sure not to mount
403 anything, not even read-only mount, or you are going to lose your
407 How do I make suspend more verbose?
410 If you want to see any non-error kernel messages on the virtual
411 terminal the kernel switches to during suspend, you have to set the
412 kernel console loglevel to at least 4 (KERN_WARNING), for example by
419 if [ $LOGLEVEL -lt 5 ]; then
425 echo -n disk > /sys/power/state
430 # then try again with image_size set to zero.
431 if [ $RET -ne 0 -a $IMG_SZ -ne 0 ]; then # try again with minimal image size
433 echo -n disk > /sys/power/state
443 I suspend to disk, I can lose data unless the filesystem has been mounted
448 In fact, even with "-o sync" you can lose data if your programs have
449 information in buffers they haven't written out to a disk you disconnect,
452 Software suspend normally powers down USB controllers, which is equivalent
453 to disconnecting all USB devices attached to your system.
455 Your system might well support low-power modes for its USB controllers
457 modes like "suspend-to-RAM" or "standby". (Don't write "disk" to the
459 hardware that can use these modes through software suspend, although in
463 Remember that it's always a bad idea to unplug a disk drive containing a
465 safest thing is to unmount all filesystems on removable media (such USB,
469 There is a work-around for this problem. For more information, see
470 Documentation/driver-api/usb/persist.rst.
473 Can I suspend-to-disk using a swap partition under LVM?
476 Yes and No. You can suspend successfully, but the kernel will not be able
477 to resume on its own. You need an initramfs that can recognize the resume
481 echo -n "$major:$minor" > /sys/power/resume
486 uswsusp works with LVM, too. See http://suspend.sourceforge.net/
489 I upgraded the kernel from 2.6.15 to 2.6.16. Both kernels were
491 suspend to disk (and resume) is much slower on 2.6.16 compared to
495 This is because the size of the suspend image is now greater than
500 image. If you set it to 0 (eg. by echo 0 > /sys/power/image_size as
502 slow, take a look at suspend.sf.net -- userland suspend is faster and
503 supports LZF compression to speed it up further.