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

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.

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. _________________Zac

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.

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

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]

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

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

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.

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.

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?

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.

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?