Most of the time when trying to perform a kernel suspend to disk,
whether by using "acpitool -S", which is my preferred method, or
by directly writing "disk" into "/sys/power/state", the suspend is
attempted, but it fails and the machine returns to state priot to
attempt...
When looking at dmesg:
[ 90.737713] Freezing user space processes ... (elapsed 0.00 seconds) done.
[ 90.752182] Freezing remaining freezable tasks ... (elapsed 0.00
seconds) done.
[ 90.766427] PM: Preallocating image memory... done (allocated 61556 pages)
[ 90.817030] PM: Allocated 246224 kbytes in 0.03 seconds (8207.46 MB/s)
[ 90.831363] Suspending console(s) (use no_console_suspend to debug)
[ 90.847537] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 90.849254] parport_pc 00:0c: disabled
[ 90.850417] serial 00:0b: disabled
[ 90.972175] ipw2100 0000:02:03.0: PCI INT A disabled
[ 92.656557] tg3 0000:02:00.0: PME# enabled
[ 92.656568] pci 0000:00:1e.0: wake-up capability enabled by ACPI
[ 92.779840] Intel ICH Modem 0000:00:1f.6: PCI INT B disabled
[ 92.792231] Intel ICH 0000:00:1f.5: PCI INT B disabled
[ 92.792380] ata_piix 0000:00:1f.1: PCI INT A disabled
[ 92.795306] ACPI: Preparing to enter system sleep state S4
[ 92.795583] PM: Saving platform NVS memory
[ 92.795672] Disabling non-boot CPUs ...
[ 92.795783] PM: Creating hibernation image:
[ 92.796017] PM: Need to copy 66237 pages
[ 92.796017] PM: Normal pages needed: 66237 + 1024, available pages: 64647
[ 92.796017] PM: Not enough free memory
[ 92.796017] PM: Error -12 creating hibernation image
[ 92.796716] ACPI: Waking up from system sleep state S4
The important part of the dmesg section above is:
[ 92.796017] PM: Need to copy 66237 pages
[ 92.796017] PM: Normal pages needed: 66237 + 1024, available pages: 64647
[ 92.796017] PM: Not enough free memory
[ 92.796017] PM: Error -12 creating hibernation image
According to the kernel, there's a need of 67261 pages, when there are
available only 64647. This is pretty weird, given that RAM size is
only 512 MB, while swap partition is 2 GB, 4 times bigger, so there should
be no issue.
This kernel suspend to disk has always worked for me on this laptop, under
debian unstable, and under other distros, like arch gnu/linux. I stopped
using debian for a while and then recently installed debian unstable again,
which came with linux-image-2.6.32-5-686, and since then it hasn't worked.
There's an exception... Prior to current version (2.6.32-17) there was one
which after which current one came after upgrade, which seemde to have fixed
the issue, but as soon as I performed an upgrade and got current one, the
issue cam back again. So there was a particular version which I'm not sure
which one it is (perhaps previous to current one) which was issue free, but
current one, and previous to that I mentioned, all exposed the same problem.
To mitigate the issue, I do "swapoff -a && swapon -a" prior to suspending to
disk, and that doesn't seem to help a bit. I've also set a swappiness of 10
(vm.swappiness=10 under /etc/sysctl.d/swappiness.conf) so that I try keeping
the swap area as unused as possible, and that hadn't helped much either.
I think the problem might be some configuration inhibiting the proper
calculation of pages... As a side note, when I was using arch, with kernel
verison from 2.6.32.* to 2.6.34.*, I didn't have any problem suspending to
disk. Also, I'm using same kernel suspend to disk on a amd64 laptop, and
on 2 non laptop old boxes, and on them the method works OK, so it might be
some configuration specific to this laptop?
-- Package-specific info:
** Version:
Linux version 2.6.32-5-686 (Debian 2.6.32-17) (ben@decadent.org.uk)
(gcc version 4.3.5 (Debian 4.3.5-1) ) #1 SMP Sun Jul 11 02:12:03 UTC
2010
Kernel: Linux 2.6.32-5-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
% uname -a
Linux m0 2.6.32-5-686 #1 SMP Sun Jul 11 02:12:03 UTC 2010 i686 GNU/Linux
Thanks,
--
Javier.
--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTikpCDFnig3HoByoH5TFdcjFpDnHShLlKiz-4Ddv@mail.gmail.com">http://lists.debian.org/AANLkTikpCDFnig3HoByoH5TFdcjFpDnHShLlKiz-4Ddv@mail.gmail.com
09-25-2010, 09:11 PM
Javier Vasquez
Bug#589558: Miscalculation of used/available pages on kernel suspend to disk (not suspending)
An additional detail is that apparently:
echo 0 > /sys/power/image_size
Makes things work... I haven't tested enough to confirm though,
neither I would know what exahustive kind of test would be required,
but from couple of trials, it seems to work. Thanks to Ben Livengood
who e-mailed me to try this...
I still don't understand why the issue given that
/sys/power/image_size controls the image size to be restored (best
effort to try to keep it as small as indicated, though if not possible
it'll be bigger). By default it's set to 500 MB... What is not clear
to me if this setting helps as it seems, is why if the size is limited
to 500 MB or a bit more, that would represent a problem given the swap
space available? Now if the logic to apply is different, like as the
RAM is 512 MB, perhaps it doesn't fit into 500 MB limit, which might
be the case, but the documentation indicates it's best effort, meaning
it can get bigger if it's not possible to make it fit, and even if a
bit bigger, then there's plenty of swap in comparison.
Any ways, with those questions at hand, then even if 500 MB is the
default value for linux, why not making it 0 the default for debian?
As I see it 0 doesn't hurt, and it's the more secure value, since it
will always tend to minimize the image sizze to be restored, which in
turns might also accelerate resume time...
Thanks,
--
Javier.
--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTi=aCth9G2mBwSJJAWNJAvjBvxZZ3Dn8fjcjJZf5@mail .gmail.com">http://lists.debian.org/AANLkTi=aCth9G2mBwSJJAWNJAvjBvxZZ3Dn8fjcjJZf5@mail .gmail.com
11-27-2011, 05:10 AM
Jonathan Nieder
Bug#589558: Miscalculation of used/available pages on kernel suspend to disk (not suspending)
tags 589558 + moreinfo
quit
Hi Javier,
Javier Vasquez wrote:
> MemTotal: 514432 kB
> SwapTotal: 2096408 kB
[...]
> [ 92.795783] PM: Creating hibernation image:
> [ 92.796017] PM: Need to copy 66237 pages
> [ 92.796017] PM: Normal pages needed: 66237 + 1024, available pages: 64647
> [ 92.796017] PM: Not enough free memory
> [ 92.796017] PM: Error -12 creating hibernation image
> [ 92.796716] ACPI: Waking up from system sleep state S4
>
> The important part of the dmesg section above is:
>
> [ 92.796017] PM: Need to copy 66237 pages
> [ 92.796017] PM: Normal pages needed: 66237 + 1024, available pages: 64647
> [ 92.796017] PM: Not enough free memory
> [ 92.796017] PM: Error -12 creating hibernation image
Yeah, that looks broken.
Does this still happen with current squeeze kernels? If so, please
try a 3.x.y kernel from unstable; the only packages from outside
squeeze that should be needed in order to do so aside from the kernel
image itself are initramfs-tools and linux-base. If it fails, we can
get help from upstream, and if it succeeds, we can try some kernels
halfway between from http://snapshot.debian.org/ to find the fix and
try applying the same patch to squeeze.
Thanks for writing, and sorry for the slow response.
Sincerely,
Jonathan
--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20111127061029.GA14516@elie.hsd1.il.comcast.net">h ttp://lists.debian.org/20111127061029.GA14516@elie.hsd1.il.comcast.net