[Hardy] kernel 2.6.24 - hibernation problem with 4GB RAM

Bug #206997 reported by freak007
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Medium
Unassigned
Hardy
Fix Released
Medium
Stefan Bader
Intrepid
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: linux-image-2.6.24-12-generic

Description: Ubuntu hardy (development branch)
Release: 8.04

Package:
linux-image-2.6.24-12-generic:
  Installé : 2.6.24-12.22
  Candidat : 2.6.24-12.22
 Table de version :
 *** 2.6.24-12.22 0
        500 http://archive.ubuntu.com hardy/main Packages
        100 /var/lib/dpkg/status

There is a problem with hibernation where there is 4GB of RAM on my laptop.

Everything works fine with 2 GB.

Of course suspend to ram works like a charm with 2GB and 4GB of RAM

I think it's a kernel ' specific problem, because i have the same problem on my desktop computer.

In the changelog of kernel 2.6.25-rc7 at kernel.org i found this comment:

commit 2050d45d7c32cbad7a070d04256237144a0920db
Author: Pavel Machek <email address hidden>
Date: Thu Mar 13 23:05:41 2008 +0100

    x86: fix long standing bug with usb after hibernation with 4GB ram

    aperture_64.c takes a piece of memory and makes it into iommu
    window... but such window may not be saved by swsusp -- that leads to
    oops during hibernation.

    Signed-off-by: Pavel Machek <email address hidden>
    Acked-by: "Rafael J. Wysocki" <email address hidden>
    Signed-off-by: Ingo Molnar <email address hidden>
    Signed-off-by: Thomas Gleixner <email address hidden>

And in 2.6.25-rc1:

commit 5d38998ed15b31f524bde9a193d60150af30d916
Author: Rene Herman <email address hidden>
Date: Wed Feb 6 01:40:05 2008 -0800

    PNP: do not test PNP_DRIVER_RES_DO_NOT_CHANGE on suspend/resume

    The PNP_DRIVER_RES_DO_NOT_CHANGE flag is meant to signify that the PNP core
    should not change resources for the device -- not that it shouldn't
    disable/enable the device on suspend/resume.

    ALSA ISAPnP drivers set PNP_DRIVER_RES_DO_NOT_CHANAGE (0x0001) through
    setting PNP_DRIVER_RES_DISABLE (0x0003). The latter including the former
    may in itself be considered rather unexpected but doesn't change that
    suspend/resume wouldn't seem to have any business testing the flag.

    As reported by Ondrej Zary for snd-cs4236, ALSA driven ISAPnP cards don't
    survive swsusp hibernation with the resume skipping setting the resources
    due to testing the flag -- the same test in the suspend path isn't enough
    to keep hibernation from disabling the card it seems.

    These tests were added (in 2005) by Piere Ossman in commit
    68094e3251a664ee1389fcf179497237cbf78331, "alsa: Improved PnP suspend
    support" who doesn't remember why. This deletes them.

    Signed-off-by: Rene Herman <email address hidden>
    Tested-by: Ondrej Zary <email address hidden>
    Cc: Bjorn Helgaas <email address hidden>
    Cc: Pierre Ossman <email address hidden>
    Cc: Adam Belay <email address hidden>
    Signed-off-by: Andrew Morton <email address hidden>
    Signed-off-by: Linus Torvalds <email address hidden>

commit a6eb84bc1e069e1d285167e09035ed6c27978feb
Author: Rafael J. Wysocki <email address hidden>
Date: Fri Feb 1 15:28:16 2008 +0100

    suspend: cleanup reference to swsusp_pg_dir[]

    swsusp_pg_dir[] is used for suspend, but not for hibernation.
    clean-up the ifdefs which worked by accident, while implying the opposite.
    Delete the __nosavedata, which also implied the opposite.

    Some day we may optimize CONFIG_ACPI_SLEEP to build minimal kernels
    for just hibernate or just suspend but not both,
    but today isn't that day.

    Signed-off-by: Rafael J. Wysocki <email address hidden>
    Signed-off-by: Len Brown <email address hidden>

Revision history for this message
freak007 (freak-linux4freak) wrote :
Revision history for this message
freak007 (freak-linux4freak) wrote :
Revision history for this message
freak007 (freak-linux4freak) wrote :
Revision history for this message
freak007 (freak-linux4freak) wrote :
Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Hi freak007,

Just curious if you have tested the upstream patches you've referenced and if they resolve your issue? We're currently at Beta Freeze for Hardy so only critical bug fixes or extremely simple patches will be pulled into the Hardy kernel. Even so, it's preferred that any changes that go in at this point are also well tested. I'm guessing we'll likely have to retarget this report for the Intrepid Ibex release. Thanks.

Changed in linux:
status: New → Incomplete
Revision history for this message
freak007 (freak-linux4freak) wrote :

I have just downloaded and installed this version of kernel package:

http://kernel-archive.buildserver.net/debian-kernel/pool/main/l/linux-2.6/linux-2.6_2.6.25~rc6-1~experimental.1~snapshot.10965

and suspend to disk works fine !!!!

I think it's related to swsusp_pg_dir[] with __nosavedata from 2.6.25-rc1, but I'm not sure.

Revision history for this message
freak007 (freak-linux4freak) wrote :

I also tried 2.6.25-rc5 from http://kernel-archive.buildserver.net/debian-kernel/ and the problem is present.

Changes between 2.6.25-rc5 and 2.6.25-rc6 solve the problem.

The changelog of 2.6.25-rc6 talks about the problem with the nosavepage:

