diff options
author | Anton Altaparmakov <aia21@cantab.net> | 2006-03-23 12:06:08 -0500 |
---|---|---|
committer | Anton Altaparmakov <aia21@cantab.net> | 2006-03-23 12:06:08 -0500 |
commit | 92fe7b9ea8ef101bff3c75ade89b93b5f62a7955 (patch) | |
tree | 3dba4faa78f1bbe4be503275173e3a63b5d60f22 /Documentation | |
parent | e750d1c7cc314b9ba1934b0b474b7d39f906f865 (diff) | |
parent | b0e6e962992b76580f4900b166a337bad7c1e81b (diff) |
Merge branch 'master' of /usr/src/ntfs-2.6/
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/kernel-parameters.txt | 11 | ||||
-rw-r--r-- | Documentation/power/swsusp.txt | 51 | ||||
-rw-r--r-- | Documentation/power/userland-swsusp.txt | 149 | ||||
-rw-r--r-- | Documentation/power/video.txt | 74 |
4 files changed, 236 insertions, 49 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index fc99075e0af4..7b7382d0f758 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -1008,7 +1008,9 @@ running once the system is up. | |||
1008 | noexec=on: enable non-executable mappings (default) | 1008 | noexec=on: enable non-executable mappings (default) |
1009 | noexec=off: disable nn-executable mappings | 1009 | noexec=off: disable nn-executable mappings |
1010 | 1010 | ||
1011 | nofxsr [BUGS=IA-32] | 1011 | nofxsr [BUGS=IA-32] Disables x86 floating point extended |
1012 | register save and restore. The kernel will only save | ||
1013 | legacy floating-point registers on task switch. | ||
1012 | 1014 | ||
1013 | nohlt [BUGS=ARM] | 1015 | nohlt [BUGS=ARM] |
1014 | 1016 | ||
@@ -1053,6 +1055,8 @@ running once the system is up. | |||
1053 | 1055 | ||
1054 | nosbagart [IA-64] | 1056 | nosbagart [IA-64] |
1055 | 1057 | ||
1058 | nosep [BUGS=IA-32] Disables x86 SYSENTER/SYSEXIT support. | ||
1059 | |||
1056 | nosmp [SMP] Tells an SMP kernel to act as a UP kernel. | 1060 | nosmp [SMP] Tells an SMP kernel to act as a UP kernel. |
1057 | 1061 | ||
1058 | nosync [HW,M68K] Disables sync negotiation for all devices. | 1062 | nosync [HW,M68K] Disables sync negotiation for all devices. |
@@ -1122,6 +1126,11 @@ running once the system is up. | |||
1122 | pas16= [HW,SCSI] | 1126 | pas16= [HW,SCSI] |
1123 | See header of drivers/scsi/pas16.c. | 1127 | See header of drivers/scsi/pas16.c. |
1124 | 1128 | ||
1129 | pause_on_oops= | ||
1130 | Halt all CPUs after the first oops has been printed for | ||
1131 | the specified number of seconds. This is to be used if | ||
1132 | your oopses keep scrolling off the screen. | ||
1133 | |||
1125 | pcbit= [HW,ISDN] | 1134 | pcbit= [HW,ISDN] |
1126 | 1135 | ||
1127 | pcd. [PARIDE] | 1136 | pcd. [PARIDE] |
diff --git a/Documentation/power/swsusp.txt b/Documentation/power/swsusp.txt index b28b7f04abb8..d7814a113ee1 100644 --- a/Documentation/power/swsusp.txt +++ b/Documentation/power/swsusp.txt | |||
@@ -17,6 +17,11 @@ Some warnings, first. | |||
17 | * but it will probably only crash. | 17 | * but it will probably only crash. |
18 | * | 18 | * |
19 | * (*) suspend/resume support is needed to make it safe. | 19 | * (*) suspend/resume support is needed to make it safe. |
20 | * | ||
21 | * If you have any filesystems on USB devices mounted before suspend, | ||
22 | * they won't be accessible after resume and you may lose data, as though | ||
23 | * you have unplugged the USB devices with mounted filesystems on them | ||
24 | * (see the FAQ below for details). | ||
20 | 25 | ||
21 | You need to append resume=/dev/your_swap_partition to kernel command | 26 | You need to append resume=/dev/your_swap_partition to kernel command |
22 | line. Then you suspend by | 27 | line. Then you suspend by |
@@ -27,19 +32,18 @@ echo shutdown > /sys/power/disk; echo disk > /sys/power/state | |||
27 | 32 | ||
28 | echo platform > /sys/power/disk; echo disk > /sys/power/state | 33 | echo platform > /sys/power/disk; echo disk > /sys/power/state |
29 | 34 | ||
35 | . If you have SATA disks, you'll need recent kernels with SATA suspend | ||
36 | support. For suspend and resume to work, make sure your disk drivers | ||
37 | are built into kernel -- not modules. [There's way to make | ||
38 | suspend/resume with modular disk drivers, see FAQ, but you probably | ||
39 | should not do that.] | ||
40 | |||
30 | If you want to limit the suspend image size to N bytes, do | 41 | If you want to limit the suspend image size to N bytes, do |
31 | 42 | ||
32 | echo N > /sys/power/image_size | 43 | echo N > /sys/power/image_size |
33 | 44 | ||
34 | before suspend (it is limited to 500 MB by default). | 45 | before suspend (it is limited to 500 MB by default). |
35 | 46 | ||
36 | Encrypted suspend image: | ||
37 | ------------------------ | ||
38 | If you want to store your suspend image encrypted with a temporary | ||
39 | key to prevent data gathering after resume you must compile | ||
40 | crypto and the aes algorithm into the kernel - modules won't work | ||
41 | as they cannot be loaded at resume time. | ||
42 | |||
43 | 47 | ||
44 | Article about goals and implementation of Software Suspend for Linux | 48 | Article about goals and implementation of Software Suspend for Linux |
45 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 49 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
@@ -333,4 +337,37 @@ init=/bin/bash, then swapon and starting suspend sequence manually | |||
333 | usually does the trick. Then it is good idea to try with latest | 337 | usually does the trick. Then it is good idea to try with latest |
334 | vanilla kernel. | 338 | vanilla kernel. |
335 | 339 | ||
340 | Q: How can distributions ship a swsusp-supporting kernel with modular | ||
341 | disk drivers (especially SATA)? | ||
342 | |||
343 | A: Well, it can be done, load the drivers, then do echo into | ||
344 | /sys/power/disk/resume file from initrd. Be sure not to mount | ||
345 | anything, not even read-only mount, or you are going to lose your | ||
346 | data. | ||
347 | |||
348 | Q: How do I make suspend more verbose? | ||
349 | |||
350 | A: If you want to see any non-error kernel messages on the virtual | ||
351 | terminal the kernel switches to during suspend, you have to set the | ||
352 | kernel console loglevel to at least 5, for example by doing | ||
353 | |||
354 | echo 5 > /proc/sys/kernel/printk | ||
355 | |||
356 | Q: Is this true that if I have a mounted filesystem on a USB device and | ||
357 | I suspend to disk, I can lose data unless the filesystem has been mounted | ||
358 | with "sync"? | ||
359 | |||
360 | A: That's right. It depends on your hardware, and it could be true even for | ||
361 | suspend-to-RAM. In fact, even with "-o sync" you can lose data if your | ||
362 | programs have information in buffers they haven't written out to disk. | ||
363 | |||
364 | If you're lucky, your hardware will support low-power modes for USB | ||
365 | controllers while the system is asleep. Lots of hardware doesn't, | ||
366 | however. Shutting off the power to a USB controller is equivalent to | ||
367 | unplugging all the attached devices. | ||
368 | |||
369 | Remember that it's always a bad idea to unplug a disk drive containing a | ||
370 | mounted filesystem. With USB that's true even when your system is asleep! | ||
371 | The safest thing is to unmount all USB-based filesystems before suspending | ||
372 | and remount them after resuming. | ||
336 | 373 | ||
diff --git a/Documentation/power/userland-swsusp.txt b/Documentation/power/userland-swsusp.txt new file mode 100644 index 000000000000..94058220aaf0 --- /dev/null +++ b/Documentation/power/userland-swsusp.txt | |||
@@ -0,0 +1,149 @@ | |||
1 | Documentation for userland software suspend interface | ||
2 | (C) 2006 Rafael J. Wysocki <rjw@sisk.pl> | ||
3 | |||
4 | First, the warnings at the beginning of swsusp.txt still apply. | ||
5 | |||
6 | Second, you should read the FAQ in swsusp.txt _now_ if you have not | ||
7 | done it already. | ||
8 | |||
9 | Now, to use the userland interface for software suspend you need special | ||
10 | utilities that will read/write the system memory snapshot from/to the | ||
11 | kernel. Such utilities are available, for example, from | ||
12 | <http://www.sisk.pl/kernel/utilities/suspend>. You may want to have | ||
13 | a look at them if you are going to develop your own suspend/resume | ||
14 | utilities. | ||
15 | |||
16 | The interface consists of a character device providing the open(), | ||
17 | release(), read(), and write() operations as well as several ioctl() | ||
18 | commands defined in kernel/power/power.h. The major and minor | ||
19 | numbers of the device are, respectively, 10 and 231, and they can | ||
20 | be read from /sys/class/misc/snapshot/dev. | ||
21 | |||
22 | The device can be open either for reading or for writing. If open for | ||
23 | reading, it is considered to be in the suspend mode. Otherwise it is | ||
24 | assumed to be in the resume mode. The device cannot be open for reading | ||
25 | and writing. It is also impossible to have the device open more than once | ||
26 | at a time. | ||
27 | |||
28 | The ioctl() commands recognized by the device are: | ||
29 | |||
30 | SNAPSHOT_FREEZE - freeze user space processes (the current process is | ||
31 | not frozen); this is required for SNAPSHOT_ATOMIC_SNAPSHOT | ||
32 | and SNAPSHOT_ATOMIC_RESTORE to succeed | ||
33 | |||
34 | SNAPSHOT_UNFREEZE - thaw user space processes frozen by SNAPSHOT_FREEZE | ||
35 | |||
36 | SNAPSHOT_ATOMIC_SNAPSHOT - create a snapshot of the system memory; the | ||
37 | last argument of ioctl() should be a pointer to an int variable, | ||
38 | the value of which will indicate whether the call returned after | ||
39 | creating the snapshot (1) or after restoring the system memory state | ||
40 | from it (0) (after resume the system finds itself finishing the | ||
41 | SNAPSHOT_ATOMIC_SNAPSHOT ioctl() again); after the snapshot | ||
42 | has been created the read() operation can be used to transfer | ||
43 | it out of the kernel | ||
44 | |||
45 | SNAPSHOT_ATOMIC_RESTORE - restore the system memory state from the | ||
46 | uploaded snapshot image; before calling it you should transfer | ||
47 | the system memory snapshot back to the kernel using the write() | ||
48 | operation; this call will not succeed if the snapshot | ||
49 | image is not available to the kernel | ||
50 | |||
51 | SNAPSHOT_FREE - free memory allocated for the snapshot image | ||
52 | |||
53 | SNAPSHOT_SET_IMAGE_SIZE - set the preferred maximum size of the image | ||
54 | (the kernel will do its best to ensure the image size will not exceed | ||
55 | this number, but if it turns out to be impossible, the kernel will | ||
56 | create the smallest image possible) | ||
57 | |||
58 | SNAPSHOT_AVAIL_SWAP - return the amount of available swap in bytes (the last | ||
59 | argument should be a pointer to an unsigned int variable that will | ||
60 | contain the result if the call is successful). | ||
61 | |||
62 | SNAPSHOT_GET_SWAP_PAGE - allocate a swap page from the resume partition | ||
63 | (the last argument should be a pointer to a loff_t variable that | ||
64 | will contain the swap page offset if the call is successful) | ||
65 | |||
66 | SNAPSHOT_FREE_SWAP_PAGES - free all swap pages allocated with | ||
67 | SNAPSHOT_GET_SWAP_PAGE | ||
68 | |||
69 | SNAPSHOT_SET_SWAP_FILE - set the resume partition (the last ioctl() argument | ||
70 | should specify the device's major and minor numbers in the old | ||
71 | two-byte format, as returned by the stat() function in the .st_rdev | ||
72 | member of the stat structure); it is recommended to always use this | ||
73 | call, because the code to set the resume partition could be removed from | ||
74 | future kernels | ||
75 | |||
76 | The device's read() operation can be used to transfer the snapshot image from | ||
77 | the kernel. It has the following limitations: | ||
78 | - you cannot read() more than one virtual memory page at a time | ||
79 | - read()s accross page boundaries are impossible (ie. if ypu read() 1/2 of | ||
80 | a page in the previous call, you will only be able to read() | ||
81 | _at_ _most_ 1/2 of the page in the next call) | ||
82 | |||
83 | The device's write() operation is used for uploading the system memory snapshot | ||
84 | into the kernel. It has the same limitations as the read() operation. | ||
85 | |||
86 | The release() operation frees all memory allocated for the snapshot image | ||
87 | and all swap pages allocated with SNAPSHOT_GET_SWAP_PAGE (if any). | ||
88 | Thus it is not necessary to use either SNAPSHOT_FREE or | ||
89 | SNAPSHOT_FREE_SWAP_PAGES before closing the device (in fact it will also | ||
90 | unfreeze user space processes frozen by SNAPSHOT_UNFREEZE if they are | ||
91 | still frozen when the device is being closed). | ||
92 | |||
93 | Currently it is assumed that the userland utilities reading/writing the | ||
94 | snapshot image from/to the kernel will use a swap parition, called the resume | ||
95 | partition, as storage space. However, this is not really required, as they | ||
96 | can use, for example, a special (blank) suspend partition or a file on a partition | ||
97 | that is unmounted before SNAPSHOT_ATOMIC_SNAPSHOT and mounted afterwards. | ||
98 | |||
99 | These utilities SHOULD NOT make any assumptions regarding the ordering of | ||
100 | data within the snapshot image, except for the image header that MAY be | ||
101 | assumed to start with an swsusp_info structure, as specified in | ||
102 | kernel/power/power.h. This structure MAY be used by the userland utilities | ||
103 | to obtain some information about the snapshot image, such as the size | ||
104 | of the snapshot image, including the metadata and the header itself, | ||
105 | contained in the .size member of swsusp_info. | ||
106 | |||
107 | The snapshot image MUST be written to the kernel unaltered (ie. all of the image | ||
108 | data, metadata and header MUST be written in _exactly_ the same amount, form | ||
109 | and order in which they have been read). Otherwise, the behavior of the | ||
110 | resumed system may be totally unpredictable. | ||
111 | |||
112 | While executing SNAPSHOT_ATOMIC_RESTORE the kernel checks if the | ||
113 | structure of the snapshot image is consistent with the information stored | ||
114 | in the image header. If any inconsistencies are detected, | ||
115 | SNAPSHOT_ATOMIC_RESTORE will not succeed. Still, this is not a fool-proof | ||
116 | mechanism and the userland utilities using the interface SHOULD use additional | ||
117 | means, such as checksums, to ensure the integrity of the snapshot image. | ||
118 | |||
119 | The suspending and resuming utilities MUST lock themselves in memory, | ||
120 | preferrably using mlockall(), before calling SNAPSHOT_FREEZE. | ||
121 | |||
122 | The suspending utility MUST check the value stored by SNAPSHOT_ATOMIC_SNAPSHOT | ||
123 | in the memory location pointed to by the last argument of ioctl() and proceed | ||
124 | in accordance with it: | ||
125 | 1. If the value is 1 (ie. the system memory snapshot has just been | ||
126 | created and the system is ready for saving it): | ||
127 | (a) The suspending utility MUST NOT close the snapshot device | ||
128 | _unless_ the whole suspend procedure is to be cancelled, in | ||
129 | which case, if the snapshot image has already been saved, the | ||
130 | suspending utility SHOULD destroy it, preferrably by zapping | ||
131 | its header. If the suspend is not to be cancelled, the | ||
132 | system MUST be powered off or rebooted after the snapshot | ||
133 | image has been saved. | ||
134 | (b) The suspending utility SHOULD NOT attempt to perform any | ||
135 | file system operations (including reads) on the file systems | ||
136 | that were mounted before SNAPSHOT_ATOMIC_SNAPSHOT has been | ||
137 | called. However, it MAY mount a file system that was not | ||
138 | mounted at that time and perform some operations on it (eg. | ||
139 | use it for saving the image). | ||
140 | 2. If the value is 0 (ie. the system state has just been restored from | ||
141 | the snapshot image), the suspending utility MUST close the snapshot | ||
142 | device. Afterwards it will be treated as a regular userland process, | ||
143 | so it need not exit. | ||
144 | |||
145 | The resuming utility SHOULD NOT attempt to mount any file systems that could | ||
146 | be mounted before suspend and SHOULD NOT attempt to perform any operations | ||
147 | involving such file systems. | ||
148 | |||
149 | For details, please refer to the source code. | ||
diff --git a/Documentation/power/video.txt b/Documentation/power/video.txt index 912bed87c758..d18a57d1a531 100644 --- a/Documentation/power/video.txt +++ b/Documentation/power/video.txt | |||
@@ -1,7 +1,7 @@ | |||
1 | 1 | ||
2 | Video issues with S3 resume | 2 | Video issues with S3 resume |
3 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 3 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
4 | 2003-2005, Pavel Machek | 4 | 2003-2006, Pavel Machek |
5 | 5 | ||
6 | During S3 resume, hardware needs to be reinitialized. For most | 6 | During S3 resume, hardware needs to be reinitialized. For most |
7 | devices, this is easy, and kernel driver knows how to do | 7 | devices, this is easy, and kernel driver knows how to do |
@@ -15,6 +15,27 @@ run normally so video card is normally initialized. It should not be | |||
15 | problem for S1 standby, because hardware should retain its state over | 15 | problem for S1 standby, because hardware should retain its state over |
16 | that. | 16 | that. |
17 | 17 | ||
18 | We either have to run video BIOS during early resume, or interpret it | ||
19 | using vbetool later, or maybe nothing is neccessary on particular | ||
20 | system because video state is preserved. Unfortunately different | ||
21 | methods work on different systems, and no known method suits all of | ||
22 | them. | ||
23 | |||
24 | Userland application called s2ram has been developed; it contains long | ||
25 | whitelist of systems, and automatically selects working method for a | ||
26 | given system. It can be downloaded from CVS at | ||
27 | www.sf.net/projects/suspend . If you get a system that is not in the | ||
28 | whitelist, please try to find a working solution, and submit whitelist | ||
29 | entry so that work does not need to be repeated. | ||
30 | |||
31 | Currently, VBE_SAVE method (6 below) works on most | ||
32 | systems. Unfortunately, vbetool only runs after userland is resumed, | ||
33 | so it makes debugging of early resume problems | ||
34 | hard/impossible. Methods that do not rely on userland are preferable. | ||
35 | |||
36 | Details | ||
37 | ~~~~~~~ | ||
38 | |||
18 | There are a few types of systems where video works after S3 resume: | 39 | There are a few types of systems where video works after S3 resume: |
19 | 40 | ||
20 | (1) systems where video state is preserved over S3. | 41 | (1) systems where video state is preserved over S3. |
@@ -104,6 +125,7 @@ HP NX7000 ??? (*) | |||
104 | HP Pavilion ZD7000 vbetool post needed, need open-source nv driver for X | 125 | HP Pavilion ZD7000 vbetool post needed, need open-source nv driver for X |
105 | HP Omnibook XE3 athlon version none (1) | 126 | HP Omnibook XE3 athlon version none (1) |
106 | HP Omnibook XE3GC none (1), video is S3 Savage/IX-MV | 127 | HP Omnibook XE3GC none (1), video is S3 Savage/IX-MV |
128 | HP Omnibook 5150 none (1), (S1 also works OK) | ||
107 | IBM TP T20, model 2647-44G none (1), video is S3 Inc. 86C270-294 Savage/IX-MV, vesafb gets "interesting" but X work. | 129 | IBM TP T20, model 2647-44G none (1), video is S3 Inc. 86C270-294 Savage/IX-MV, vesafb gets "interesting" but X work. |
108 | IBM TP A31 / Type 2652-M5G s3_mode (3) [works ok with BIOS 1.04 2002-08-23, but not at all with BIOS 1.11 2004-11-05 :-(] | 130 | IBM TP A31 / Type 2652-M5G s3_mode (3) [works ok with BIOS 1.04 2002-08-23, but not at all with BIOS 1.11 2004-11-05 :-(] |
109 | IBM TP R32 / Type 2658-MMG none (1) | 131 | IBM TP R32 / Type 2658-MMG none (1) |
@@ -120,18 +142,24 @@ IBM ThinkPad T42p (2373-GTG) s3_bios (2) | |||
120 | IBM TP X20 ??? (*) | 142 | IBM TP X20 ??? (*) |
121 | IBM TP X30 s3_bios (2) | 143 | IBM TP X30 s3_bios (2) |
122 | IBM TP X31 / Type 2672-XXH none (1), use radeontool (http://fdd.com/software/radeon/) to turn off backlight. | 144 | IBM TP X31 / Type 2672-XXH none (1), use radeontool (http://fdd.com/software/radeon/) to turn off backlight. |
123 | IBM TP X32 none (1), but backlight is on and video is trashed after long suspend | 145 | IBM TP X32 none (1), but backlight is on and video is trashed after long suspend. s3_bios,s3_mode (4) works too. Perhaps that gets better results? |
124 | IBM Thinkpad X40 Type 2371-7JG s3_bios,s3_mode (4) | 146 | IBM Thinkpad X40 Type 2371-7JG s3_bios,s3_mode (4) |
147 | IBM TP 600e none(1), but a switch to console and back to X is needed | ||
125 | Medion MD4220 ??? (*) | 148 | Medion MD4220 ??? (*) |
126 | Samsung P35 vbetool needed (6) | 149 | Samsung P35 vbetool needed (6) |
127 | Sharp PC-AR10 (ATI rage) none (1) | 150 | Sharp PC-AR10 (ATI rage) none (1), backlight does not switch off |
128 | Sony Vaio PCG-C1VRX/K s3_bios (2) | 151 | Sony Vaio PCG-C1VRX/K s3_bios (2) |
129 | Sony Vaio PCG-F403 ??? (*) | 152 | Sony Vaio PCG-F403 ??? (*) |
153 | Sony Vaio PCG-GRT995MP none (1), works with 'nv' X driver | ||
154 | Sony Vaio PCG-GR7/K none (1), but needs radeonfb, use radeontool (http://fdd.com/software/radeon/) to turn off backlight. | ||
130 | Sony Vaio PCG-N505SN ??? (*) | 155 | Sony Vaio PCG-N505SN ??? (*) |
131 | Sony Vaio vgn-s260 X or boot-radeon can init it (5) | 156 | Sony Vaio vgn-s260 X or boot-radeon can init it (5) |
157 | Sony Vaio vgn-S580BH vga=normal, but suspend from X. Console will be blank unless you return to X. | ||
158 | Sony Vaio vgn-FS115B s3_bios (2),s3_mode (4) | ||
132 | Toshiba Libretto L5 none (1) | 159 | Toshiba Libretto L5 none (1) |
133 | Toshiba Satellite 4030CDT s3_mode (3) | 160 | Toshiba Portege 3020CT s3_mode (3) |
134 | Toshiba Satellite 4080XCDT s3_mode (3) | 161 | Toshiba Satellite 4030CDT s3_mode (3) (S1 also works OK) |
162 | Toshiba Satellite 4080XCDT s3_mode (3) (S1 also works OK) | ||
135 | Toshiba Satellite 4090XCDT ??? (*) | 163 | Toshiba Satellite 4090XCDT ??? (*) |
136 | Toshiba Satellite P10-554 s3_bios,s3_mode (4)(****) | 164 | Toshiba Satellite P10-554 s3_bios,s3_mode (4)(****) |
137 | Toshiba M30 (2) xor X with nvidia driver using internal AGP | 165 | Toshiba M30 (2) xor X with nvidia driver using internal AGP |
@@ -151,39 +179,3 @@ Asus A7V8X nVidia RIVA TNT2 model 64 s3_bios,s3_mode (4) | |||
151 | (***) To be tested with a newer kernel. | 179 | (***) To be tested with a newer kernel. |
152 | 180 | ||
153 | (****) Not with SMP kernel, UP only. | 181 | (****) Not with SMP kernel, UP only. |
154 | |||
155 | VBEtool details | ||
156 | ~~~~~~~~~~~~~~~ | ||
157 | (with thanks to Carl-Daniel Hailfinger) | ||
158 | |||
159 | First, boot into X and run the following script ONCE: | ||
160 | #!/bin/bash | ||
161 | statedir=/root/s3/state | ||
162 | mkdir -p $statedir | ||
163 | chvt 2 | ||
164 | sleep 1 | ||
165 | vbetool vbestate save >$statedir/vbe | ||
166 | |||
167 | |||
168 | To suspend and resume properly, call the following script as root: | ||
169 | #!/bin/bash | ||
170 | statedir=/root/s3/state | ||
171 | curcons=`fgconsole` | ||
172 | fuser /dev/tty$curcons 2>/dev/null|xargs ps -o comm= -p|grep -q X && chvt 2 | ||
173 | cat /dev/vcsa >$statedir/vcsa | ||
174 | sync | ||
175 | echo 3 >/proc/acpi/sleep | ||
176 | sync | ||
177 | vbetool post | ||
178 | vbetool vbestate restore <$statedir/vbe | ||
179 | cat $statedir/vcsa >/dev/vcsa | ||
180 | rckbd restart | ||
181 | chvt $[curcons%6+1] | ||
182 | chvt $curcons | ||
183 | |||
184 | |||
185 | Unless you change your graphics card or other hardware configuration, | ||
186 | the state once saved will be OK for every resume afterwards. | ||
187 | NOTE: The "rckbd restart" command may be different for your | ||
188 | distribution. Simply replace it with the command you would use to | ||
189 | set the fonts on screen. | ||