Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
howto: get swsusp2 (hibernate, suspend to disk) working
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, ... 12, 13, 14  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
pakman
Tux's lil' helper
Tux's lil' helper


Joined: 06 Jan 2004
Posts: 100

PostPosted: Tue May 25, 2004 12:01 pm    Post subject: Reply with quote

mrfree I have to unload the alsa modules to get mine to suspend cleanly. The "fuser" program is helpful for finding out which processes are using alsa as these will stop the modules unloading. If you have swsusp stopping alsa you could do launch it from a script something like:

Code:
#!/bin/sh
#suspend.sh

#kill all processes using alsa
fuser -k /dev/sound/dsp /dev/mixer

/usr/local/sbin/hibernate

#restore volume settings
alsactl restore


Last edited by pakman on Tue May 25, 2004 8:50 pm; edited 1 time in total
Back to top
View user's profile Send private message
sveini
Tux's lil' helper
Tux's lil' helper


Joined: 31 Oct 2003
Posts: 80

PostPosted: Tue May 25, 2004 8:12 pm    Post subject: Reply with quote

bfkeats wrote:
OK, I had forgotten to format my swap. (mkswap /dev/hdaX). I found it by doing a grep suspend /var/log/messages

Whoops.


I got the same problem, I formated the swapdrive, no luck :(
_________________
Magnus frater spectat te!
Back to top
View user's profile Send private message
percking
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jul 2003
Posts: 90
Location: Terre Haute, IN

PostPosted: Tue May 25, 2004 11:44 pm    Post subject: Reply with quote

My hibernation process also resumes immediatly after starting. I do have the following in my logs though:
Code:
May 25 18:34:56 [kernel] Software Suspend 2.0.0.66: Software suspend is disabled.

I've followed the howto with the exact same kernel. Any ideas ??

percking
m&m
Back to top
View user's profile Send private message
lefteye
Tux's lil' helper
Tux's lil' helper


Joined: 07 Nov 2003
Posts: 102

PostPosted: Wed May 26, 2004 9:42 pm    Post subject: Reply with quote

Umm argh asmuch as I love configuring and whatnot I think I'll wait for a swsusp ebuild that does proper configuration. I wish I could make an ebild but I'd be clueless. I just don't feel like messing around with startup again and fubaring my system which was justreinstalled.
Back to top
View user's profile Send private message
zmedico
Developer
Developer


Joined: 02 Jan 2004
Posts: 289
Location: California USA

PostPosted: Thu May 27, 2004 2:22 am    Post subject: Reply with quote

percking wrote:
Software suspend is disabled


I think I got that behavior when I set SWSUSP_UNLOAD_MODULES_BEFORE_SUSPEND="no" in /etc/suspend.conf. Did you make any changes there?

lefteye wrote:
I just don't feel like messing around with startup again and fubaring my system which was justreinstalled.


You could do a backup with partimage or something and then it's easier to recover. Or if you're only messing with startup scripts then you could just keep a backup tarball of /etc. That's just my 2 cents. Don't mess with it if you don't feel like it. :wink:
_________________
Zac
Back to top
View user's profile Send private message
jewps
n00b
n00b


Joined: 29 Mar 2004
Posts: 74

PostPosted: Thu May 27, 2004 7:41 am    Post subject: Reply with quote

lefteye wrote:
Umm argh asmuch as I love configuring and whatnot I think I'll wait for a swsusp ebuild that does proper configuration. I wish I could make an ebild but I'd be clueless. I just don't feel like messing around with startup again and fubaring my system which was justreinstalled.


patching the kernel isn't the problem, it's does this patch work with this kernel? simple answer is yes, it seems to patch the vanilla sources quite nicely, but thats about it.
Back to top
View user's profile Send private message
isospin
n00b
n00b


Joined: 18 Feb 2004
Posts: 3

PostPosted: Sat May 29, 2004 2:37 am    Post subject: immeadiate resuming Reply with quote

percking wrote:
My hibernation process also resumes immediatly after starting. I do have the following in my logs though:
Code:
May 25 18:34:56 [kernel] Software Suspend 2.0.0.66: Software suspend is disabled.

I've followed the howto with the exact same kernel. Any ideas ??

percking
m&m


I saw this behavior on 2.6.5. as a result of my having mistakenly enabled the first software suspend option in the kernel config. Disabling the option resoved the issue. Hope this helps.
Back to top
View user's profile Send private message
Remenic
Tux's lil' helper
Tux's lil' helper


Joined: 10 May 2003
Posts: 76

PostPosted: Sun May 30, 2004 4:52 pm    Post subject: Dual Booting Reply with quote

Does the automatic unmounting of the Windows partitions work when the partition is in use (by an open konqueror, or bash prompt sitting there)? If not, that that could be a bit dangerous.

Thing is, I am dual booting between Windows and Linux. Sometimes I might forget wether I have suspended Linux or not. If I need to be in Windows, I don't feel like booting Linux first to make sure.

Is there a way to tell grub that Linux has been suspended, so it can warn me? Or does the unmounting of windows partitions work even if the partition was in use?
Back to top
View user's profile Send private message
zmedico
Developer
Developer


Joined: 02 Jan 2004
Posts: 289
Location: California USA

PostPosted: Mon May 31, 2004 1:01 am    Post subject: Re: Dual Booting Reply with quote

Remenic wrote:
Does the automatic unmounting of the Windows partitions work when the partition is in use (by an open konqueror, or bash prompt sitting there)? If not, that that could be a bit dangerous.


A busy device can not be umounted. All processes accessing a device could be killed with something like "fuser -k -m /dev/hda1". Also, the hibernate script with the "--kill" parameter will do this for you (kill all processes accessing file systems specified in the SWSUSP_UMOUNTS variable of /etc/suspend.conf). For exact details, have a look at the UmountDevices() function in the hibernate script.
_________________
Zac
Back to top
View user's profile Send private message
ankit
n00b
n00b


Joined: 18 Nov 2003
Posts: 6
Location: Evanston, IL

PostPosted: Mon May 31, 2004 5:54 am    Post subject: Reply with quote

Got this to work on my dell 600m. Using the DRI X11 drivers. Couple of problems so far:

- Though I seem to get 3d acceleration upon resume, it is about half the normal speed (glxgears gives 1200fps as opposed to 2000 fps)

- The dreaded ATI hangups start to occur upon resume (the laptop works perfectly before hibernate with the DRI driver).

Anyways, atleast I have something now. Cant wait for ACPI sleep modes to work...
Back to top
View user's profile Send private message
Nuuul
n00b
n00b


Joined: 05 Mar 2004
Posts: 11
Location: The Netherlands

PostPosted: Mon May 31, 2004 3:11 pm    Post subject: Reply with quote

Hibernating works like a charm here :), on my good ol' Tecra 8000

I also patched my kernel yesterday manually with the source from here: http://prdownloads.sourceforge.net/swsusp/software-suspend-2.0.0.81-for-2.6.6.tar.bz2?download
Applied the bootsplash patch, looks nice.
I've also got the same problem with alsa: have to reload the modules, or else sound doesn't work well after resuming.

Now I'm looking for a way to get speechd to say that it's suspending and resuming....
[edit] Ow, don't patch the kernel (2.6.6 in my case), with the 2.6.6 acpi patch. It will give errors and stop during kernel compiling after the swsusp patch applied.
Also got a question: Does anyone know how to configure swsusp, that it will suspend after x period of time? Not every 10 mins or so, but based on idle calls/no keyboard input?[/edit]
Back to top
View user's profile Send private message
camillo
n00b
n00b


Joined: 30 Sep 2003
Posts: 45
Location: Torino, Italy

PostPosted: Mon May 31, 2004 9:54 pm    Post subject: Reply with quote

I have just installed swsusp 2 on a 2.6.6 kernel and all work fine except a litte problem with audio.
But i didn't have understand one thing:

tuxlover wrote:


Mounted hdd partitions:
If you partitions that you would like to access while your linux system has been swsusp'ed (like a windows partition), swsusp should umount them before, and mount them again after a suspend:
Code:
SWSUSP_UMOUNTS="/mnt/c"
SWSUSP_REMOUNTS="/mnt/c"

Otherwise you will easily corrupt the data on that device!

I have my home partition on hda6 and the root on hda5.
My question is: I MUST unmount my home partition before suspending the system? If yes how can I do that?I think is impossible....
Tanks Camillo
Back to top
View user's profile Send private message
zmedico
Developer
Developer


Joined: 02 Jan 2004
Posts: 289
Location: California USA

PostPosted: Mon May 31, 2004 11:35 pm    Post subject: Reply with quote

Quote:
If you partitions that you would like to access while your linux system has been swsusp'ed (like a windows partition)

Your home partition and root partion should not fall into this category. They should remain mounted in the suspended state. While these partitions are in the suspended state, don't boot into some other OS and try to mount them because that would ruin their suspended state.

If you have a windows root partition that's mounted in linux then it's a good idea to unmount it before you suspend so that you can boot into windows while linux is suspended.
_________________
Zac
Back to top
View user's profile Send private message
dyqik
Tux's lil' helper
Tux's lil' helper


