Bug 2571 - ACPI devices lack suspend/resume support
Summary: ACPI devices lack suspend/resume support
Status: REJECTED INSUFFICIENT_DATA
Alias: None
Product: ACPI
Classification: Unclassified
Component: Power-Sleep-Wake (show other bugs)
Hardware: i386 Linux
: P2 low
Assignee: Shaohua
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-22 13:49 UTC by Thomas Renninger
Modified: 2006-07-10 13:07 UTC (History)
4 users (show)

See Also:
Kernel Version: 2.6.5
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
a patch (336 bytes, patch)
2004-04-27 01:43 UTC, Luming Yu
Details | Diff
test patch agains 2.6 kernel (483 bytes, patch)
2004-05-17 23:44 UTC, Luming Yu
Details | Diff

Description Thomas Renninger 2004-04-22 13:49:39 UTC
Kernel 2.6.5 on a compaq NX5000  
  
Problem Description:  
After suspend to disk (echo 4 >/proc/acpi/sleep) the power button(FF) does not  
generate any events/interrupts any more.  
  
Steps to reproduce:  
boot: init=/bin/bash  
echo 4 >/proc/acpi/sleep  
->resume  
cat /proc/acpi/event | cat /proc/interrupts  
press the power button -> nothing
Comment 1 Thomas Renninger 2004-04-22 14:04:34 UTC
Forgot to mention that loading/unloading the button module before/after suspend 
helps -> the ad_adapter state value is updated. 
Comment 2 Luming Yu 2004-04-27 01:43:49 UTC
Created attachment 2728 [details]
a patch

suspend_finish is missing from resume from Disk code path.
Comment 3 Luming Yu 2004-05-17 23:44:10 UTC
Created attachment 2892 [details]
test patch agains 2.6 kernel

Please help with testing this patch.
Comment 4 Thomas Renninger 2004-05-18 01:57:29 UTC
Sorry, this cannot be the reason.
I use swsusp (echo 4 >proc/acpi/sleep).
disk.c is based on CONFIG_PM_DISK and is not even compiled in my kernel.

Thank you very much, anyway.

> Please help with testing this patch.
Of course.

Pavel told me that swsusp doesn't really do a S4.
As far as I know _WAK function is not invoked at all after resume.
Maybe this is the problem and the button needs to get reactivated there?

However, this bug is not that sever because it's easy to workaround: un-,load
button module before/after suspend.
Comment 5 Len Brown 2004-11-03 19:06:21 UTC
same with 2.6.9?
Comment 6 Thomas Renninger 2004-11-04 01:02:18 UTC
using swusp you can now write
platform,firmware,shutdown or reboot (reboot for debugging issues)
into /sys/power/disk
1) shutdown -> no _WAK method invoked as it always has been done
2) firmware -> try to let bios do the suspend
3) platform -> _WAK method invoked

3 Fixes such little issues like wrong AC state after suspend as BIOS could cache
this value and reinitialise it in _WAK or not working buttons (the button issue
I saw on several laptops).
However, platform could crash a small amount of laptops and is therefore still
not the default.

Pavel may correct me if I am wrong in some point.
Comment 7 Carl-Daniel Hailfinger 2004-12-14 15:57:33 UTC
Seeing this with Kernel 2.6.10-rc3-bk6 on a Samsung P35

Why can't the "shutdown" method reinitialize the things by hand which the
"platform" method relies on the BIOS to reinitialize?

A simple acpi_enable_event on resume would fix the button issue for me when
using the "shutdown" method.

I'd reopen this bug if Bugzilla let me.
Comment 8 Shaohua 2004-12-14 16:58:36 UTC
acpi_enable_event looks like a workaround to me. Actually 'platform' method 
should be the default method if ACPI is robust enough.
Another solution is we provide ACPI devices suspend/resume.
Comment 9 Pavel Machek 2006-05-23 03:57:54 UTC
Thomas, does it still happen with 2.6.17-rc4? I thought we were adding some
workarounds (aha, one of them is attached), but they may be only present in
-suse or something like that.

Comment 10 Adrian Bunk 2006-07-10 13:07:05 UTC
Please reopen this bug if it's still present in kernel 2.6.17.

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