All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: "Kenneth R. Crudup" <kenny@panix.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Rafael Wysocki <rafael.j.wysocki@intel.com>,
	Linux PM <linux-pm@vger.kernel.org>
Subject: Re: Help me fix a regression caused by 56b9918490 (PM: sleep: Simplify suspend-to-idle control flow)
Date: Mon, 25 Nov 2019 23:01:10 +0100	[thread overview]
Message-ID: <CAJZ5v0hMR8_i=oA1ovX0-xfa_w1x7nHhTwmmKRPu27ceFxpFow@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.21.1911251155440.2817@hp-x360n>

On Mon, Nov 25, 2019 at 9:11 PM Kenneth R. Crudup <kenny@panix.com> wrote:
>
>
> On Mon, 25 Nov 2019, Kenneth R. Crudup wrote:
>
> > I'll keep testing it (and the best way to get something to break is to
> > proclaim it's "fixed" :)
>
> ... grumble ...!
>
> So, put the laptop to sleep, put it in my bag[1], then head off to go work.
> Get to where I'm working, plug in the power meter, it's now drawing 150mA
> while idle ...  uh oh. Sure enough, open the lid, hit some keys, dead. Had
> to do a long- power-button reset to get it back up again. I note that it's
> now charging (I may not have allowed the battery to drain enough for the
> charging circuit think the battery's discharged enough to begin a charge
> cycle before).

It looks like the platform has problems with switching power between
AC and battery while suspended.  Also this appears to be related to
the EC.

Also I'm wondering if the problem is reproducible with ec_no_wakeup
and the last patch I posted applied.

