[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How do I suspend to disk



On Fri, 2005-03-04 at 17:51 +0000, Francois Taiani wrote:
> Hi Wee-Jin,
> 
> Just as an add-on to what Djoume has just written, you can also use the 
> hibernate script:
> 
> http://packages.debian.org/testing/utils/hibernate
> 
> Although is says it only supports Software Suspend 2, it works with 
> suspend-to-disk too [you have to modify the config file though]. It 
> provides a nice way to tailor the script to your requirements (stopping 
> sound appications, taking care of mounted network share, ect.).
> 
> Kind regards
> 
> Francois
> 
> Djoume SALVETTI wrote:
> > Le vendredi 03/04/05 Wee-Jin Goh <wjgoh@brookes.ac.uk> a écrit :
> > 
> >>If anyone is able to post or point out some relevant information on
> >>getting suspend to disk working on the Powerbook 12", I'd be grateful.
> > 
> > 
> > 1) patch your kernel with Guido Guenther swsusp patch :
> > http://honk.physik.uni-konstanz.de/~agx/linux-ppc/kernel/
> > 
> > 2) Reboot
> > 
> > 3) Change your yaboot.conf to add resume=your_swap_partition kernel
> > parameter (don't forget ybin after)
> > 
> > 4) Then you can suspend with the following script :
> > 
> > #!/bin/sh
> > rmmod ohci1394
> > rmmod eth1394
> > rmmod ieee1394
> > rmmod hci_usb
> > /etc/init.d/hotplug stop
> > echo disk > /sys/power/state
> > 
> > 5) After resume you can do something like :
> > 
> > #!/bin/sh
> > modprobe ohci1394
> > modprobe eth1394
> > modprobe ieee1394
> > modprobe hci_usb
> > /etc/init.d/hotplug start
> > /etc/init.d/laptop-net restart
> > sleep 2
> > /etc/init.d/ntpdate restart
> > 
> > 
> > Regards.
> 
> 

Here is what happens when I try to patch the kernel. I used the
--dry-run option so that no files would be modified. Below is the
output. As you can see, there are a few errors. maybe we need a new
patch?

Regards,
Wee-Jin
------------------------------------------------
debian:/usr/src/linux# patch -p1 --dry-run
< /home/pgoh/Downloads/swsusp-2.6.10-rc2.diff
patching file arch/ppc/Kconfig
Hunk #1 succeeded at 1046 (offset 80 lines).
patching file arch/ppc/kernel/Makefile
Hunk #1 succeeded at 16 with fuzz 2.
patching file arch/ppc/kernel/signal.c
Hunk #2 succeeded at 705 (offset 90 lines).
Hunk #3 succeeded at 735 (offset 90 lines).
patching file arch/ppc/kernel/swsusp.S
patching file arch/ppc/kernel/vmlinux.lds.S
patching file arch/ppc/platforms/pmac_setup.c
patching file drivers/ide/ppc/pmac.c
patching file drivers/macintosh/Kconfig
patching file drivers/macintosh/mediabay.c
Reversed (or previously applied) patch detected!  Assume -R? [n] n
Apply anyway? [n] y
Hunk #1 FAILED at 714.
Hunk #2 FAILED at 729.
2 out of 2 hunks FAILED -- saving rejects to file
drivers/macintosh/mediabay.c.rej
patching file drivers/macintosh/therm_pm72.c
Hunk #2 succeeded at 1319 (offset -1 lines).
patching file drivers/macintosh/via-pmu.c
Hunk #1 succeeded at 43 with fuzz 1.
Hunk #4 succeeded at 3040 (offset -8 lines).
patching file drivers/video/aty/radeon_pm.c
Hunk #1 FAILED at 861.
1 out of 1 hunk FAILED -- saving rejects to file
drivers/video/aty/radeon_pm.c.rej
patching file include/asm-ppc/suspend.h
patching file include/linux/reboot.h
patching file include/linux/suspend.h
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file
include/linux/suspend.h.rej
patching file kernel/power/disk.c
Hunk #2 FAILED at 49.
1 out of 2 hunks FAILED -- saving rejects to file
kernel/power/disk.c.rej
patching file kernel/power/main.c
Reversed (or previously applied) patch detected!  Assume -R? [n] n
Apply anyway? [n] y
Hunk #1 FAILED at 4.
1 out of 1 hunk FAILED -- saving rejects to file kernel/power/main.c.rej
patching file kernel/power/swsusp.c
Hunk #1 FAILED at 861.
Hunk #2 FAILED at 882.
Hunk #3 FAILED at 898.
Hunk #4 FAILED at 1188.
Hunk #5 FAILED at 1218.
Hunk #6 FAILED at 1242.
6 out of 6 hunks FAILED -- saving rejects to file
kernel/power/swsusp.c.rej
patching file kernel/sys.c
Hunk #1 FAILED at 87.
1 out of 1 hunk FAILED -- saving rejects to file kernel/sys.c.rej
--------------------------------------------------------------------



Reply to: