[ltp] Supend-To-Disk with Kernel 2.6.8.1 and ACPI-Patch- append resume

Niels Stargardt linux-thinkpad@linux-thinkpad.org
Mon, 18 Oct 2004 11:40:18 +0200


Hi Ronald,
just a few minutes before this email reached me, with a delay of 2 days. Looks like it hangs in the list. Anyway.

On Sat, 16 Oct 2004 13:47:55 +0200
Ronald Hitz <Ronald.Hitz@ivx.de> wrote:

> Hi Niels,
> 
> I try to answer some of Your questions:
> 
> I have an IBM Thinkpad R40 (Centrino) 2722 5MG, 512 MB Ram
> I'm using Debian sarge (snapshot from 2004-05-21) ./unstable

That's great so we have nearly exactly the same configuration!

> I'm starting to make the ACPI running. I used Kernel 2.6.8.1 with
> the ACPI-Patch acpi-20040715-26-stable-release.diff.bz2 and compile
> all power-management-features directly into the kernel.=20
>
> First some information to the swap partition: /dev/hda2; size: 500
> MB(so not large enough, because in former times I didn't know how
> much it has= to be for hibernation), it's an primary partition.

>From Swsusp2 I have the Information "The swap partition on your disk should be at least 30% larger than your RAM." So this is the reason why  I choose 750MB, because I'm planning to give me notebook 512 MB RAM as you have. But the size depends on the number of application you running and of the compression you use. But to be on the sure side I would recommend 1,5 of RAM. 
Today my SWAP-Partition is an primary partition too (dev/hda4).

> 
>  Second information about the boot-sequence: I running
>  WinXP-Proffesional
>  on hda1 and using grub.=20

Do you start both WinXP and Linux from grub or do you start grub from the WinXP-Bootmanager. I'm nearly sure that this shouldn't make any differences, but just to get a clean start for analysis.


 
>  This is what I tried:
>  I compiled a kernel with suspend-to-disk support, setting Default
>  Resume
>  Partition to /dev/hda2.
> 
>  I set computer into "suspend to disk" mode by
> 
>  echo -4  > /proc/acpi/sleep; #SuspendToDisk
>  on the root console by switching from X with Strg-Alt-F1 to
>  console.
> 
>  Every thing looks fine I got no error messages, the computer switch
>  off.
>  Than I try to restart the computer. I got no error-message too, but
>  the computer starts the same way as before, ignoring the
>  stored-memory-data completely. After this I had to format my
>  Swap-Partition and "swapon" it.
>  because there was just a swap-Partition in the /etc/fstab, but it
>  couldn't be uesd.
> 
>  I tried than to set some boot-parameters resume=3D/dev/hda2 in the
>  grub-boot prompt, where You edit boot parameters. in the line
>  beginning with "kernel"
> 
>  kernel.

And does it work or does it fails too?

>  __________________________
> acpi-20040715-2.6.8.diff
>  >Than I tried to patch the kernel with the swsusp2-patches
>  >software-suspend-2.0.0.109-for-2.6.8.1. I patch the kernel with
>  >
>  ><for patchfile in ../software-suspend-2.0.0.109-for-2.6.8.1/*; do
>  >patch>-p1 < $patchfile; done
> 
>  >Unfortunately the kernel has than compile errors at suspend.c :-(
> 
>  I experiened the same, then compiled software -suspend first,
>  2.0.0.105 for-2.6.8.1-rev1, then software-suspend-core
>  and then (!) acpi-patch-20040715-26-stable. that compiled clean
>  yesterday.

OK then I must see to get the version  "2.0.0.105 for-2.6.8.1-rev1" and "acpi-patch-20040715-26-stable" if it is not the same like "acpi-20040715-2.6.8.diff". But what do you mean you compiled software -suspend first then core and then acpi. Do you mean you patch the kernel in this order?

>  I switch off kernel option suspend-to-disk-support and tried only
>  software-suspend2, which occurs now in kernel options.
>  I compiled in the main things directly into kernel, because as
>  module I would have to use the initrd and I don't know how.
If you want to know how you could do this I found it out.

>  I added the resume=3D/dev/hda2 option in grub boot menu as before,
>  but with suspend2 this is obligatory( I'm not sure about that)

I think if you use software-suspend2 you must use resume2=/dev/hda2, but I think it is obligatory.

> 
>  ___________
> 
> 
> 
>  At last I tried to compile the kernel with Software-Suspend. If I
>  set the computer with
> 
>  echo 4 > /proc/acpi/sleep
> 
>  it starts stopping programs, and a new line in the middle of screen
>  appears for writing the whole blabla to disk.

>  What kind of infos do You need ?

As you can see there are some little question, but for the moment I think I should try your hints first using your config.

> 
>  I include my kernel config when I had patched with acpi and
>  software suspend to disk.
> 
>  You can write in German if You like
Well I thinks it's nicer to do it over the mailing list because than everybody can use it in the future.
 
>  kind regards
> 
>  Ronald Hitz

Hope that you will get a success story from me in a short while.
Bye Niels