Bug 145591 - FATE #151275: suspend to RAM (S3) does not work on many HP notebooks
Summary: FATE #151275: suspend to RAM (S3) does not work on many HP notebooks
Status: VERIFIED FIXED
: 155304 (view as bug list)
Alias: None
Product: SUSE Linux 10.1
Classification: openSUSE
Component: Kernel (show other bugs)
Version: Beta 2
Hardware: Other Other
: P5 - None : Major (vote)
Target Milestone: ---
Assignee: Hannes Reinecke
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 140732
  Show dependency treegraph
 
Reported: 2006-01-25 17:53 UTC by Forgotten User ZhJd0F0L3x
Modified: 2006-07-14 15:13 UTC (History)
9 users (show)

See Also:
Found By: Component Test
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
the patch, adopted to 2.6.16rc1 (10.36 KB, patch)
2006-01-25 17:54 UTC, Forgotten User ZhJd0F0L3x
Details | Diff
ide-acpi-support.patch (23.11 KB, patch)
2006-03-06 11:35 UTC, Hannes Reinecke
Details | Diff
ide-acpi-support (24.79 KB, patch)
2006-03-14 14:17 UTC, Hannes Reinecke
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Forgotten User ZhJd0F0L3x 2006-01-25 17:53:17 UTC
newer HP notebooks do not recover from suspend to RAM because of missing ACPI handling in the IDE layer.
There is a patch around which fixes this: http://thread.gmane.org/gmane.linux.ide/6802

See also bug #142375 for a similar bug with SATA.
Comment 1 Forgotten User ZhJd0F0L3x 2006-01-25 17:54:30 UTC
Created attachment 65065 [details]
the patch, adopted to 2.6.16rc1

i had to add 3 additional EXPORT_SYMBOLs and am not sure that they are in the best possible place.
Comment 2 Pavel Machek 2006-01-25 18:33:29 UTC
Is that patch (or its equivalent) in mainline?

First it looks slightly ugly (#includes should not be protected by #ifdefs, clean the code not to need the protection), then I'm afraid it will break some machines.

What machines are we trying to fix? I seen problems in compaq evo 520c and nx5000 (IIRC); and those were way before reaching ide resume, and probably in BIOS code.
Comment 3 Olaf Kirch 2006-01-25 19:20:44 UTC
Scary patch indeed. Jens, any opinion on this one?
Comment 4 Forgotten User ZhJd0F0L3x 2006-01-25 19:21:21 UTC
(In reply to comment #2)
> Is that patch (or its equivalent) in mainline?

No. It was discussed around 2005-12-06 on lkml and linux-ide, the patch was brought up again by Shaohua Li.
There is also some discussion on
http://bugzilla.kernel.org/show_bug.cgi?id=2039 and
http://bugzilla.kernel.org/show_bug.cgi?id=5604

IIRC some consensus was that "#ifdef CONFIG_ACPI" code did not belong into ide core and finally hch shot it down (or was this the first round of the SATA code? not sure).

> First it looks slightly ugly (#includes should not be protected by #ifdefs,

This was also mentioned in the thread on linux-ide. Also, the
+#include <acpi/acpixf.h>
is probably bogus - i added that before i realized that i need to do the EXPORT_SYMBOL stuff in the ACPI code.

> clean the code not to need the protection), then I'm afraid it will break some
> machines.

Ubuntu ships this for a long time, reportedly without breakage.

> What machines are we trying to fix? I seen problems in compaq evo 520c and
> nx5000 (IIRC); and those were way before reaching ide resume, and probably in
> BIOS code.

nx5000 and friends were fixed by "the great ACPI interpreter fixup" (around ~2.6.9 IIRC) which got many machien to resume suddenly, i believe i have seen nx5000 work almost ootb in 9.2 or 9.3.

The ones failing now are the newer machines - n[cx]61xx, n[cx]62xx, n[cx]82xx.
Those resume fine (video is hosed), but you can no longer access the disk - all you get is a timeout - almost feels like the early sata suspend stuff.

With this patch, "vga=0" and "vbetool vbestate restore" after resume, my nc6230 works just fine.

I am adding Shaohua Li to Cc:, maybe he can shed some light on this issue.
Comment 5 Jens Axboe 2006-01-25 19:30:28 UTC
My main problem with the patch is that I don't understand what it does. It doesn't actually submit any commands to the drive, so honestly right now I don't know why it makes a difference. Perhaps Intel can enlighten me?
Comment 6 Forgotten User ZhJd0F0L3x 2006-01-30 15:16:46 UTC
Adding those PMs that could benefit from this patch ;-)
Comment 7 Shaohua Li 2006-02-15 01:15:19 UTC
ACPI spec requires IDE driver executes some ACPI methods to save/restore IDE status. The patch is just a workaround. Per the discussion in ide maillist, there are many things to do to improve the patch.
Comment 8 Hannes Reinecke 2006-03-06 11:35:12 UTC
Created attachment 71328 [details]
ide-acpi-support.patch

Patch to add ACPI support for IDE drives.
Comment 9 Hannes Reinecke 2006-03-06 11:38:09 UTC
The above patch is a modification of Randy Dunlaps patch for libata. We should consider including that one instead of the one from comment #1 as we (or Randy) could integrate both so that we only have to maintain one codebase.
Comment 10 Forgotten User ZhJd0F0L3x 2006-03-06 12:12:09 UTC
*** Bug 155304 has been marked as a duplicate of this bug. ***
Comment 11 Pavel Machek 2006-03-06 14:15:39 UTC
Could you run the patch through linux-kernel for comments? At least = 0 initializers should be stripped, ide-acpi.c needs GPL, you are using DEBPRINT for routine debugging (probably should be removed prior to merge) and error conditions, ...
Comment 12 Greg Kroah-Hartman 2006-03-09 06:29:30 UTC
Randy, are you still working on this kind of issue now that you are no longer
with Intel (it's fine if not, just need to determine who will take over 
the submission of this patch.)
Comment 13 Randy Dunlap 2006-03-09 16:13:43 UTC
Yes, I hope to post a libata patch very soon (not for drivers/ide/, like
Hannes posted recently).
Comment 14 Hannes Reinecke 2006-03-14 14:17:25 UTC
Created attachment 72776 [details]
ide-acpi-support

Updated version of the IDE ACPI support. Includes suggestions made by Randy on linux-ide as well as some module parameters to tweak operations.
Comment 15 Hannes Reinecke 2006-03-14 14:18:41 UTC
And with the above patch even seife's HP Laptop resumes properly. So this would warrant to set this bug to 'FIXED', especially as I've added the patch to our kernel CVS.
Comment 16 Pavel Machek 2006-03-14 15:02:25 UTC
Was patch submitted upstream?
Comment 17 Hannes Reinecke 2006-03-14 15:07:30 UTC
Yes, see thread '[PATCH] ACPI support for IDE drives' on linux-ide.

Not that I got any response, but hey, you can't have everything.

Pavel, any comments on the patch are greatly appreciated.
Comment 18 Joachim Werner 2006-03-15 11:23:21 UTC
Will the patch be on beta8? I have an HP that doesn't wake up, too, and I'd like to verify ASAP.
Comment 19 Hannes Reinecke 2006-03-15 11:31:31 UTC
yes, it is.
Comment 20 Ihno Krumreich 2006-07-14 15:13:48 UTC
Closed.