From: "Michael Frank" <mhf-jjFNsPSvq+iXDw4h08c5KA@public.gmane.org>
To: Daniele Boffi <boffi-piYtxHxN1XRAly3Pu9w1wA@public.gmane.org>
Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [Swsusp-devel] swsusp and ac status
Date: Thu, 24 Jun 2004 22:37:12 +0800 [thread overview]
Message-ID: <opr93r8ap24evsfm@smtp.pacific.net.th> (raw)
In-Reply-To: <200406241233.i5OCXiKC002386-xzhXYMPkGmXoPXhRcRtihA@public.gmane.org>
On Thu, 24 Jun 2004 14:33:44 +0200, Daniele Boffi <boffi-piYtxHxN1XRAly3Pu9w1wA@public.gmane.org> wrote:
> Hi,
> I noticed that a change in the ac status is not detected after a swsusp.
> I thought this was an acpi related and known issue; I sent a message
> to the acpi-devel list but with no significant answer.
>
> Is anybody aware of this problem? Is there any workaround available?
>
> How to reproduce the bad behavior:
>
> - swsuspend when on ac (resp. battery) power
> - unplug (resp. plug) the ac adapter when the laptop is off
> - resume when on battery (resp. ac) power
>
> Then /proc/acpi/ac_adapter/*/state says "on-line" (resp. "off-line").
> A new change in the status is then correctly detected.
>
> I tried different acpi configurations (ac in the kernel or as a module, unload
> the ac module before suspending and reload it after resuming...) with no
> success.
>
> actual kernel 2.6.7 (same behavior with previous ones), no acpi patch, swsusp2
> patch
>
> Compaq EVO N800v laptop.
>
> Same behavior with pm-suspend, swsusp and swsusp2.
>
The root cause is due to the AC module state at the time of suspend
being saved and restored on resume and thus being inconsistent
with the HW on resume which was "touched" by the BIOS and resuming
kernel (the kernel which reads the image from disk) during its boot.
The problem affects all (2.4/2.6) kernels, most ACPI modules
(AC, Battery an Button seem especialy troublesome) and is due to lack of
PM support in the APCI subsystem. A few users even reported crashes
on resume which went away when the modules were removed prior
to suspend.
The ACPI spec surely has standard methods for subsystem PM but these
are obviously not usable, whether due to being unimplemented or
broken in ACPI subsystem, DSTD or BIOS.
Guess the least the ACPI subsystem should do is to disable relevant
modules on suspend event and reinit them in fashion similar to
boot on resume.
I personaly find it undesirable that PM subsystem components have
no functioning PM :-(
For now, in practice all ACPI modules should be unloaded prior to
suspend and loaded on resume.
I use the AC module and kernel 2.4.24 with swsusp 2.0 and it works
fine as long as it is removed prior to suspend.
Michael
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
next parent reply other threads:[~2004-06-24 14:37 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200406241233.i5OCXiKC002386@fermat.unipv.it>
[not found] ` <200406241233.i5OCXiKC002386-xzhXYMPkGmXoPXhRcRtihA@public.gmane.org>
2004-06-24 14:37 ` Michael Frank [this message]
[not found] <mhf@linuxmail.org>
[not found] ` <mhf-jjFNsPSvq+iXDw4h08c5KA@public.gmane.org>
[not found] ` <opr93r8ap24evsfm-TBR8pM7LtsqkE96DxU8f+dAkNl5+tjhE@public.gmane.org>
2004-06-24 15:13 ` [Swsusp-devel] swsusp and ac status Daniele Boffi
[not found] ` <200406241513.i5OFDpKC003189-xzhXYMPkGmXoPXhRcRtihA@public.gmane.org>
2004-06-24 17:26 ` Michael Frank
2004-06-28 20:25 ` Pavel Machek
[not found] ` <200406301539.i5UFdUWt011300@fermat.unipv.it>
[not found] ` <200406301539.i5UFdUWt011300-xzhXYMPkGmXoPXhRcRtihA@public.gmane.org>
2004-06-30 19:40 ` Pavel Machek
[not found] ` <opr93z2ex34evsfm-TBR8pM7LtsqkE96DxU8f+dAkNl5+tjhE@public.gmane.org>
2004-06-25 7:01 ` Daniele Boffi
[not found] ` <200406250701.i5P71GKC006204-xzhXYMPkGmXoPXhRcRtihA@public.gmane.org>
2004-06-25 9:21 ` Nigel Cunningham
2004-06-25 11:29 ` Michael Frank
2004-06-25 23:21 ` Micha Feigin
[not found] ` <opr95d71ln4evsfm-TBR8pM7LtsqkE96DxU8f+dAkNl5+tjhE@public.gmane.org>
2004-06-25 12:09 ` Daniele Boffi
2004-06-25 15:14 ` Stefan Seyfried
[not found] ` <20040625151421.GA8852-l0tNAEGuAhhzZ8+rp42Dbp9+tswZ0GTaehPwdyo5hKaELgA04lAiVw@public.gmane.org>
2004-06-30 0:33 ` Micha Feigin
2004-06-27 22:28 ` Re: [Swsusp-devel] " Karol Kozimor
[not found] ` <20040627222842.GB1816-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org>
2004-06-28 0:13 ` Michael Frank
[not found] ` <opr992vyyr4evsfm-TBR8pM7LtsqkE96DxU8f+dAkNl5+tjhE@public.gmane.org>
2004-06-28 0:50 ` Michael Frank
[not found] ` <opr994muhg4evsfm-TBR8pM7LtsqkE96DxU8f+dAkNl5+tjhE@public.gmane.org>
2004-06-28 5:27 ` Karol Kozimor
[not found] ` <20040628052704.GA24842-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org>
2004-06-28 10:03 ` Michael Frank
2004-06-28 20:29 ` [ACPI] " Pavel Machek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=opr93r8ap24evsfm@smtp.pacific.net.th \
--to=mhf-jjfnspsvq+ixdw4h08c5ka@public.gmane.org \
--cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=boffi-piYtxHxN1XRAly3Pu9w1wA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox