New in 2.6.22-13: system takes a LONG time to resume from suspend

Bug #151016 reported by Tim Hull on 2007-10-09
32
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Undecided
Unassigned
linux-source-2.6.22 (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: linux-image-2.6.22-13-generic

On my MacBook Core Duo (first generation, 32-bit), in the newest Ubuntu kernel I have no video after resuming from suspend-to-RAM on my MacBook for a *long* time (like 5-10 minutes) about 1 out of every 4 or 5 suspend/resume cycles. This only started after the recent update to the kernel - things worked fine in Gutsy up until that time. This occurs whether I use X.org's "intel" or "i810" video drivers and seemed to begin happening around the time of the kernel update - hence my belief that it is somehow kernel-related.

I have attached the following logs from /var/log -
dmesg
acpid
kern.log
user.log

Please note that the "suspend failed" in the user.log is erroneous - in that case, suspend actually succeeded but gnome-power-manager is known to be erroneously reporting failure (bug 137738 - there is a patch in that bug but it hasn't been applied).

Tim Hull (thully) wrote :
Tim Hull (thully) wrote :
Tim Hull (thully) wrote :
Tim Hull (thully) wrote :
Tim Hull (thully) wrote :

2.6.22-14 also exhibits this. It seems like it tends to happen if the machine is left in suspend for an extensive period of time (i.e. more than a few minutes).

Tim Hull (thully) wrote :

Somehow, I totally missed the boat on this one. The issue is indeed X - and in particular the craptastic "intel" X server. Marking as dupe of 127101, since this seems like a special, unique case of that.

Changed in linux-source-2.6.22:
status: New → Invalid
Tim Hull (thully) wrote :

In further investigation, X does seem to be involved (the issue does seem to occur more with the -intel driver, and especially if you disable DRI), but so does the kernel. Reopening as a kernel bug, as this does seem to be an issue that does NOT exist on -12 and does on -13 and -14. Could devs test machines with similar chipsets/specs (laptop/Core Duo/Intel graphics) to see if -13 is introducing issues with resume from suspend for them?

Changed in linux-source-2.6.22:
status: Invalid → New
Tim Hull (thully) wrote :

The bug is actually a gnome-power-manager bug, so I'm closing this and opening a bug against it. I actually *can* get video after this type of "freeze" - it's just that I have to close the lid for a while and press the "on" button.

Changed in linux-source-2.6.22:
status: New → Invalid
Tim Hull (thully) wrote :

My bad - I spoke too soon. Even though I got some errors from g-p-m in the process, the root problem remains with the kernel. I've reverted my kernel to the -12 kernel included on the Gutsy beta CD and it works fine, though I would like to see this fixed in a SRU for the current Gutsy kernel.

Changed in linux-source-2.6.22:
status: Invalid → New

Also of not - sometimes I can wake my system when frozen in this state by closing the lid, waiting a few seconds, connecting/disconnecting the power cord, and then pressing the power dutton. However, this only revives the system about half of the time.

Stefano Rivera (stefanor) wrote :

I can confirm this.

Changed in linux-source-2.6.22:
status: New → Confirmed
assignee: nobody → ubuntu-kernel-team

I just noticed that someone else mentioned this on the Ubuntu MacBook wiki
and directed MacBook users to the 2.6.22-12 kernel as the last working
kernel. Indeed, I am actually running that kernel right now so that I can
have suspend.

Anyway, It would be nice to get this fixed so that MacBook users don't have
to pick between reliable suspend and supported kernel updates... I started
working on it by trying to revert a few ACPI patches, notably this:

  * clockevents: remove the suspend/resume workaround^Wthinko

However, the issue persisted. I am confident that it was introduced between
-12 and -13, though - as I recall this happening starting with -13 and -12
(from the Beta release) definitely does NOT have the issue.
On 10/22/07, Stefano Rivera <email address hidden> wrote:
>
> I can confirm this.
>
> ** Changed in: linux-source-2.6.22 (Ubuntu)
> Status: New => Confirmed
>
> ** Changed in: linux-source-2.6.22 (Ubuntu)
> Assignee: (unassigned) => Ubuntu Kernel Team (ubuntu-kernel-team)
>
> --
> New in 2.6.22-13: System doesn't always wake from suspend
> https://bugs.launchpad.net/bugs/151016
> You received this bug notification because you are a direct subscriber
> of the bug.
>

The bug is not limited to MacBooks. I can confirm this exact behaviour on an HP NX7300 laptop (Intel Core 2 T5600 / 945GM) running the latest kernel (2.6.22-14-generic).
Thanks for the connect/disconnect power workaround!

Does it work fine with -12? If not, your problem is different. If so, your
problem is the same.

On 10/22/07, Jens Bergqvist <email address hidden> wrote:
>
> The bug is not limited to MacBooks. I can confirm this exact behaviour on
> an HP NX7300 laptop (Intel Core 2 T5600 / 945GM) running the latest kernel (
> 2.6.22-14-generic).
> Thanks for the connect/disconnect power workaround!
>
> --
> New in 2.6.22-13: System doesn't always wake from suspend
> https://bugs.launchpad.net/bugs/151016
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Tim Hull (thully) wrote :

P.S. You can get the -12 kernel from the links on the MacBook wiki at:

https://help.ubuntu.com/community/MacBook

On 10/22/07, Tim Hull <email address hidden> wrote:
>
> Does it work fine with -12? If not, your problem is different. If so,
> your problem is the same.
>
> On 10/22/07, Jens Bergqvist < <email address hidden>> wrote:
> >
> > The bug is not limited to MacBooks. I can confirm this exact behaviour
> > on an HP NX7300 laptop (Intel Core 2 T5600 / 945GM) running the latest
> > kernel ( 2.6.22-14-generic).
> > Thanks for the connect/disconnect power workaround!
> >
> > --
> > New in 2.6.22-13: System doesn't always wake from suspend
> > https://bugs.launchpad.net/bugs/151016
> > You received this bug notification because you are a direct subscriber
> > of the bug.
> >
>
>

I tracked down 2.6.22-12 just after I posted my comment and as far as I can tell it works like a charm. Should have posted my results sooner but work got in the way. Anyway, it's probably safe to assume we're dealing with the same bug.

What chipset/graphics card/etc does your laptop have? Wifi? I'm curious,
as I'd like to narrow down what component this bug caused a regression with.

On 10/22/07, Jens Bergqvist <email address hidden> wrote:
>
> I tracked down 2.6.22-12 just after I posted my comment and as far as I
> can tell it works like a charm. Should have posted my results sooner but
> work got in the way. Anyway, it's probably safe to assume we're dealing
> with the same bug.
>
> --
> New in 2.6.22-13: System doesn't always wake from suspend
> https://bugs.launchpad.net/bugs/151016
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Some general specs:
CPU: Intel Core 2 Duo T5600 1.83GHz
Chipset: Mobile Intel 945GM Express
Graphics: Intel Graphic Media Accelerator 950
WLAN: Intel PRO/Wireless 3945BG

Attached the output from "lspci -vnn".

If you want more info just ask. I really want this thing squashed.

The chipset and graphics are the same as mine - everything else is different
(I have a Core Duo and Atheros wireless).

On 10/22/07, Jens Bergqvist <email address hidden> wrote:
>
> Some general specs:
> CPU: Intel Core 2 Duo T5600 1.83GHz
> Chipset: Mobile Intel 945GM Express
> Graphics: Intel Graphic Media Accelerator 950
> WLAN: Intel PRO/Wireless 3945BG
>
> Attached the output from "lspci -vnn".
>
> If you want more info just ask. I really want this thing squashed.
>
> ** Attachment added: "Output from lspci -vnn"
> http://launchpadlibrarian.net/10123306/lspci-vnn
>
> --
> New in 2.6.22-13: System doesn't always wake from suspend
> https://bugs.launchpad.net/bugs/151016
> You received this bug notification because you are a direct subscriber
> of the bug.
>

I can confirm the same bug on my macbook with 2.6.22-14 (CPU: Intel
Core 2 Duo T7400 2.16GHz).

Just a (most probably unrelated) note: I started having this issue after playing
a bit with powertop (USB autosuspend etc.). Never experienced in 2.6.22-13.

Harald Staub (staub) wrote :

Probably same bug here, but: resume works always reliably just by waiting 5 minutes :-/

Wagner Volanin (volanin) wrote :

Confirmed here too: MacBook Core2Duo 2.16Ghz.
Tried with 2.6.22-12, 2.6.22-14 and even 2.6.23.1 custom vanilla kernel.
Only 2.6.22-12 got suspend/resume completely reliable.

Tim Hull (thully) wrote :

According to Volanin's analysis, this seems to be something introduced upstream - likely in 2.6.22.8 or 2.6.22.9.
I will also concur with the fact that after waiting 5-10 minutes one can always wake up the system - and sometimes pressing the power button wakes it before that.

Anyway, I have attached my dmesg files from the system. The first is the dmesg from before I went into suspend, and the second is from after I resumed from one of these "hung" suspends. Note that it took around 10 minutes to get the system to wake up.

Tim Hull (thully) wrote :
Tim Hull (thully) wrote :

Also, here is my /var/log/dmesg from after the suspend. It is different from the dmesg command output...

Tim Hull (thully) wrote :

I believe I have traced the bug. Anyway, in my suspend/resume testing, through trial and error I found that the issue does NOT occur if I unload the ohci1394 module prior to suspend. Even if I'm having it occur almost every suspend on a particular boot, unloading ohci1394 makes it go away. As this was unnecessary for the -12 kernel, I am suspicious that a commit relating to ohci1394 between the -12 and -13 kernel is our problem.

As of now, the only one I see is:

  * ieee1394: ohci1394: fix initialization if built non-modular

Can the devs look into this? As of now, I would venture to guess that this issue happens on Intel-chipset laptops with Firewire chipsets making use of the "ohci1394" module.

description: updated
Tim Hull (thully) wrote :

I spoke too soon - it started happening again with ohci1394 unloaded. Thus, I'm still completely baffled as to what introduced the issue...

description: updated
Khurrum1990 (khurrum1990) wrote :

Hi, yeah I seriously hope the Ubuntu team fixes this bug. I had this problem on my P4 and when I went back to the old kernel everything works perfect only problem is I hate using an old kernel, I think it may have security issues.

Glyph Lefkowitz (glyph) wrote :

Not too much to add, since my symptoms are the same as everyone else's, but I can also confirm this. Definitely the -13 kernel that introduced it.

linuxbest (hugang) wrote :

revert 59dc38b44daad5b86a7a59f8198e197ad96236ea can fix this bug, I need someone confirm it. thanks.

the same bug also in mainline 2.6.23, revert 59dc38b44daad5b86a7a59f8198e197ad96236ea fix it too.

http://kernel.ubuntu.com/git?p=mjg59/ubuntu-gutsy.git;a=commit;h=95a5397b50b8ab2fa8ef9ed482c49d76a9a9dfbb

Khurrum1990 (khurrum1990) wrote :

Hi, yeah one more thing. Its bad news. The latest Ubuntu updates to kernel 2.6.22-14 and the new updated nvidia-glx-new package make the problem worse. It doesn't fix anything and it also does not allow suspend and hibernate in kernel 2.6.22-12. I hope the kernel team will fix this soon.

Recently I've been trying out the x86_64 version of gutsy and as far as I can tell this bug is limited to the 32 bit version. I've suspended my computer a few dozen times over the past couple of days and it's come back up every time. I do still have some other suspend/resume issues that are really annoying (wifi/NetworkManager/knetworkmanager stuff) but that's probably unrelated to this bug.

Jens Geiregat (jens-geiregat) wrote :

I don't know if this will help nailing the bug, but I have found a way of reviving my MacBook when suspend (with the 2.6.22-14 kernel) fails. It does not work every time though. When resume fails (no backlight on the screen), start tapping the power-button. Sometimes tapping the spacebar and the return key helps too. Most of the time the backlight will light up and you will be presented a login screen. However, when entering your password, you will notice keypresses are registered twice about 80% of the time (once for pressing the key down and once for up). Struggle with this until you're able to enter your password correctly and your laptop should be resumed now. (The double keypress issue disappears after login.)

Note: in some cases, your system will not be usable: it will freeze after each keypress. (I'm not into kernel development, but I think the kernel only schedules tasks or wakes up when an interrupt happens.) This is scary (for me) but it will enable you to reboot your system: just reboot and keep tapping keys (spacebar, once every second should do) until everything is cleanly (?) shut down.

Khurrum1990 (khurrum1990) wrote :

Upgrade to Hardy's kernel 2.6.24-2 fixes this problem or downgrade to Gutsy kernel 2.6.22-12. I can confirm this myself, other people should try this as well.

That is my experience (as the original bug reporter) myself - though I
haven't tested 2.6.24-2 yet (I did use -12, though). Does anyone know for
sure when it was fixed? Was it still an issue in 2.6.23 or 2.6.24-1? It
would be nice to see an official backport of the fix to Gutsy...

On 1/1/08, Khurrum1990 <email address hidden> wrote:
>
> Upgrade to Hardy's kernel 2.6.24-2 fixes this problem or downgrade to
> Gutsy kernel 2.6.22-12. I can confirm this myself, other people should
> try this as well.
>
> --
> New in 2.6.22-13: system takes a LONG time to resume from suspend
> https://bugs.launchpad.net/bugs/151016
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Khurrum1990 (khurrum1990) wrote :

Oh yeah to those who upgraded to Hardy's kernel please make sure u upgrade ur nvidia drivers from the restricted repositories for Hardy. It should work then.

Khurrum1990 (khurrum1990) wrote :

Sorry, but I think ATI users need the latest drivers as well. I never used an ATI card with Linux so I don't know what package to install but u could always use Envy to install the latest drivers.

For nvidia add this repo in sources list:

deb http://archive.ubuntu.com/ubuntu/ hardy main restricted

sudo apt-get update

sudo apt-get install nvidia-glx-new

u can install the legacy version as required for ur card.

Carsten Schnober (c-schnober) wrote :

I can confirm this bug on my Samsung X20 laptop with i915 graphics chip (see attachment lspci.txt). It sometimes resumes after disconnecting and connecting the power cable and/or closing and opening lid. Suspend/resume worked like a charme before upgrading to Gutsy.

Khurrum1990 (khurrum1990) wrote :

Hi, I just found out something if u use the latest kernel for Gutsy that is:

khurrum@khurrum-desktop:~$ uname -a
Linux khurrum-desktop 2.6.22-14-generic #1 SMP Fri Feb 1 04:59:50 UTC 2008 i686 GNU/Linux

With this kernel along with the latest nvidia drivers for this kernel, suspend and resume as well as hibernate work perfectly.

Did some one notice this?

Khurrum1990 (khurrum1990) wrote :

Sorry about that, spoke too soon, though hibernate works perfectly!

Beginning with the Hardy Heron 8.04 development cycle, all open Ubuntu kernel bugs need to be reported against the "linux" kernel package. We are automatically migrating this bug to the new "linux" package. However, development has already began for the upcoming Intrepid Ibex 8.10 release. It would be helpful if you could test the upcoming release and verify if this is still an issue - http://www.ubuntu.com/testing . If the issue still exists, please update this report by changing the Status of the "linux" task from "Incomplete" to "New". We appreciate your patience and understanding as we make this transition. Thanks!

The Ubuntu Kernel Team is planning to move to the 2.6.27 kernel for the upcoming Intrepid Ibex 8.10 release. As a result, the kernel team would appreciate it if you could please test this newer 2.6.27 Ubuntu kernel. There are one of two ways you should be able to test:

1) If you are comfortable installing packages on your own, the linux-image-2.6.27-* package is currently available for you to install and test.

--or--

2) The upcoming Alpha5 for Intrepid Ibex 8.10 will contain this newer 2.6.27 Ubuntu kernel. Alpha5 is set to be released Thursday Sept 4. Please watch http://www.ubuntu.com/testing for Alpha5 to be announced. You should then be able to test via a LiveCD.

Please let us know immediately if this newer 2.6.27 kernel resolves the bug reported here or if the issue remains. More importantly, please open a new bug report for each new bug/regression introduced by the 2.6.27 kernel and tag the bug report with 'linux-2.6.27'. Also, please specifically note if the issue does or does not appear in the 2.6.26 kernel. Thanks again, we really appreicate your help and feedback.

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.

Stefano Rivera (stefanor) wrote :

Appears fixed in Jaunty

Changed in linux (Ubuntu):
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers