Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1683500ybj; Wed, 6 May 2020 03:22:54 -0700 (PDT) X-Google-Smtp-Source: APiQypKcmHLC7JBvUj3Tyf5FnsXhPIDJan6wrYEfX/b0iX8tMUEuC/bgMjDlwqKh4hTTwvvIyc1o X-Received: by 2002:a17:906:1696:: with SMTP id s22mr6428519ejd.302.1588760574705; Wed, 06 May 2020 03:22:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588760574; cv=none; d=google.com; s=arc-20160816; b=yQ4twXYpzxUcAjes0YElTcN+D1uPptzyOHpx9kqW6PlyLwAY1SgeFDtcwwm3gPqRI4 PgqEnslRDmzwTbiuqg/4TjaUH4KvsAsun9gVTyRvxWHC27QiAN/g+DOGgVcBZxIvHTg4 w8KqI4uSx5k2GN+Ra3pCH9M9a4EO9VsmkKGB/KSSEon4jpzXdMCKfCM6LbOUxALZ5sFL dLKaVdu3uGRuDaH0yCnlz7IX+DIUnpGyTZPfOmI3yqcgsmj5o465dUwTly8LNgMn7IWF SNmsDQOaSN5bMGWuu/VJ9ebq0jd9gHxwwq+k0zOMqDD69vLVSbE0CRSlPZXDKK9w4vxV rmXw== 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=3Jd+W5BzC4qZWaXd8mMr44l3QHyMyxsGcV2SIRL+Ey0=; b=jcrsIjJwBlt8hyTxIHWXxmhkAIHZpM8RyM7mvCuTVHh4hQBn7xc3/tfj/234GdIV/F ueKjCTBaIAfP6SOlsJjzCEpFYSpszeNnbK5L0iawYjKLbKjy5mpbJj6oe9/wvbkoGYUK yHuXrPecKR9vOmZ02dR8MDoDygt+XDGKVc+fB5QUvShGEpdSHbjYzlqtXwOhycNHXyo8 0ewSBHlsdaMxM8AGZRINvTalUeDuJSIs7aAquw+cFO6OcIKm37gq8pw7OQTlTkj+IIuB 9+heff3wfS4hzJ0uSvqcwpke9b4KDdqQni0TDq7gxV4gLisorNJMDgrY2OaNzdngH26N nPNw== 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 y13si735146edq.430.2020.05.06.03.22.31; Wed, 06 May 2020 03:22:54 -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 S1728915AbgEFKTw (ORCPT + 99 others); Wed, 6 May 2020 06:19:52 -0400 Received: from mail-ot1-f68.google.com ([209.85.210.68]:41640 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728306AbgEFKTv (ORCPT ); Wed, 6 May 2020 06:19:51 -0400 Received: by mail-ot1-f68.google.com with SMTP id c3so898102otp.8; Wed, 06 May 2020 03:19:51 -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=3Jd+W5BzC4qZWaXd8mMr44l3QHyMyxsGcV2SIRL+Ey0=; b=HS9sQ6QNtzhxPTOrFzimcPyjkde76rY2YfbyWAlGvMUi1HWS5oZvBrQb2VYI4h5PCj j6VssnVkjz+74it0D3U55CKKbURgqvTOqMs8Yoq4Y/l6aOUXaPNzUmVVfHcKTwyfZCi3 P8lxVP7uCbEQ9ys60Q9EjzBdtffF7hhVDJnKq6YZLj6gp5Sj3njn48u7DC6gVjWV8bTw YEblCZRRz0CZLUgBF7vmmKQcIRFFxs1p85eMe2xtndbSuUSNLgNVsmdpPT4qm+WXTeIx GY81QoCFkUUYy9Di/pirenieV3FgoLZrGU6/Chycf+2Tw5LlhSt+HXmhGJCNZ3WtylXa 97Cg== X-Gm-Message-State: AGi0PuaxlAPxGqcMBLuXHydbUeLtLbshKZsqKBaxsf5Uf6nXcHngoVJM hYYkCX3+TG/aUReHqPq2HqDXx2aY4/md6tR43c3Apg== X-Received: by 2002:a9d:112:: with SMTP id 18mr5482997otu.167.1588760390910; Wed, 06 May 2020 03:19:50 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "Rafael J. Wysocki" Date: Wed, 6 May 2020 12:19:39 +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 Wed, May 6, 2020 at 11:32 AM Rafael J. Wysocki wrote: > > 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? Scratch that. Instead, please try doing acpi_ec_dispatch_gpe() instead of the if () and the following return statement.