From: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
To: linux-acpi@vger.kernel.org
Cc: Andrey Borzenkov <arvidjaar@mail.ru>
Subject: Re: Machine shutdown after resume from S3
Date: Thu, 21 Feb 2008 19:21:01 -0300 [thread overview]
Message-ID: <200802211921.01913.herton@mandriva.com.br> (raw)
In-Reply-To: <20080221174643.32B0A3608D@smtp02.mtu.ru>
Em Thursday 21 February 2008 14:46:45 Andrey Borzenkov escreveu:
> Herton Ronaldo Krzesinski wrote:
>
> > I have here an Intel Classmate hardware sample, and I have a weird problem
> > with suspend to ram, the machine does a power off when resuming.
> >
>
> Do you have acpid running? You may also be interested in this:
> http://qa.mandriva.com/show_bug.cgi?id=18998
> http://qa.mandriva.com/show_bug.cgi?id=23296
> http://article.gmane.org/gmane.linux.acpi.devel/17581/match=sup
>
>
> > I isolated the problem to the button acpi module, without loading it (or
> > just removing it before doing a s2ram) I don't get the problem. In the
> > specific machine I have here I can only resume it pressing the power
> > button, so I think this is related.
> >
>
> IIRC the issue was that button press that triggered resume was reported to
> user space. This apparently was fixed in the quoted patch; but may be this
> specific model goes via different code path?
In my case here is not an userspace issue. But the patch in the last link you
posted gave me an idea, to check code executed in resume, I managed to make
a quick hack that solved the issue:
diff --git a/drivers/acpi/sleep/main.c b/drivers/acpi/sleep/main.c
index 293a1cb..2255434 100644
--- a/drivers/acpi/sleep/main.c
+++ b/drivers/acpi/sleep/main.c
@@ -156,6 +156,8 @@ static int acpi_pm_enter(suspend_state_t pm_state)
local_irq_save(flags);
acpi_enable_wakeup_device(acpi_state);
+ (void) acpi_set_register(acpi_gbl_fixed_event_info[ACPI_EVENT_POWER_BUTTON].enable_register_id, 0);
+ (void) acpi_set_register(acpi_gbl_fixed_event_info[ACPI_EVENT_POWER_BUTTON].status_register_id, 0);
switch (acpi_state) {
case ACPI_STATE_S1:
barrier();
For some reason with this I don't have the power off problem in resume.
I'll try to check more the code and acpi spec, but does this could indicate a
bug in bios?
--
[]'s
Herton
prev parent reply other threads:[~2008-02-21 22:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-20 21:37 Machine shutdown after resume from S3 Herton Ronaldo Krzesinski
2008-02-21 17:46 ` Andrey Borzenkov
2008-02-21 18:43 ` Andrey Borzenkov
2008-02-21 19:02 ` Matthew Garrett
2008-02-21 19:45 ` Andrey Borzenkov
2008-02-21 22:21 ` Herton Ronaldo Krzesinski [this message]
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=200802211921.01913.herton@mandriva.com.br \
--to=herton@mandriva.com.br \
--cc=arvidjaar@mail.ru \
--cc=linux-acpi@vger.kernel.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