Bug 66041 - 2 attempts needed to hibernate
Summary: 2 attempts needed to hibernate
Status: CLOSED DUPLICATE of bug 47931
Alias: None
Product: Power Management
Classification: Unclassified
Component: Hibernation/Suspend (show other bugs)
Hardware: x86-64 Linux
: P1 normal
Assignee: Rafael J. Wysocki
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-28 07:32 UTC by Eric Lan
Modified: 2014-10-28 05:06 UTC (History)
4 users (show)

See Also:
Kernel Version: 3.10-2
Subsystem:
Regression: No
Bisected commit-id:


Attachments
dmesg after failed "s2disk" (92.57 KB, text/plain)
2013-12-15 17:37 UTC, Eric Lan
Details

Description Eric Lan 2013-11-28 07:32:49 UTC
I am using linux mint debian edition (LMDE). If I hibernate the system shortly after logging in, it might succeed. After some operations, it takes two times of attempts of s2disk to hibernate successfully.

$ dmesg
[142528.245031] PM: Creating hibernation image:
[142528.248008] PM: Need to copy 530249 pages
[142528.248008] PM: Normal pages needed: 530249 + 1024, available pages: 518040
[142528.248008] PM: Not enough free memory
[142528.248008] PM: Error -12 creating hibernation image
[142528.248008] CPU0: Thermal monitoring handled by SMI
[142528.248008] Enabling non-boot CPUs ...
[142528.248008] smpboot: Booting Node 0 Processor 1 APIC 0x1
[142528.144009] CPU1: Thermal monitoring handled by SMI
[142528.256966] CPU1 is up
[142528.261997] ACPI: Waking up from system sleep state S4

Supposedly, the free space in the swap may not be adequate. I then swapped off and then on to clean up the swap space to make all swap space available, which is confirmed by "free -h" command.

Then, s2disk still needs 2 attempts to hibernate successfully.
Comment 1 Lan Tianyu 2013-11-28 07:52:46 UTC
Could you try the latest upstream kernel v3.13-rc1?
Comment 2 Eric Lan 2013-11-29 03:06:29 UTC
Is there easier way to help you debug this ? The linux environment is a production system for me and I don't want to risk damaging it by upgrading to a release-candidate kernel.
Comment 3 Lan Tianyu 2013-11-29 03:27:24 UTC
You can't upgrade kernel? So how can you test a fix patch?

So far, I know a fix about hibernation swap allocation fix in the v3.13. This may fix the issue.

http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=fd432b9f8c7c88428a4635b9f5a9c6e174df6e36
Comment 4 Eric Lan 2013-11-29 08:15:46 UTC
Because I had only 4G RAM and I used 64-bit LMDE, that might not fix it.

I am not familiar with the procedure. I found the most forefront Debian sid used the kernel 3.11-2, still lesser than v3.13. So it would involve re-compile and re-configure the kernel by myself right ?
Comment 5 Lan Tianyu 2013-12-02 08:35:58 UTC
(In reply to Eric Lan from comment #4)
> Because I had only 4G RAM and I used 64-bit LMDE, that might not fix it.
> 
> I am not familiar with the procedure. I found the most forefront Debian sid
> used the kernel 3.11-2, still lesser than v3.13. So it would involve
> re-compile and re-configure the kernel by myself right ?

Yes, you can follow this link to rebuild kernel.
http://kernelnewbies.org/KernelBuild
Comment 6 Aaron Lu 2013-12-11 07:20:33 UTC
It doesn't have anything to do with swap, it may be that we didn't preallocate/free enough memory during the start of hibernation. Please attach full dmesg after a failed hibernation.
Comment 7 Eric Lan 2013-12-15 17:37:47 UTC
Created attachment 118501 [details]
dmesg after failed "s2disk"

dmesg after failed "s2disk" (the first time)
Comment 8 Zhang Rui 2014-06-03 05:58:41 UTC

*** This bug has been marked as a duplicate of bug 47931 ***

Note You need to log in before you can comment on or make changes to this bug.