]>
Commit | Line | Data |
---|---|---|
d7ae79c7 | 1 | Some warnings, first. |
1da177e4 LT |
2 | |
3 | * BIG FAT WARNING ********************************************************* | |
4 | * | |
1da177e4 LT |
5 | * If you touch anything on disk between suspend and resume... |
6 | * ...kiss your data goodbye. | |
7 | * | |
d7ae79c7 PM |
8 | * If you do resume from initrd after your filesystems are mounted... |
9 | * ...bye bye root partition. | |
10 | * [this is actually same case as above] | |
1da177e4 | 11 | * |
d7ae79c7 PM |
12 | * If you have unsupported (*) devices using DMA, you may have some |
13 | * problems. If your disk driver does not support suspend... (IDE does), | |
14 | * it may cause some problems, too. If you change kernel command line | |
15 | * between suspend and resume, it may do something wrong. If you change | |
16 | * your hardware while system is suspended... well, it was not good idea; | |
17 | * but it will probably only crash. | |
1da177e4 LT |
18 | * |
19 | * (*) suspend/resume support is needed to make it safe. | |
543cc27d | 20 | * |
b9827e4b | 21 | * If you have any filesystems on USB devices mounted before software suspend, |
543cc27d | 22 | * they won't be accessible after resume and you may lose data, as though |
b9827e4b DB |
23 | * you have unplugged the USB devices with mounted filesystems on them; |
24 | * see the FAQ below for details. (This is not true for more traditional | |
25 | * power states like "standby", which normally don't turn USB off.) | |
1da177e4 LT |
26 | |
27 | You need to append resume=/dev/your_swap_partition to kernel command | |
28 | line. Then you suspend by | |
29 | ||
30 | echo shutdown > /sys/power/disk; echo disk > /sys/power/state | |
31 | ||
32 | . If you feel ACPI works pretty well on your system, you might try | |
33 | ||
34 | echo platform > /sys/power/disk; echo disk > /sys/power/state | |
35 | ||
543cc27d PM |
36 | . If you have SATA disks, you'll need recent kernels with SATA suspend |
37 | support. For suspend and resume to work, make sure your disk drivers | |
38 | are built into kernel -- not modules. [There's way to make | |
39 | suspend/resume with modular disk drivers, see FAQ, but you probably | |
40 | should not do that.] | |
41 | ||
853609b6 | 42 | If you want to limit the suspend image size to N bytes, do |
ca0aec0f RW |
43 | |
44 | echo N > /sys/power/image_size | |
45 | ||
46 | before suspend (it is limited to 500 MB by default). | |
1da177e4 LT |
47 | |
48 | ||
49 | Article about goals and implementation of Software Suspend for Linux | |
50 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
51 |