Linux-ACPI Archive on lore.kernel.org
 help / color / Atom feed
From: Chris Chiu <chiu@endlessm.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	seth.forshee@canonical.com, Len Brown <lenb@kernel.org>
Cc: ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	Linux Upstreaming Team <linux@endlessm.com>
Subject: System fails to exit s2idle by a keystroke on my laptop
Date: Tue, 5 May 2020 01:09:30 +0800
Message-ID: <CAB4CAwdqo7=MvyG_PE+PGVfeA17AHF5i5JucgaKqqMX6mjArbQ@mail.gmail.com> (raw)

Hi,
    I have an Intel X5-Z8350 laptop which used to work fine on s2idle
enter/exit with kernel 5.3. After upgrading to kernel 5.4 and later,
the system can still exit s2idle by power button. However, if I try to
wake it up from a keystroke, the system will freeze and then no longer
respond even to the power button. I can only shut it down and power on
again.

    I tried to 'git bisect' to find out which commit causes the
difference, it shows me the commit "ACPI: PM: s2idle: Prevent spurious
SCIs from waking up the system". My laptop can work as usual to exit
s2idle by a keystroke with reverting it on kernel 5.4.

    Then I tried to check whether I can reproduce it on the latest
mainline kernel, the same problem still there. But I can not fix it by
simply reverting. I found the acpi_s2idle_wake() has been refined on
the latest mainline kernel, and I have to make modifications as
follows to make my laptop work.

@@ -1024,7 +1024,7 @@ static bool acpi_s2idle_wake(void)
                 * regarded as a spurious one.
                 */
                if (!acpi_ec_dispatch_gpe())
-                       return false;
+                       return true;

                /*
                 * Cancel the wakeup and process all pending events in case

    Maybe there's something special on my laptop so a keystroke is
considered as a spurious event on this machine? Don't know if the DSDT
helps or not.
https://gist.github.com/mschiu77/de8af6da78be12cf442853e7747f76ed

    Please let me know if there's anything I can help to address this
problem. Thanks

Chris

             reply index

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-04 17:09 Chris Chiu [this message]
2020-05-06  9:32 ` Rafael J. Wysocki
2020-05-06 10:19   ` Rafael J. Wysocki
2020-05-07  3:38     ` Chris Chiu
2020-05-07 18:05       ` Rafael J. Wysocki
2020-05-08  8:22         ` Chris Chiu
2020-05-08 16:50           ` Rafael J. Wysocki
2020-05-11  6:54             ` Chris Chiu
2020-05-11  8:10               ` 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='CAB4CAwdqo7=MvyG_PE+PGVfeA17AHF5i5JucgaKqqMX6mjArbQ@mail.gmail.com' \
    --to=chiu@endlessm.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@endlessm.com \
    --cc=rjw@rjwysocki.net \
    --cc=seth.forshee@canonical.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

Linux-ACPI Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-acpi/0 linux-acpi/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-acpi linux-acpi/ https://lore.kernel.org/linux-acpi \
		linux-acpi@vger.kernel.org
	public-inbox-index linux-acpi

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-acpi


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git