Joined: 08 May 2003
Posts: 120
Location: Oxford, UK

PostPosted: Tue Jun 01, 2004 9:45 pm    Post subject: Reply with quote

I've got ACPI and suspend working on my Vaio V505DP. As long as X isn't running, I can suspend and resume fine (as long as I don't try to restart either of the network interfaces for hysterical reasons). If X is running I get a corrupted screen and the system hangs.

My Vaio is a centrino, with a Radeon Mobility 9200 using the Ati binary drivers. Kernel is 2.6.5, and I'm using Xorg.

Has anyone get any idea what to try?
Back to top
View user's profile Send private message
frenkel
Veteran
Veteran


Joined: 13 May 2003
Posts: 1034
Location: .nl

PostPosted: Wed Jun 02, 2004 4:48 pm    Post subject: Reply with quote

It's working great! Thanks!

To get alsa sound working:
Compile all alsa drivers (including things like sound_core) as modules and add the following to /etc/suspend.conf:
Quote:

SWSUSP_RESTART_SERVICES="hotplug alsasound"


Reboot and enjoy hibernate and wake-up WITH sound :D

Greets,
Frank
_________________
http://techfield.org
Back to top
View user's profile Send private message
|T5|
n00b
n00b


Joined: 13 Dec 2003
Posts: 33

PostPosted: Fri Jun 04, 2004 4:29 pm    Post subject: Reply with quote

Quote:
If X is running I get a corrupted screen and the system hangs.


This seems to be an issue of the binary ATI drivers. As I posted to the swsusp list and did not get any answer, there doenst seem to be any solution yet
Back to top
View user's profile Send private message
b0fh
Guru
Guru


Joined: 16 Jun 2003
Posts: 426

PostPosted: Fri Jun 04, 2004 5:21 pm    Post subject: Reply with quote

I patched and compiled swsusp2 with 2.6.6 and it seems to be loaded fine:
Code:
Software Suspend 2.0.0.81: Swap space signature found.
Software Suspend 2.0.0.81: Suspending enabled.
Software Suspend 2.0.0.81: Checking for image...
Software Suspend 2.0.0.81: Detected the signature of an alternate implementation.


But when I call the hibernate script (stopped xdm before), it does something, but returns directly telling this in log:
Code:
Software Suspend 2.0.0.81: Initiating a software_suspend cycle.
CPU 0 Zone DMA PCP 0 count is now 0.
CPU 0 Zone DMA PCP 1 count is now 0.
CPU 0 Zone Normal PCP 0 count is now 0.
CPU 0 Zone Normal PCP 1 count is now 0.
CPU 0 Zone HighMem PCP 0 count is now 0.
CPU 0 Zone HighMem PCP 1 count is now 0.
You need some storage available to be able to suspend.
Please include the following information in bug reports:
- SWSUSP core    : 2.0.0.81
- Kernel Version : 2.6.6
- Version spec.  : 2.0.1
- Compiler vers. : 3.3
- Modules loaded : ipt_state ip_conntrack iptable_filter ip_tables nls_iso8859_1
- Attempt number : 1
- Parameters     : 5 0 0 32
- Limits         : 98160 pages RAM. Initial boot: 95209.
- Overall expected compression percentage: 0.
- Swapwriter active.
  Swap available for image: 0.
- LZF Compressor enabled.
pdflush: bogus wakeup!


What might be the reason for failing?
Ok, I've got 384MB RAM and the swap-partition has just 216MB, but I read it should work with smaller swap if memory isn't full...
Back to top
View user's profile Send private message
Earthwings
Administrator
Administrator


Joined: 14 Apr 2003
Posts: 7751
Location: Karlsruhe, Germany

PostPosted: Fri Jun 04, 2004 5:39 pm    Post subject: Reply with quote

Quote:

Ok, I've got 384MB RAM and the swap-partition has just 216MB, but I read it should work with smaller swap if memory isn't full...

The last time I read the docs it stated it wouldn't hibernate if swap < RAM. While compression could make it fit in the swap space, the script doesn't know about the size of the compressed RAM image and therefore exits for safety. Expand your swap.
Back to top
View user's profile Send private message
b0fh
Guru
Guru


Joined: 16 Jun 2003
Posts: 426

PostPosted: Fri Jun 04, 2004 6:43 pm    Post subject: Reply with quote

Quote:
The last time I read the docs it stated it wouldn't hibernate if swap < RAM


Ok, I'll try increasing my swap... Is there anything I can do againt trashed consoles (X looks fine) when using suspend-to-ram on my thinkpad t23? Had this with swsusp and swsusp 2...
Back to top
View user's profile Send private message
sburnett
Tux's lil' helper
Tux's lil' helper


Joined: 10 Jun 2002
Posts: 79
Location: USA

PostPosted: Sat Jun 05, 2004 1:14 pm    Post subject: Reply with quote

Hello,

I'm trying to get this to work on my desktop machine (an nforce board). It works much better than swsusp1, which didn't even attempt to hibernate the machine at all. With swsusp2, it makes it through the first few stages of saving, but freezes about 3/4 of the way through "Saving disk cache." I have about a gig of swap (vs 512 of RAM), so I don't think its a space issue. Has anyone else had this problem or a solution?
Back to top
View user's profile Send private message
b0fh
Guru
Guru


Joined: 16 Jun 2003
Posts: 426

PostPosted: Sat Jun 05, 2004 1:43 pm    Post subject: Reply with quote

Quote:
The amount of memory needed depends on a lot of things. For the average user, sizeof(RAM)x2 is ample for the swap partition used by swsusp.


Uh, do I really need that much space to suspend?
Back to top
View user's profile Send private message
tuxlover
Apprentice
Apprentice


Joined: 21 Oct 2003
Posts: 297
Location: weltweit

PostPosted: Sat Jun 05, 2004 2:46 pm    Post subject: Reply with quote

Hi,

After coming back to this thread after weeks I made some (alsasound, modules, new kernel patching with 1 kernel patch) updates to the howto. This means that I still do maintain this howto, so please keep coming forward with ideas :)

