Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1648009ybj; Wed, 6 May 2020 02:36:47 -0700 (PDT) X-Google-Smtp-Source: APiQypJqDUXoOGYlo/NtNjzcMTyeRjx+6/n/Sk6khps2qGBiSEdT3ROhJ01jpWYU9yYcD0Ai8ly9 X-Received: by 2002:a05:6402:749:: with SMTP id p9mr5729409edy.75.1588757807341; Wed, 06 May 2020 02:36:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588757807; cv=none; d=google.com; s=arc-20160816; b=Jo4lcqV4ckfAayClfYHKdPbFwIqv+KYhtB2VcObswKQG4EYz/Sw0rKp4ma6o15UXO0 cXV7ryMpetplm167K1uGN8Wafgtu/nyFkfcANvuID39m1rb85VaGdhw/9HIt4N5bNr6D 0NYn/X0dO14ApkCFkS3ah0XHSv/VmMkToKtJrs8TlV1gY+eEg3jIugtZkAY3JhDbLF7I monYiydpgjJmiELl2VcxiU1LJ22nq2toBLNpUhpka8geNAp2xZjZv5dyumPhIzLbHbYL /vwwrfq9E74nym87/fARRd38W/t9ynvAQHzT5R7OTPPjHWLQJBLDqUjJJlsWF3GA9fI+ 76WA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=e0cp8+eLp6spEAhT31IJ6eCca6B3J7assOLUD7HR8XU=; b=qhlLMM/hRl9ICe8pRvm8yXfpbv34TOX4/Sr74/8trpEw1HGfjeXCTgyDes1Qkn5mUT KdOBAomB3PCUbula7qUS+gRvnvIFYoEvy7M+CviP3dX3gCvpZJgJ4e/nOB1WzL8mp0gP XPnnSoNzgY0HKbNssBA8p68wJlPLLnXNvU49bNHV7CCrpGPx0QUlMQ5c2wPezn6sst4E 3pVojBqYcmYGkgFqIEv7i6voJ0FDNSSbkCW7s1swBbocKNiQ1JqhM99Nw9daFQBrJpCl iVLkuNpm1X0XnL6+Bs7oN6IZ0uqI3dGxCf++JLFobpsCxCmSYy4w1M3xFMIglpxLFdlz i6JQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ce9si811628ejc.139.2020.05.06.02.36.23; Wed, 06 May 2020 02:36:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729017AbgEFJcV (ORCPT + 99 others); Wed, 6 May 2020 05:32:21 -0400 Received: from mail-oi1-f194.google.com ([209.85.167.194]:45669 "EHLO mail-oi1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728640AbgEFJcV (ORCPT ); Wed, 6 May 2020 05:32:21 -0400 Received: by mail-oi1-f194.google.com with SMTP id k133so942340oih.12; Wed, 06 May 2020 02:32:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=e0cp8+eLp6spEAhT31IJ6eCca6B3J7assOLUD7HR8XU=; b=ASaBVk67DvMTi2+DmnWBpZupZskxPEGDCsHZYCYYmD+Ug5FqK18H9TzP9m+pGJRA7d MHEr8L1ozcFxT51jDNFVdZE6tovC8GjlgTBPB2sEg5Eo8lNewp90uJcE+7qHjd0BCi31 as/AtJ9i/oJWTZzaYqGapDGOmy/V/qNQaG0ugi2Oymm9hs+/hq2GXpaS0dAbHUXq2GJ9 j/pMGZggpgt4EhjoiAF5Lz5MOr/VbNXECkGrOxZG/b1mGv1hpAP8bNBqvuYlv/vuXVyl fTcKwbiPEEPrlfq3JZL6La8o9QRhnve7QEWoTxxsmonqX/jWU7Risw4TxO3JNW20k6Li WsUA== X-Gm-Message-State: AGi0PuZgEqEJ/Bie5m196SSfVKa51m8TSiM4xie/LM0/yPyjra0APyFg derZSwJbnc8lgUi0utPkoFgZf0OV81BU2eLeyRo= X-Received: by 2002:aca:c441:: with SMTP id u62mr2161265oif.110.1588757539104; Wed, 06 May 2020 02:32:19 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "Rafael J. Wysocki" Date: Wed, 6 May 2020 11:32:07 +0200 Message-ID: Subject: Re: System fails to exit s2idle by a keystroke on my laptop To: Chris Chiu Cc: "Rafael J. Wysocki" , seth.forshee@canonical.com, Len Brown , ACPI Devel Maling List , Linux Kernel , Linux Upstreaming Team Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 4, 2020 at 7:09 PM Chris Chiu wrote: > > 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. Thanks for the report, the issue evidently is EC-related. > @@ -1024,7 +1024,7 @@ static bool acpi_s2idle_wake(void) > * regarded as a spurious one. > */ > if (!acpi_ec_dispatch_gpe()) > - return false; > + return true; Have you tried commenting out simply removing the if () check and the following return statement? If not, can you please try this and see what happens? > > /* > * Cancel the wakeup and process all pending events in case >