linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: "Kenneth R. Crudup" <kenny@panix.com>
Cc: Rafael Wysocki <rafael.j.wysocki@intel.com>,
	Linux PM <linux-pm@vger.kernel.org>
Subject: Re: Help me help you debug what seems to be an EC resume issue
Date: Thu, 19 Sep 2019 09:39:56 +0200	[thread overview]
Message-ID: <CAJZ5v0gYGPkJ0-=HSzFCpMLqky2Q6JN3qnov3c2ZaUAeCeaSag@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.21.1909181742470.2771@hp-x360n>

On Thu, Sep 19, 2019 at 3:24 AM Kenneth R. Crudup <kenny@panix.com> wrote:
>
>
> I have a 2019-era HP Spectre X360 13". I generally like it, but it's plagued
> with "Modern Suspend" (s2idle) instead of a genuine S3, and as such I'm doing
> whatever I (and you and Linux' PM) can to keep the power consumption down during
> "suspend" (for now, "rfkill block all" before suspending, and removing the
> XHC[I] as a wakeup source via "/proc/acpi/wakeup" during boot).

You may still be able to use S3 on this machine if that's supported by
the platform firmware.

If reading from /sys/power/mem_sleep returns something like "[s2idle] deep" do

# echo deep > /sys/power/mem_sleep

(as root) and then it should change to "s2idle [deep]".  In that
configuration, try to suspend and see if you can wake up etc and if it
works reliably, you may use it going forward (in which case you'll
probably want to add mem_sleep_default=deep to the kernel command line
persistently).

> I bought one of those USB-C inline power meters and I can tell when the system
> is burning more power than "normal" - on a full-charged battery during s2idle
> it draws ~30-50 mA @ 20v, and if I see more than that I know something is amiss,
> even though the laptop (and dmesg) think it's fully suspended.
>
> I'm running the tip of Linus' tree as of now (b60fe990c6b07) and it's got
> your latest PM/s2idle fixes in it. Before these commits, I used to set
> "acpi.ec_no_wakeup=1" because the orientation sensor (at least, and probably
> other things) would wake up the laptop (then immediately suspend), which
> I'm sure was using up battery while I'm just walking around.
>
> I've turned off "ec_no_wakeup" for testing and the good news is the orientation
> sensor doesn't cause the laptop to draw more power when shaking it.
>
> However:
>
> - Randomly, it'll draw 250-300 mA when suspended, vs. the 30-50 mA
> - Randomly, if left suspended, nothing other than a hard power off will get
>   it back (and I can't be sure, but I think current consumption can be normal
>   when it suspends, but this seems to only happen if I've unplugged the
>   charger after suspending (so no power meter)).
>
> I have pstore set up to catch BUG_*/oopses and save them away on boots, but
> nothing comes thru, so I'm guessing it's just hanging somewhere either on
> suspend or resume.
>
> What can I do to diagnose where it's getting hung up? It appears my normal
> "ec_no_wakeup=1" case has no such issues, but I wouldn't mind being able to
> resume via the lid switch again.

I would recommend to try 5.4-rc1 when it's out to see if the problems
above are still there.

Cheers,
Rafael

  reply	other threads:[~2019-09-19  7:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-19  1:05 Help me help you debug what seems to be an EC resume issue Kenneth R. Crudup
2019-09-19  7:39 ` Rafael J. Wysocki [this message]
2019-09-19 11:46   ` Kenneth R. Crudup
2019-09-19 14:38     ` Rafael J. Wysocki
2019-09-19 16:09       ` Kenneth R. Crudup
2019-09-19 16:13       ` Kenneth R. Crudup
2019-09-19 16:35         ` Kenneth R. Crudup
2019-09-19 16:52           ` Kenneth R. Crudup
2019-09-19 16:53           ` Rafael J. Wysocki
2019-09-19 17:10             ` Kenneth R. Crudup
2019-09-19 17:13             ` 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='CAJZ5v0gYGPkJ0-=HSzFCpMLqky2Q6JN3qnov3c2ZaUAeCeaSag@mail.gmail.com' \
    --to=rafael@kernel.org \
    --cc=kenny@panix.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    /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).