Re: Suspend to disk

Mark Taylor <[email protected]>
Newsgroups gmane.linux.hardware.sony
Message-ID <[email protected]>
> 
> On Sun, 29 Jun 2003 [email protected] wrote:
> > I've recently got it to work somewhat reliably on a Z1A,
> > using the 2.4.21-rc4-laptop1 (from linux kernel for laptops)
> > kernel.  
> 
> Why do you say "somewhat reliably"?  What are the symptoms of the
> failures?  How often does it fail?
> 

Without shutting down those rc.d services, it was very unreliable:
about 50% of the time it would "wakeup" from suspend, but
then crash soon after.

With that suspend script, it has worked correctly 100% of the time, but
that's only over a few days of use, so maybe 6-8 "resumes".  I haven't
been using the laptop for any real work yet.  I'm worried that I will
soon discover an application that loads a module that cannot survive
being suspended/resumed.

I've found that sound (i810_audio) module has to be unloaded
and reloaded before it will work after a suspend/resume cycle.  
I'd like to do that in my script, except that "rmmod i810_audio"
fails unless I first kill any application that may be using
sound (such as gnome-volume-control). Any ideas on this?

> 
> > I had to add: "resume=/dev/hda6"
> > as a boot option to the kernel, and /dev/hda6 is my swap partition
> > which is 50% larger than total RAM.  
> 
> Was this a requirement of the swsuspend stuff or are you just reporting
> your configuration?  My GRX570 has 512MB of ram in it, but I usually run
> it without paging space.  If I decide to run VMware, then I enable a
> filesystem-based paging space prior to VMware and turn it off afterward.
> I hate having partitions reserved for something I never use. :-)
> 
> I'm betting that I can't use filesystem-based paging space, either. :-(

You need swap space about 150% of RAM, and there are some restrictions
as to what type it can be, but I dont remember what they are.  I also
didn't have a swap partition since I also didn't think it was necessary
with 512MB - I had to create one with paritition magic.


> 
> > I run this script (probably RH9 specific) to put it to sleep:
> > 
> >   umount /proc/bus/usb
> >   /etc/init.d/network stop
> >   /etc/init.d/pcmcia stop
> >   /etc/init.d/xinetd stop
> >   rmmod ehci-hcd
> >   rmmod usb-uhci
> >   echo -n 4 > /proc/acpi/sleep
> 
> It probably doesn't matter because you're just killing the daemons, but it
> would probably be best to shut down the daemons in the reverse of the
> order they were started in.  So you'd be better off with a different
> order:
> 
>     xinetd
>     pcmcia
>     network
> 
> > and this script after a sucessfull resume:
> > 
> > /etc/init.d/network start
> > /etc/init.d/pcmcia start   
> > /etc/init.d/xinetd start
> > hwclock --hctosys
> > 
Thanks - that does seem like a good principal to follow.

Mark
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.