Gentoo Archives: gentoo-user

From: Paul Gibbons <paul@××××××××××××.com>
To: gentoo-user@l.g.o
Cc: iaindb@××××××××××××.au
Subject: Re: [gentoo-user] Standby
Date: Thu, 04 Oct 2007 20:43:00
Message-Id: 20071004212628.5f901ecf@pkami.e7even.com
In Reply to: Re: [gentoo-user] Standby by Iain Buchanan
1 On Mon, 17 Sep 2007 09:06:32 +0930
2 Iain Buchanan <iaindb@××××××××××××.au> wrote:
3
4 > On Sat, 2007-09-15 at 15:51 +0100, Paul Gibbons wrote:
5 >
6 > [snip]
7 >
8 > > I have in the passed got to the point that pressing the power button
9 > > shut the system down and added an entry into my grub menu.lst of:
10 >
11 > [snip]
12 >
13 > > but when I pressed the power button again it performed a full
14 > > restart.
15 >
16 > Here are some things that I do:
17 >
18 > 1. My method is to keep grub.conf the same regardless of whether I'm
19 > hibernating or not:
20 >
21 > title Gentoo (Linux 2.6.22s2-r1)
22 > root (hd0,2)
23 > kernel /vmlinuz-2.6.22-suspend2-r1 root=/dev/hda7
24 > video=vesafb:ywrap,mtrr,1280x1024-32@60
25 > splash=silent,theme:livecd-2007.0 CONSOLE=/dev/tty1
26 > initrd /fbsplash-livecd-2007.0-1280x1024
27 >
28 > When the kernel has loaded, it then looks for a valid suspend image in
29 > swap (or hd). If it finds one, it uses it, if it doesn't, then it
30 > continues booting as normal.
31 >
32 > 2. I should mention that I'm using suspend2-sources.
33 >
34 > 3. the suspend2 users mailing list is an excellent place to find help
35 > with wierd my-system-won't-suspend issues.
36 >
37 > 4. my /etc/acpi/default.sh has this in it:
38 >
39 > case "$ev_type" in
40 > button)
41 > case "$event" in
42 > power)
43 > logger "acpid: default.sh hibernate"
44 > /usr/sbin/hibernate
45 > break
46 > ;;
47 > ...
48 >
49 > 5. and lastly if, when you boot, you can't "resume", it sounds like
50 > you haven't specified where your suspend image is. Either in the
51 > kernel: CONFIG_SUSPEND2_DEFAULT_RESUME2="swap:/dev/hda10"
52 > or on the boot line:
53 > resume=swap:/dev/hda10
54 >
55 > If that still doesn't help, post back with the output of `dmesg | grep
56 > -i suspend` after you've tried to resume.
57 >
58 > HTH,
59
60
61 Thanks for the advice. Hopefully I can get enough functionality with
62 swsusp from gentoo-sources and so not need to change to
63 suspend2-sources - although that may be a very procedure?
64
65 Anyway I have created a 32GB SWAP partition (dev/sda5) and gadded
66 resume=/dev/sda5 to the boot options. And also made the suggested
67 change to /etc/acpi/default.sh in point (4) above. Now when I press the
68 soft power button the system suspends ( all processes appear to stop
69 and the screen goes blank but for a flashing cursor in the top left of
70 the 2 screens of my dual headed system) but after a few minutes the
71 system resumes. It seems that either a wakeup message is being received
72 or the hibernate script cannot actually power off the computer and so
73 after a timeout period it resumes.
74
75
76 The contents of /var/log/hibernate.log are:
77
78
79 Starting suspend at Thu Oct 4 20:15:48 BST 2007
80 Oct 4 20:15:48.55 hibernate: [01] Executing CheckLastResume ...
81 Oct 4 20:15:48.56 hibernate: [01] Executing CheckRunlevel ...
82 Oct 4 20:15:48.57 hibernate: [01] Executing LockFileGet ...
83 Oct 4 20:15:48.58 hibernate: [01] Executing NewKernelFileCheck ...
84 Oct 4 20:15:48.59 hibernate: [05] Executing XStatusSuspendBegin ...
85 Oct 4 20:15:48.61 hibernate: [10] Executing
86 EnsureSysfsPowerStateCapable ... Oct 4 20:15:48.63 hibernate: [11]
87 Executing ChangeGrubMenu ... Oct 4 20:15:48.66 Changing grub menu...
88 Oct 4 20:15:48.97 hibernate: [11] Executing XHacksSuspendHook1 ...
89 Oct 4 20:15:48.98 hibernate: [15] Executing PauseAudio ...
90 Oct 4 20:15:49.14 hibernate: [20] Executing MiscLaunchAuxFunc1 ...
91 Executing echo "Good night!"...
92 Good night!
93 Oct 4 20:15:49.15 hibernate: [20] Executing MiscLaunchAuxFunc2 ...
94 Executing echo "Good night!"...
95 Good night!
96 Oct 4 20:15:49.16 hibernate: [20] Executing XStatusProgress ...
97 Oct 4 20:15:49.18 hibernate: [30] Executing XStatusProgress ...
98 Oct 4 20:15:49.19 hibernate: [40] Executing XStatusProgress ...
99 Oct 4 20:15:49.20 hibernate: [50] Executing XStatusProgress ...
100 Oct 4 20:15:49.21 hibernate: [59] Executing RemountXFSBootRO ...
101 Oct 4 20:15:49.25 hibernate: [60] Executing NetworkStop ...
102 Oct 4 20:15:49.26 Bringing down interface eth1
103 * Stopping apache2 ...
104  [ ok ]
105 * Unmounting network filesystems ...
106  [ ok ]
107 * samba -> stop: smbd ...
108  [ ok ]
109 * samba -> stop: nmbd ...
110  [ ok ]
111 * Stopping sshd ...
112  [ ok ]
113 * Stopping eth1
114 * Bringing down eth1
115 * Shutting down eth1 ...
116  [ ok ]
117 Oct 4 20:15:52.00 hibernate: [60] Executing XStatusProgress ...
118 Oct 4 20:15:52.01 hibernate: [70] Executing ClockSave ...
119 Oct 4 20:15:53.00 hibernate: [70] Executing ClockSave ...
120 Oct 4 20:15:54.00 hibernate: [70] Executing XStatusProgress ...
121 Oct 4 20:15:54.02 hibernate: [80] Executing XStatusProgress ...
122 Oct 4 20:15:54.03 hibernate: [89] Executing SaveKernelModprobe ...
123 Oct 4 20:15:54.04 hibernate: [90] Executing XStatusProgress ...
124 Oct 4 20:15:54.05 hibernate: [91] Executing ModulesUnloadBlacklist ...
125 Oct 4 20:15:54.06 Unloading blacklisted modules
126 listed /etc/hibernate/blacklisted-modules Oct 4 20:15:54.31 Module
127 version for ipw2100 is Oct 4 20:15:54.34 Module version for ipw2200 is
128 Oct 4 20:15:55.02 Module version for ndiswrapper is
129 Oct 4 20:15:55.06 hibernate: [91] Executing ModulesUnloadBlacklist ...
130 Oct 4 20:15:55.07 Unloading blacklisted modules
131 listed /etc/hibernate/blacklisted-modules Oct 4 20:15:55.31 Module
132 version for ipw2100 is Oct 4 20:15:55.34 Module version for ipw2200 is
133 Oct 4 20:15:56.04 Module version for ndiswrapper is
134 Oct 4 20:15:56.08 hibernate: [93] Executing DiskCacheDisable ...
135 Oct 4 20:15:56.10 hibernate: Disabling disk cache on /dev/sdb5
136 Oct 4 20:15:56.62 hibernate: Disabling disk cache on /dev/sdb5
137 Oct 4 20:15:57.13 hibernate: [95] Executing XHacksSuspendHook2 ...
138 Oct 4 20:15:57.15 xhacks: changing console from 7 to 15
139 Oct 4 20:15:57.89 hibernate: [95] Executing XStatusProgress ...
140 Oct 4 20:15:57.90 hibernate: [98] Executing CheckRunlevel ...
141 Oct 4 20:15:57.91 hibernate: [98] Executing FullSpeedCPUSuspend ...
142 Oct 4 20:15:57.95 Switched to performance, with min freq at 2200000
143 Oct 4 20:15:57.95 hibernate: [98] Executing XStatusProgressKill ...
144 Oct 4 20:15:57.96 hibernate: [99] Executing DoSysfsPowerStateSuspend ...
145 Oct 4 20:15:57.96 hibernate: Activating sysfs power state disk ...
146 Oct 4 20:16:53.79 hibernate: [98] Executing FullSpeedCPUResume ...
147 Oct 4 20:16:53.80 hibernate: [95] Executing XStatusResumeBegin ...
148 Oct 4 20:16:53.81 hibernate: [93] Executing DiskCacheEnable ...
149 Oct 4 20:16:53.82 hibernate: Enabling disk cache on /dev/sdb5
150 Oct 4 20:16:54.33 hibernate: Enabling disk cache on /dev/sdb5
151 Oct 4 20:16:54.83 hibernate: [91] Executing GentooModulesAutoload ...
152 Oct 4 20:16:54.91 Loading modules
153 listed /etc/modules.autoload.d/kernel-2.6 Oct 4 20:16:54.92 hibernate:
154 [91] Executing GentooModulesAutoload ... Oct 4 20:16:55.00 Loading
155 modules listed /etc/modules.autoload.d/kernel-2.6 Oct 4 20:16:55.02
156 hibernate: [90] Executing XStatusProgress ... Oct 4 20:16:55.03
157 hibernate: [90] Executing ModulesLoad ... Oct 4 20:16:55.04 hibernate:
158 [89] Executing RestoreKernelModprobe ... Oct 4 20:16:55.05 hibernate:
159 [85] Executing XHacksResumeHook2 ... Oct 4 20:16:55.06 xhacks: changing
160 console back to 7 Oct 4 20:16:55.09 hibernate: [80] Executing
161 XStatusProgress ... Oct 4 20:16:55.11 hibernate: [70] Executing
162 XStatusProgress ... Oct 4 20:16:55.13 hibernate: [70] Executing
163 ClockRestore ... Oct 4 20:16:56.00 hibernate: [70] Executing
164 ClockRestore ... Oct 4 20:16:57.00 hibernate: [70] Executing
165 ClockRestore ... Oct 4 20:16:58.00 hibernate: [70] Executing
166 ClockRestore ... Oct 4 20:16:59.00 hibernate: [60] Executing
167 XStatusProgress ... Oct 4 20:16:59.01 hibernate: [60] Executing
168 NetworkStart ... Oct 4 20:16:59.01 hibernate: [59] Executing
169 RemountXFSBootRW ... Oct 4 20:16:59.03 hibernate: [50] Executing
170 XStatusProgress ... Oct 4 20:16:59.03 hibernate: [40] Executing
171 XStatusProgress ... Oct 4 20:16:59.04 hibernate: [30] Executing
172 XStatusProgress ... Oct 4 20:16:59.05 hibernate: [20] Executing
173 XStatusProgress ... Oct 4 20:16:59.05 hibernate: [15] Executing
174 XStatusProgress ... Oct 4 20:16:59.06 hibernate: [11] Executing
175 XHacksResumeHook1 ... Oct 4 20:16:59.06 hibernate: [11] Executing
176 RestoreGrubMenu ... Oct 4 20:16:59.09 hibernate: [05] Executing
177 XStatusProgressKill ... Oct 4 20:16:59.10 hibernate: [01] Executing
178 XStatusReportErrors ... Oct 4 20:16:59.11 hibernate: [01] Executing
179 NoteLastResume ... Oct 4 20:16:59.12 hibernate: [01] Executing
180 LockFilePut ... Resumed at Thu Oct 4 20:16:59 BST 2007
181
182
183 I think the problem is to do with the error seen in the following
184 output from hibernate.
185
186 + set -- Oct 4 20:40:28.47 'hibernate: Activating sysfs power state
187 disk ...'
188 + '[' 1 -le 4 ']'
189 + echo Oct 4 20:40:28.47 hibernate: Activating sysfs power state
190 disk ... Oct 4 20:40:28.47 hibernate: Activating sysfs power state
191 disk ...
192 + '[' -n '' ']'
193 + /bin/echo -n disk
194 /bin/echo: write error: No such device
195 + return 0
196 + ret=0
197 + '[' 0 -ge 2 ']'
198 + '[' 0 -gt 0 ']'
199 + '[' -n '' ']'
200 ++ SortResumeBits
201 ++ /bin/echo -ne
202 '91GentooModulesAutoload\n70ClockRestore\n70ClockRestore\n01XStatusReportErrors\n05XStatusProgressKill\n15XStatusProgress\n20XStatusProgress\n30XStatusProgress\n40XStatusProgress\n50XStatusProgress\n60XStatusProgress\n70XStatusProgress\n80XStatusProgress\n90XStatusProgress\n95XStatusResumeBegin\n85XHacksResumeHook2\n11XHacksResumeHook1\n60NetworkStart\n91GentooModulesAutoload\n90ModulesLoad\n98FullSpeedCPUResume\n11RestoreGrubMenu\n93DiskCacheEnable\n70ClockRestore\n70ClockRestore\n59RemountXFSBootRW\n89RestoreKernelModprobe\n01NoteLastResume\n01LockFilePut\n'
203
204
205 --
206
207 ##### ## ###
208 ###### /### ###
209 /# / / ### ##
210 / / / ### ##
211 / / ## ##
212 ## ## ## /### ## #### ##
213 ## ## ## / ### / ## ### / ## paul@××××××××××××.com
214 /### ## / / ###/ ## ###/ ## mobile: 07972184336
215 / ### ## / ## ## ## ## ##
216 ## ######/ ## ## ## ## ##
217 ## ###### ## ## ## ## ##
218 ## ## ## ## ## ## ##
219 ## ## ## /# ## /# ##
220 ## ## ####/ ## ######/ ## ### /
221 ## ## ## ### ## ##### ## ##/
222 ### # /
223 ### /
224 #####/
225 ###
226
227 Linux paul-gentoo 2.6.22-gentoo-r5
228 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4200+ AuthenticAMD
229 GNU/Linux
230 --
231 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] Standby Hans-Werner Hilse <hilse@×××.de>