I just tried swsusp2-0.82 on vanilla 2.6.6. It works fine so far, only that the patch seemed to be broken at the end ("unexpected end of patch" or similar). But that was only bootsplash, which I don't use, so I didn't care.

lefteye wrote:
Umm argh asmuch as I love configuring and whatnot I think I'll wait for a swsusp ebuild that does proper configuration.


In my opinion the only thing the ebuild could do would be to patch the kernel, which is quite easy (as of today, it's just 1 patch, not 3 anymore). I think individual confurations are too different to be taken care of by portage (modules, mounted/used partitions, etc.)

A question regarding this: Why is the swsusp2-patch not in the gentoo patchset? That would be great.
Back to top
View user's profile Send private message
Earthwings
Administrator
Administrator


Joined: 14 Apr 2003
Posts: 7751
Location: Karlsruhe, Germany

PostPosted: Sat Jun 05, 2004 3:57 pm    Post subject: Reply with quote

tuxlover wrote:

lefteye wrote:
Umm argh asmuch as I love configuring and whatnot I think I'll wait for a swsusp ebuild that does proper configuration.


In my opinion the only thing the ebuild could do would be to patch the kernel, which is quite easy (as of today, it's just 1 patch, not 3 anymore).

It's not really that easy, see the bootsplash ebuild, but doable.

Quote:

I think individual confurations are too different to be taken care of by portage (modules, mounted/used partitions, etc.)

Indeed ebuilds normally only do a basic setup, so waiting for an ebuild doesn't really solve the problem that you've got to configure your system.

Quote:

A question regarding this: Why is the swsusp2-patch not in the gentoo patchset? That would be great.

I filed these bug reports some time ago - no progress yet :?
http://bugs.gentoo.org/show_bug.cgi?id=51696
http://bugs.gentoo.org/show_bug.cgi?id=52019
But today is bugday, maybe someone wants to nag a dev on irc about it :wink:
Back to top
View user's profile Send private message
sburnett
Tux's lil' helper
Tux's lil' helper


Joined: 10 Jun 2002
Posts: 79
Location: USA

PostPosted: Sat Jun 05, 2004 6:05 pm    Post subject: Reply with quote

Hate to reply to my own post, but I tried suspending again and it freezes when "writing caches." There is nothing about disk caches in there as I had originally said. I've tried recompiling the kernel numerous times to no avail.

Any ideas?

sburnett wrote:

I'm trying to get this to work on my desktop machine (an nforce board). It works much better than swsusp1, which didn't even attempt to hibernate the machine at all. With swsusp2, it makes it through the first few stages of saving, but freezes about 3/4 of the way through "Saving disk cache." I have about a gig of swap (vs 512 of RAM), so I don't think its a space issue. Has anyone else had this problem or a solution?
Back to top
View user's profile Send private message
Earthwings
Administrator
Administrator


Joined: 14 Apr 2003
Posts: 7751
Location: Karlsruhe, Germany

PostPosted: Sat Jun 05, 2004 6:34 pm    Post subject: Reply with quote

There's an option to turn on debugging. Did you try it to get some more useful output?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3, ... 12, 13, 14  Next
Page 2 of 14

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum