From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Michal Hocko <mhocko@suse.cz>
Cc: Tony Vroon <tony@linx.net>,
Jesse Barnes <jbarnes@virtuousgeek.org>,
Matthew Garrett <mjg59@srcf.ucam.org>,
linux-kernel@vger.kernel.org,
ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
pm list <linux-pm@lists.linux-foundation.org>
Subject: Re: commit 9630bdd9 changes behavior of the poweroff - bug?
Date: Wed, 28 Apr 2010 00:06:44 +0200 [thread overview]
Message-ID: <201004280006.44540.rjw@sisk.pl> (raw)
In-Reply-To: <20100427065109.GA3907@tiehlicka.suse.cz>
On Tuesday 27 April 2010, Michal Hocko wrote:
> On Mon 26-04-10 20:51:09, Rafael J. Wysocki wrote:
> > On Monday 26 April 2010, Michal Hocko wrote:
> > > On Sun 25-04-10 04:35:42, Rafael J. Wysocki wrote:
> > > > On Monday 19 April 2010, Rafael J. Wysocki wrote:
> > > > > On Monday 19 April 2010, Michal Hocko wrote:
> > > > > > On Fri 16-04-10 20:00:29, Rafael J. Wysocki wrote:
> > > > > > > On Wednesday 14 April 2010, Michal Hocko wrote:
> > > > > > > > On Tue 13-04-10 22:53:37, Rafael J. Wysocki wrote:
> > > > > > > > > On Tuesday 13 April 2010, Michal Hocko wrote:
> > > > > > > > > > On Tue 13-04-10 01:01:54, Rafael J. Wysocki wrote:
> > > > > > > > > > > On Saturday 10 April 2010, Rafael J. Wysocki wrote:
> > > > > > > > > > > > On Friday 09 April 2010, Tony Vroon wrote:
> > > > > > > > > > > > > On Fri, 2010-04-09 at 22:42 +0200, Rafael J. Wysocki wrote:
> > > > > > > > > > > > > > Please check if the patch below changes anything.
> > > > > > > > > > > > > > drivers/acpi/wakeup.c | 4 ++--
> > > > > > > > > > > > > > 1 file changed, 2 insertions(+), 2 deletions(-)
> > > > > > > > > > > > >
> > > > > > > > > > > > > That didn't change the behaviour for me, sorry.
> > > > > > > > > > > >
> > > > > > > > > > > > Well, I would be sorry if it did, because the patch removed some useful code. :-)
> > > > > > > > > > > >
> > > > > > > > > > > > > (I made sure to go through a full power down session before trying the
> > > > > > > > > > > > > patched kernel)
> > > > > > > > > > > >
> > > > > > > > > > > > Thanks for testing. So it looks like we don't disable the GPE during power off.
> > > > > > > > > > > >
> > > > > > > > > > > > I'll try to figure out what's going on, please stay tuned.
> > > > > > > > > > >
> > > > > > > > > > > Can you please check if the patch below changes the behavior?
> > > > > > > > > >
> > > > > > > > > > Unfortunately, it didn't help either (I have tried on top of the fresh
> > > > > > > > > > rc4).
> > > > > > > > >
> > > > > > > > > That gets really weird.
> > > > > > > > >
> > > > > > > > > > > ---
> > > > > > > > > > > drivers/acpi/wakeup.c | 6 +++---
> > > > > > > > > > > 1 file changed, 3 insertions(+), 3 deletions(-)
> > > > > > > > > > >
> > > > > > > > > > > Index: linux-2.6/drivers/acpi/wakeup.c
> > > > > > > > > > > ===================================================================
> > > > > > > > > > > --- linux-2.6.orig/drivers/acpi/wakeup.c
> > > > > > > > > > > +++ linux-2.6/drivers/acpi/wakeup.c
> > > > > > > > > > > @@ -63,17 +63,17 @@ void acpi_enable_wakeup_device(u8 sleep_
> > > > > > > > > > > list_for_each_safe(node, next, &acpi_wakeup_device_list) {
> > > > > > > > > > > struct acpi_device *dev =
> > > > > > > > > > > container_of(node, struct acpi_device, wakeup_list);
> > > > > > > > > > > + u8 action = ACPI_GPE_ENABLE;
> > > > > > > > >
> > > > > > > > > Can you try to change the above to ACPI_GPE_DISABLE and retest, please?
> > > > > > > >
> > > > > > > > Unfortunately didn't help as well...
> > > > > > > > Just for reference:
> > > > > > > >
> > > > > > > > diff --git a/drivers/acpi/wakeup.c b/drivers/acpi/wakeup.c
> > > > > > > > index 248b473..f23c08f 100644
> > > > > > > > --- a/drivers/acpi/wakeup.c
> > > > > > > > +++ b/drivers/acpi/wakeup.c
> > > > > > > > @@ -63,7 +63,7 @@ void acpi_enable_wakeup_device(u8 sleep_state)
> > > > > > > > list_for_each_safe(node, next, &acpi_wakeup_device_list) {
> > > > > > > > struct acpi_device *dev =
> > > > > > > > container_of(node, struct acpi_device, wakeup_list);
> > > > > > > > - u8 action = ACPI_GPE_ENABLE;
> > > > > > > > + u8 action = ACPI_GPE_DISABLE;
> > > > > > >
> > > > > > > That probably means the chipset enables the GPEs by itself _after_ we've
> > > > > > > disabled them in acpi_enable_wakeup_device().
> > > > > >
> > > > > > Is this something BIOS specific?
> > > > > >
> > > > > > >
> > > > > > > Unfortunately, I can't reproduce the issue on any of my test boxes and it's
> > > > > > > hard to find the source of the problem staring at the code.
> > > > > >
> > > > > > Are there any debug options I can turn on to provide some information?
> > > > >
> > > > > We can only check what the kernel tells us before power off, but all that seems
> > > > > correct.
> > > > >
> > > > > > Btw. what exactly does this mean? In what state is the laptop while it
> > > > > > is turned off and GPE is enabled?
> > > > >
> > > > > If a GPE is enabled, then some part of the chipset has power provided so that
> > > > > it can signal wakeup.
> > > > >
> > > > > I'll look into it a bit more later today.
> > > >
> > > > Please try the patch below. It kind of restores the previous behavior,
> > > > let's see if it changes anything.
> > >
> > > Again, no success. Just to make sure that I didn't screw anything. I
> > > have used just the following patch on top of the clean rc5 (your patch
> > > has failed with some rejects but I guess that the following should do
> > > the same):
> >
> > Thanks for testing. Did you try the second thing, ie. try to comment out the
> > acpi_enable_gpe() in drivers/acpi/wakeup.c:acpi_wakeup_device_init() and
> > retest (if you haven't done that already)?
>
> I have tried it just now and still no success.
>
>
> commit 1a7e7c9ac82aa2de185fa2f686417a5eb7765420
> Author: Michal Hocko <mhocko@suse.cz>
> Date: Tue Apr 27 08:22:23 2010 +0200
>
> disable acpi_enable_gpe in acpi_wakeup_device_init
>
> as suggested by Rafael.
>
> diff --git a/drivers/acpi/wakeup.c b/drivers/acpi/wakeup.c
> index 4b9d339..a0f4859 100644
> --- a/drivers/acpi/wakeup.c
> +++ b/drivers/acpi/wakeup.c
> @@ -113,8 +113,9 @@ int __init acpi_wakeup_device_init(void)
> if (!dev->wakeup.flags.always_enabled ||
> dev->wakeup.state.enabled)
> continue;
> - acpi_enable_gpe(dev->wakeup.gpe_device, dev->wakeup.gpe_number,
> + /*acpi_enable_gpe(dev->wakeup.gpe_device, dev->wakeup.gpe_number,
> ACPI_GPE_TYPE_WAKE);
> + */
> dev->wakeup.state.enabled = 1;
> }
> mutex_unlock(&acpi_device_lock);
>
> On top of the previous patch. If I understand that correctly then this
> is really strange because this patch disables GPE completely, doesn't
> it?
Kind of, but this only happens for devices that are not handled by the button
driver which now has become our primary suspect.
Rafael
next prev parent reply other threads:[~2010-04-27 22:05 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-01 13:39 commit 9630bdd9 changes behavior of the poweroff - bug? Michal Hocko
2010-04-01 13:45 ` Matthew Garrett
2010-04-01 13:53 ` Michal Hocko
2010-04-02 19:31 ` Rafael J. Wysocki
2010-04-07 7:34 ` Michal Hocko
2010-04-07 19:49 ` Rafael J. Wysocki
2010-04-08 9:49 ` Michal Hocko
2010-04-08 20:43 ` Rafael J. Wysocki
2010-04-08 22:37 ` Tony Vroon
2010-04-08 22:54 ` Rafael J. Wysocki
2010-04-09 20:42 ` Rafael J. Wysocki
2010-04-09 21:20 ` Tony Vroon
2010-04-10 19:36 ` Rafael J. Wysocki
2010-04-12 23:01 ` Rafael J. Wysocki
2010-04-13 8:27 ` Michal Hocko
2010-04-13 20:53 ` Rafael J. Wysocki
2010-04-14 7:58 ` Michal Hocko
2010-04-16 18:00 ` Rafael J. Wysocki
2010-04-19 11:59 ` Michal Hocko
2010-04-19 15:19 ` Rafael J. Wysocki
2010-04-25 2:35 ` Rafael J. Wysocki
2010-04-25 3:15 ` Rafael J. Wysocki
2010-04-26 15:05 ` Michal Hocko
2010-04-26 16:22 ` Len Brown
2010-04-27 7:04 ` Michal Hocko
2010-04-29 14:38 ` Tony Vroon
2010-04-26 18:51 ` Rafael J. Wysocki
2010-04-27 6:51 ` Michal Hocko
2010-04-27 22:06 ` Rafael J. Wysocki [this message]
2010-04-28 21:18 ` Rafael J. Wysocki
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=201004280006.44540.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=mhocko@suse.cz \
--cc=mjg59@srcf.ucam.org \
--cc=tony@linx.net \
/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;
as well as URLs for NNTP newsgroup(s).