commit a82f7119fd940c1505fc9fdf93d835fa52bc075d
Author: Rafael J. Wysocki <email address hidden>
Date: Wed Mar 12 00:34:57 2008 +0100

    Hibernation: Fix mark_nosave_pages()

    There is a problem in the hibernation code that triggers on some NUMA
    systems on which pfn_valid() returns 'true' for some PFNs that don't
    belong to any zone. Namely, there is a BUG_ON() in
    memory_bm_find_bit() that triggers for PFNs not belonging to any
    zone and passing the pfn_valid() test. On the affected systems it
    triggers when we mark PFNs reported by the platform as not saveable,
    because the PFNs in question belong to a region mapped directly using
    iorepam() (i.e. the ACPI data area) and they pass the pfn_valid()
    test.

    Modify memory_bm_find_bit() so that it returns an error if given PFN
    doesn't belong to any zone instead of crashing the kernel and ignore
    the result returned by it in mark_nosave_pages(), while marking the
    "nosave" memory regions.

    This doesn't affect the hibernation functionality, as we won't touch
    the PFNs in question anyway.

    http://bugzilla.kernel.org/show_bug.cgi?id=9966 .

    Signed-off-by: Rafael J. Wysocki <email address hidden>
    Signed-off-by: Len Brown <email address hidden>

I'm unable to know if it's just specific or if lots of changes in the kernel resolve the problem.

Revision history for this message
freak007 (freak-linux4freak) wrote :

I have tested the patch from http://bugzilla.kernel.org/show_bug.cgi?id=9966 and the problem still persist.

At this time I have no idea how to identify exactly the bug.

Revision history for this message
freak007 (freak-linux4freak) wrote :

I have found the problem: it's related to:

arch/x86/kernel/aperture_64.c

I use aperture_64.c from kernel 2.6.25-rc7 and remove only one line ( line 296: update_e820();) and recompile the kernel with debian/rules.

Now everything works fine.

But I have not enough time to produce a proper patch. Maybe another person ?

Changed in linux:
assignee: nobody → ubuntu-kernel-team
importance: Undecided → Medium
milestone: none → later
status: Incomplete → Triaged
Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Hi freak007,

Care to test the Intrepid Ibex 8.10 kernel which is currently being pulled together. It was most recently sync'd with the upstream 2.6.25 kernel. It is currently available in the following PPA:

https://edge.launchpad.net/~kernel-ppa/+archive

If you are not familiar with how to install packages from a PPA basically do the following:

Create the file /etc/apt/sources.list.d/kernel-ppa.list to include the lines:

deb http://ppa.launchpad.net/kernel-ppa/ubuntu hardy main
deb-src http://ppa.launchpad.net/kernel-ppa/ubuntu hardy main

sudo apt-get update

You should then be able to install the linux-image-2.6.25 kernel package. Please let us know your results. Thanks.

Changed in linux:
status: Triaged → Incomplete
Revision history for this message
freak007 (freak-linux4freak) wrote :

I have installed form Debian sidux.com 2.6.25 kernel-packages four days ago.

All works fine. I will test your packages from this repository this night and I'm pretty sure that all will be fine.

Revision history for this message
freak007 (freak-linux4freak) wrote :

hibernation works fine with kernel-ppa 2.6.25 !

Changed in linux:
status: Incomplete → Fix Released
assignee: nobody → ubuntu-kernel-team
importance: Undecided → Medium
status: New → Triaged
Stefan Bader (smb)
Changed in linux:
assignee: ubuntu-kernel-team → stefan-bader-canonical
status: Triaged → In Progress
Revision history for this message
Stefan Bader (smb) wrote :

I would rather have a fine-grained patch for that, so I picked one that sound most likely and included it with my PPA kernel (https://launchpad.net/~stefan-bader-canonical/+archive). It would be great if you could give that a try and tell me whether that solved the problem. Thanks.

Revision history for this message
freak007 (freak-linux4freak) wrote :

I tried kernel 2.6.24-18-generic from https://launchpad.net/~stefan-bader-canonical/+archive and hibernation works too with this kernel.

Revision history for this message
Stefan Bader (smb) wrote :

SRU Justification:

Impact: Problems when hibernating with more than 4GB of memory (dmesg looks like a hang, patch description speaks of an oops).

Patch: http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-hardy.git;a=commitdiff;h=f1c6147685f2ddedde3442b18d72b421c22048d9

Testcase: Trying to hibernate with more than 4GB of memory active.

Changed in linux:
milestone: none → ubuntu-8.04.1
status: In Progress → Fix Committed
Revision history for this message
Steve Langasek (vorlon) wrote :

freak007, could you please also test the 2.6.24-19 kernel in hardy-proposed and verify that it still works? This will help us make the fix available to all users of 8.04.

description: updated
Revision history for this message
Steve Langasek (vorlon) wrote :

The 2.6.24-19 kernel has been pushed to hardy-updates, this bug is presumed fixed. Please reopen the report if this is not the case for you.

Changed in linux:
status: Fix Committed → Fix Released
Revision history for this message
freak007 (freak-linux4freak) wrote :

hello, I'm sorry for delay , I confirm that the bug is fixed in 2.6.24-19 kernel.

Revision history for this message
Launchpad Janitor (janitor) wrote : Kernel team bugs

Per a decision made by the Ubuntu Kernel Team, bugs will longer be assigned to the ubuntu-kernel-team in Launchpad as part of the bug triage process. The ubuntu-kernel-team is being unassigned from this bug report. Refer to https://wiki.ubuntu.com/KernelTeamBugPolicies for more information. Thanks.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.