> I'm going to go back to the original patch (the three removed lines) for now
> (which may not do any better long-term, but I'll have to at least try.

The last patch I posted is orthogonal to this.  It actually should be
entirely transparent on systems without any issues.

But with that patch applied, please try to comment out the
acpi_s2idle_sync() in acpi_s2idle_wake() and retest.

> [1] - I can let it sit idle at home and it'll be OK, but when I put it in
> my bag and go somewhere it always seems to be the trigger for failed resumes
> I have no idea why.
>
> BTW, what was different about your 2nd patch (the addition of acpi_s2idle_sync()
> to the resume cycle) was I was getting WMI power events captured during
> resume in the EC blocked/unblocked path, which hadn't happened before:

That's because of the added ACPI events flushing in acpi_s2idle_restore().

> -----
> Nov 25 10:16:56 hp-x360n kernel: [ 4418.792164] PM: suspend entry (s2idle)
> Nov 25 10:16:56 hp-x360n kernel: [ 4418.801869] Filesystems sync: 0.009 seconds
> Nov 25 10:17:29 hp-x360n kernel: [ 4418.802615] Freezing user space processes ... (elapsed 0.002 seconds) done.
> Nov 25 10:17:29 hp-x360n kernel: [ 4418.805200] OOM killer disabled.
> Nov 25 10:17:29 hp-x360n kernel: [ 4418.805201] Freezing remaining freezable tasks ... (elapsed 0.000 seconds) done.
> Nov 25 10:17:29 hp-x360n kernel: [ 4418.806127] printk: Suspending console(s) (use no_console_suspend to debug)
> Nov 25 10:17:29 hp-x360n kernel: [ 4418.817183] [drm] GuC communication disabled
> Nov 25 10:17:29 hp-x360n kernel: [ 4419.296506] ACPI: EC: interrupt blocked
> *** Nov 25 10:17:29 hp-x360n kernel: [ 4440.111494] hp_wmi_notify(): event_id 0x20001, event_data 0x00000000
> *** Nov 25 10:17:29 hp-x360n kernel: [ 4440.111496] hp_wmi: Unknown event_id - 131073 - 0x0

This looks kind of weird.

Do you get similar "unknown" events during normal operation too?

Anyway, hp_wmi is involved and I'm quite unsure if it is ready to
handle events during acpi_s2idle_wake(), so that's why it may not work
every time with the last patch applied.

> *** Nov 25 10:17:29 hp-x360n kernel: [ 4440.198013] hp_wmi_notify(): event_id 0x03, event_data 0x00000000
> Nov 25 10:17:29 hp-x360n kernel: [ 4449.527844] ACPI: EC: interrupt unblocked
> Nov 25 10:17:29 hp-x360n kernel: [ 4451.118846] intel_pmc_core INT33A1:00: CPU did not enter SLP_S0!!! (S0ix cnt=0)
> Nov 25 10:17:29 hp-x360n kernel: [ 4451.126383] usb usb3: root hub lost power or was reset
> Nov 25 10:17:29 hp-x360n kernel: [ 4451.126384] usb usb4: root hub lost power or was reset
> Nov 25 10:17:29 hp-x360n kernel: [ 4451.127298] [drm] GuC communication enabled
> Nov 25 10:17:29 hp-x360n kernel: [ 4451.127400] i915 0000:00:02.0: GuC firmware i915/kbl_guc_33.0.0.bin version 33.0 subm
> ission:disabled
> Nov 25 10:17:29 hp-x360n kernel: [ 4451.127401] i915 0000:00:02.0: HuC firmware i915/kbl_huc_ver02_00_1810.bin version 2.
> 0 authenticated:yes
> Nov 25 10:17:29 hp-x360n kernel: [ 4452.229576] OOM killer enabled.
> Nov 25 10:17:29 hp-x360n kernel: [ 4452.229577] Restarting tasks ... done.
> Nov 25 10:17:29 hp-x360n auto-rotate[15448]: normal
> Nov 25 10:17:29 hp-x360n kernel: [ 4452.256340] thermal thermal_zone7: failed to read out thermal zone (-61)
> Nov 25 10:17:29 hp-x360n systemd-udevd[18777]: Process '/usr/sbin/tlp auto' failed with exit code 4.
> Nov 25 10:17:29 hp-x360n systemd-udevd[18777]: Process '/usr/sbin/tlp auto' failed with exit code 4.
> Nov 25 10:17:29 hp-x360n systemd-sleep[18673]: System resumed.
> Nov 25 10:17:29 hp-x360n kernel: [ 4452.313345] PM: suspend exit
> ----
>
> (best I can tell, event_id 0x20001 is a charger unplug event and event_id 0x03 is a charger plug event).
>
> BTW, is ther any way to determine if this is an issue with some other driver? I'd think I'd be getting BUG_ON()s
> if that were it, though.

Not necessarily.

It appears to be related to hp_wmi as mentioned above.

  parent reply	other threads:[~2019-11-25 22:01 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-22  0:11 Help me fix a regression caused by 56b9918490 (PM: sleep: Simplify suspend-to-idle control flow) Kenneth R. Crudup
2019-11-22 10:12 ` Rafael J. Wysocki
2019-11-22 12:45   ` Rafael J. Wysocki
2019-11-22 17:35     ` Kenneth R. Crudup
2019-11-23 10:24     ` Kenneth R. Crudup
2019-11-24 16:02       ` Rafael J. Wysocki
2019-11-25  3:40         ` Kenneth R. Crudup
2019-11-25 13:27           ` Rafael J. Wysocki
2019-11-25 14:14             ` Rafael J. Wysocki
2019-11-25 18:27               ` Kenneth R. Crudup
2019-11-25 20:11                 ` Kenneth R. Crudup
2019-11-25 20:19                   ` Kenneth R. Crudup
2019-11-25 22:01                   ` Rafael J. Wysocki [this message]
2019-11-25 23:32                     ` Kenneth R. Crudup
2019-11-26  8:50                       ` Rafael J. Wysocki
2019-11-26 16:12                         ` Rafael J. Wysocki
2019-11-26 16:15                         ` Kenneth R. Crudup
2019-11-26 16:27                           ` Rafael J. Wysocki
2019-11-26 16:35                             ` Kenneth R. Crudup
2019-11-26 18:48                               ` Rafael J. Wysocki
2019-11-26 19:03                                 ` Kenneth R. Crudup
2019-11-26 19:09                                   ` Rafael J. Wysocki
2019-11-26 19:13                                     ` Kenneth R. Crudup
2019-11-26 19:45                                     ` Kenneth R. Crudup
2019-11-26 23:56                                     ` Kenneth R. Crudup
2019-11-27  2:35                                       ` Kenneth R. Crudup
2019-11-27  8:31                                         ` Rafael J. Wysocki
2019-11-27 22:30                                           ` Kenneth R. Crudup
2019-11-28 16:25                                             ` Rafael J. Wysocki
2019-11-25 21:47                 ` Rafael J. Wysocki
2019-11-25 16:21             ` Kenneth R. Crudup
2019-11-25 21:46               ` Rafael J. Wysocki
2019-11-25 23:02                 ` Kenneth R. Crudup
2019-11-26  8:53                   ` Rafael J. Wysocki
2019-11-25  5:50         ` Kenneth R. Crudup
2019-11-25  7:17           ` Kenneth R. Crudup
2019-11-22 17:29   ` Kenneth R. Crudup

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='CAJZ5v0hMR8_i=oA1ovX0-xfa_w1x7nHhTwmmKRPu27ceFxpFow@mail.gmail.com' \
    --to=rafael@kernel.org \
    --cc=kenny@panix.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rjw@rjwysocki.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.