View previous topic :: View next topic |
Author |
Message |
creepytennis n00b
Joined: 03 Apr 2007 Posts: 37
|
Posted: Sun Nov 04, 2012 5:42 pm Post subject: hibernate & s2disk do (almost) nothing |
|
|
Hi,
I'm having trouble with hibernate. I recently upgraded my system and in the process bumped my kernel from 2.6.38 to 3.5.7. Hibernate always worked perfectly with my old system and kernel 2.6.38.
When I run 'hibernate' or 's2disk', the monitor goes blank for about a second and then switches back on as if nothing had happened. This happens both with and without X running.
The puzzling thing is that I don't get any error messages. The console output from 'hibernate' is as follows:
Code: |
hibernate: [01] Executing CheckLastResume ...
hibernate: [01] Executing CheckRunlevel ...
hibernate: [01] Executing LockFileGet ...
hibernate: [01] Executing NewKernelFileCheck ...
hibernate: [10] Executing EnsureUSuspendCapable ...
hibernate: [11] Executing XHacksSuspendHook1 ...
hibernate: [59] Executing RemountXFSBootRO ...
hibernate: [89] Executing SaveKernelModprobe ...
Saved /proc/sys/kernel/modprobe is /sbin/modprobe
hibernate: [91] Executing ModulesUnloadBlacklist ...
Unloading blacklisted modules listed /etc/hibernate/blacklisted-modules
Module version for ipw2100 is
Module version for ipw2200 is
Module version for snd_bt_sco is
Module version for ndiswrapper is
hibernate: [95] Executing XHacksSuspendHook2 ...
xhacks: changing console from 7 to 15
hibernate: [98] Executing CheckRunlevel ...
hibernate: [99] Executing DoUSuspend ...
hibernate: Running /usr/sbin/s2disk ...
hibernate: [90] Executing ModulesLoad ...
hibernate: [89] Executing RestoreKernelModprobe ...
hibernate: [85] Executing XHacksResumeHook2 ...
xhacks: changing console back to 7
hibernate: [70] Executing ClockRestore ...
hibernate: [59] Executing RemountXFSBootRW ...
hibernate: [11] Executing XHacksResumeHook1 ...
hibernate: [01] Executing NoteLastResume ...
hibernate: [01] Executing LockFilePut ...
|
All that is in dmesg is the following:
Code: |
[ 1144.293740] PM: Marking nosave pages: [mem 0x000a0000-0x000fffff]
[ 1144.293749] PM: Basic memory bitmaps created
[ 1144.505194] PM: Basic memory bitmaps freed
|
hibernate.log contains the following:
Code: |
Starting suspend at Sun Nov 4 17:37:03 GMT 2012
hibernate: [01] Executing CheckLastResume ...
hibernate: [01] Executing CheckRunlevel ...
hibernate: [01] Executing LockFileGet ...
hibernate: [01] Executing NewKernelFileCheck ...
hibernate: [10] Executing EnsureUSuspendCapable ...
hibernate: [11] Executing XHacksSuspendHook1 ...
hibernate: [59] Executing RemountXFSBootRO ...
hibernate: [89] Executing SaveKernelModprobe ...
Saved /proc/sys/kernel/modprobe is /sbin/modprobe
hibernate: [91] Executing ModulesUnloadBlacklist ...
Unloading blacklisted modules listed /etc/hibernate/blacklisted-modules
Module version for ipw2100 is
Module version for ipw2200 is
Module version for snd_bt_sco is
Module version for ndiswrapper is
hibernate: [95] Executing XHacksSuspendHook2 ...
xhacks: changing console from 7 to 15
hibernate: [98] Executing CheckRunlevel ...
hibernate: [99] Executing DoUSuspend ...
hibernate: Running /usr/sbin/s2disk ...
hibernate: [90] Executing ModulesLoad ...
hibernate: [89] Executing RestoreKernelModprobe ...
hibernate: [85] Executing XHacksResumeHook2 ...
xhacks: changing console back to 7
hibernate: [70] Executing ClockRestore ...
hibernate: [59] Executing RemountXFSBootRW ...
hibernate: [11] Executing XHacksResumeHook1 ...
hibernate: [01] Executing NoteLastResume ...
hibernate: [01] Executing LockFilePut ...
Resumed at Sun Nov 4 17:37:04 GMT 2012
|
The problem is that I don't really have an error message to work with. I've tried all sorts of settings in suspend.conf and the result is always exactly the same. Can anybody suggest anything I could try? Thanks loads for any help. |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21642
|
Posted: Mon Nov 05, 2012 2:21 am Post subject: |
|
|
If you run s2disk directly, does it print anything useful? |
|
Back to top |
|
|
dmpogo Advocate
Joined: 02 Sep 2004 Posts: 3267 Location: Canada
|
Posted: Mon Nov 05, 2012 4:39 am Post subject: |
|
|
Hu wrote: | If you run s2disk directly, does it print anything useful? |
Would not be suprised if it prints classical
/bin/echo : write failed device or resource busy. |
|
Back to top |
|
|
creepytennis n00b
Joined: 03 Apr 2007 Posts: 37
|
Posted: Mon Nov 05, 2012 9:06 am Post subject: |
|
|
Hu wrote: | If you run s2disk directly, does it print anything useful? |
It prints and logs absolutely nothing Just screen goes blank, wait one second, screen back up, command has exited with no console output. |
|
Back to top |
|
|
creepytennis n00b
Joined: 03 Apr 2007 Posts: 37
|
Posted: Mon Nov 05, 2012 9:37 pm Post subject: |
|
|
Right. Well I tried some more things:
Removing every kernel module except the SiS PATA module which I need to boot. So I'm compiling and running the kernel with nearly default configuration. No effect.
Adding 'acpi=off' to kernel parameters. Just a hunch. No effect.
Installing pm-utils and running pm_hibernate: No effect.
cat /var/log/pm-suspend.log:
Code: |
Initial commandline parameters:
Blacklisting 01grub.
Blacklisting 90clock.
Mon Nov 5 18:49:35 GMT 2012: Running hooks for hibernate.
Running hook /usr/lib/pm-utils/sleep.d/00logging hibernate hibernate:
Linux jamiedesktop 3.5.7-gentoo #6 SMP Mon Nov 5 17:41:31 GMT 2012 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz GenuineIntel GNU/Linux
Module Size Used by
nvidia 10945577 40
total used free shared buffers cached
Mem: 509336 493780 15556 0 11676 243096
-/+ buffers/cache: 239008 270328
Swap: 976556 18868 957688
/usr/lib/pm-utils/sleep.d/00logging hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/00powersave hibernate hibernate:
Blacklisting 01grub.
Blacklisting 90clock.
/usr/lib/pm-utils/sleep.d/00powersave hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/01grub hibernate hibernate:
/usr/lib/pm-utils/sleep.d/01grub hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/49bluetooth hibernate hibernate:
/usr/lib/pm-utils/sleep.d/49bluetooth hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/75modules hibernate hibernate:
/usr/lib/pm-utils/sleep.d/75modules hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/90clock hibernate hibernate:
/usr/lib/pm-utils/sleep.d/90clock hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/94cpufreq hibernate hibernate:
/usr/lib/pm-utils/sleep.d/94cpufreq hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/95led hibernate hibernate:
/usr/lib/pm-utils/sleep.d/95led hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/98video-quirk-db-handler hibernate hibernate:
nVidia binary video drive detected, not using quirks.
/usr/lib/pm-utils/sleep.d/98video-quirk-db-handler hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/99video hibernate hibernate:
/usr/lib/pm-utils/sleep.d/99video hibernate hibernate: success.
Mon Nov 5 18:49:35 GMT 2012: performing hibernate
Mon Nov 5 18:49:35 GMT 2012: Awake.
Mon Nov 5 18:49:35 GMT 2012: Running hooks for thaw
Running hook /usr/lib/pm-utils/sleep.d/99video thaw hibernate:
/usr/lib/pm-utils/sleep.d/99video thaw hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/98video-quirk-db-handler thaw hibernate:
/usr/lib/pm-utils/sleep.d/98video-quirk-db-handler thaw hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/95led thaw hibernate:
/usr/lib/pm-utils/sleep.d/95led thaw hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/94cpufreq thaw hibernate:
/usr/lib/pm-utils/sleep.d/94cpufreq thaw hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/90clock thaw hibernate:
/usr/lib/pm-utils/sleep.d/90clock thaw hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/75modules thaw hibernate:
Reloaded unloaded modules.
/usr/lib/pm-utils/sleep.d/75modules thaw hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/49bluetooth thaw hibernate:
/usr/lib/pm-utils/sleep.d/49bluetooth thaw hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/01grub thaw hibernate:
/usr/lib/pm-utils/sleep.d/01grub thaw hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/00powersave thaw hibernate:
Blacklisting 01grub.
Blacklisting 90clock.
/usr/lib/pm-utils/sleep.d/00powersave thaw hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/00logging thaw hibernate:
/usr/lib/pm-utils/sleep.d/00logging thaw hibernate: success.
Mon Nov 5 18:49:36 GMT 2012: Finished.
|
Something seems to be waking the system up before it even generates a snapshot. The problem remains the fact that no error is reported, so there's no clues to follow up. What would be the obvious things to check?
Running s2disk from the console does literally nothing. Surely that's a clue? What are the obvious things like installed packages, settings or kernel options I need to double check?
I then tried kernel 'linux-3.0.17-gentoo-r2' and ... everything worked. Perfectly. First time.
So clearly there's a problem or configuration change between kernel 3.0.17 and kernel 3.5.7.
I'd really like to try and help fix this, or work out what's changed. I don't want to be stuck on kernel 3.0.17 forever. What would be the first steps towards submitting a bug upstream? |
|
Back to top |
|
|
toralf Developer
Joined: 01 Feb 2004 Posts: 3922 Location: Hamburg
|
Posted: Mon Nov 05, 2012 9:52 pm Post subject: |
|
|
And what happened for any f these commands : Code: | echo ram > /sys/power/state
echo disk > /sys/power/state
| ? |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21642
|
Posted: Tue Nov 06, 2012 2:29 am Post subject: |
|
|
According to your logs, your kernel is tainted. Does it work if you use an untainted kernel? |
|
Back to top |
|
|
creepytennis n00b
Joined: 03 Apr 2007 Posts: 37
|
Posted: Thu Nov 08, 2012 8:42 pm Post subject: |
|
|
Hi guys, sorry for the delay in getting back to you.
I untainted my kernel by blacklisting the nvidia module. No change in behaviour though.
"echo ram > /sys/power/state" produces "bash: echo: write error: Invalid argument". Because my motherboard does not support suspend to RAM.
"echo disk > /sys/power/state" shuts down the machine. However, it appears not to write a snapshot and boots as normal when next started.
So, any other suggestions? I am beginning to suspect that this aspect of Kernel 3.5.7 is just faulty. I read elsewhere that uswsusp is no longer maintained. Is that right? Maybe it's finally stopped working? Shall I raise a bug upstream? |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21642
|
Posted: Thu Nov 08, 2012 11:22 pm Post subject: |
|
|
Could you post a citation for the claim that uswsusp is unmaintained? Is your initramfs set to handle resuming a kernel-initiated hibernation? You probably can only resume from uswsusp hibernation. |
|
Back to top |
|
|
creepytennis n00b
Joined: 03 Apr 2007 Posts: 37
|
Posted: Fri Nov 09, 2012 9:51 am Post subject: |
|
|
I read that uswsusp was no longer maintained here: https://bbs.archlinux.org/viewtopic.php?id=139703 (second post).
I assume that is incorrect?
I appended a correct 'resume' parameter to my kernel and I was able to suspend to disk and resume using kernel 3.5.7 and "echo disk > /sys/power/state". Hooray! What a smart way of hibernating! Thanks loads for everybody's help.
I just have a couple of things I'd like to clean up:
1) What is the recommended way to use the 'kernel' method of hibernation (i.e. "echo disk > /sys/power/state") within a Gentoo environment? At the moment it does not work for me inside X. I assume that it would work better as part of a script, to unload modules, look after X etc. Is there a way to use the 'kernel' method of hibernation with the Gentoo 'hibernate' script?
2) It still seems to me that there has been a regression with the uswsusp method of hibernation (i.e. s2disk) between kernels 3.0.17 and 3.5.7, at least on my hardware. I would like to report this so it has a chance of getting fixed. Could anybody advise me as to the best place to file a bug? |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21642
|
Posted: Sat Nov 10, 2012 12:05 am Post subject: |
|
|
The post you cite is at least confusing. It claims that uswsusp is unmaintained, then advocates using a wrapper tool that calls uswsusp (or one of the other suspend methods). If, as it claims, uswsusp is unmaintained, using his preferred wrapper to call it will not make it work any better.
You can configure the hibernate script to use in-kernel suspension instead of running s2disk.
Can you narrow down when s2disk ceased to work for you? There were significant changes between the known good and known failed kernel versions. |
|
Back to top |
|
|
|