Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp745453imm; Thu, 5 Jul 2018 08:11:49 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeyAYVZvp7NSqspp6XVjWkV70uS4szYxGVgCPOh7BNr5RPbJ+LtrUebtoHpdCgysrNfytTr X-Received: by 2002:a62:4083:: with SMTP id f3-v6mr4328412pfd.229.1530803509193; Thu, 05 Jul 2018 08:11:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530803509; cv=none; d=google.com; s=arc-20160816; b=ZGYZFzIyRvTuxQ00wvMTfWWIFhnMs9ic8DA6A5cY5vBNynbkc656kV6QDDnHfPr/rS +ApG1BKxZmXOpDZwonVQxC6eKhn2g26OXPhL6oU1Om+j07xox78ZS+Ovki4aJWOxv5uC Z3YzL/vxO56bGYriuVU1oRHQRMjXMUFsE06Qr7PE5HjuogmqwSfX09SQP8KLPsu0rfCK JXASPP/fqenmdzCmnOe+yrPx9rU73m0rqiwX2Nu2sRxY6hjUHgg517Vm2zLhDz2A0QjD DTLFaxY2G7icGq8v94RbKwD1aE6PGYUWwXQ0mm2rYD7iPUt8q58Iz1KBc6mcrdmTPslQ peMg== 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 :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=6OZFBje0pznb7nNKxAn4oHr1435wc3TX7CS4LEBzkHw=; b=WLG7t3URnXuCekMUVUjGkGYUwb647vWi+awKWeQxAOC+PCeiWjWeYi8mnVkCkvWkld 9q1MMTSAhJBesI+ExkgSk6+uOJ5mLJN+XQER8Cs4fq7IMchMwI3nZekiPiUk801rVn4o OSocYfojZZALbxI/8iFlaWrqCg7rzb4i8TSef9nr8mvQnAVWqzBeDS5mt8iLUE9HUwsf vBmqg9dziC0xO1XZRtU6TlP9no9KKgdzX7mWXAeKphOAaXhY/tt2cI/S01eb1dFUUNDu u9G3DlunDfjSc8ff4dTJYOvajuVHhAhTwaIfPqfo78ik1utvBh/XIwQOFh15juVOnw2h MP0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=W0wqxpRq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j61-v6si6210083plb.68.2018.07.05.08.11.34; Thu, 05 Jul 2018 08:11:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=W0wqxpRq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754135AbeGEPKX (ORCPT + 99 others); Thu, 5 Jul 2018 11:10:23 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:38344 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753874AbeGEPKW (ORCPT ); Thu, 5 Jul 2018 11:10:22 -0400 Received: by mail-oi0-f65.google.com with SMTP id v8-v6so17536421oie.5; Thu, 05 Jul 2018 08:10:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=6OZFBje0pznb7nNKxAn4oHr1435wc3TX7CS4LEBzkHw=; b=W0wqxpRqk2efC7UplTUHVZeC2WQMWVj64QH/S0S3YydFvmEuVkux4QAVbeidfKC4wI HWQTK+A2peECMcb3Kcok3xCg12G398+mQotDka6nxKeW/wp9E7506BzkCLAA3hD8Rxpe lz+JAMjy2GtbJtSrUiuemiDUCyeB/RBgbv0o1nrzSxDvc1rO6Is4/MVnVUMHEk35ugAi exnNu+Ev6gEixK3AdQVxeis71IKSJu7zGoXl11w6gurJdI2tiM1Z04L7boBGrx7Mjrnh fFpGxlFuxgca5YcAKrEdPTDwQJFNJKTn/n0jcJFBvTLpL5/7DXUk+rIG1NUVLfH/eXbg f2CA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=6OZFBje0pznb7nNKxAn4oHr1435wc3TX7CS4LEBzkHw=; b=OlsDAtNJf/ShxWIRqXpeRPmPusytjdroh8gk2Bh39H9pHPKizrR1d32m1Vy4O6yYDG adVl6ogva97PY2w3DZqNB9ovDkYqM/BRqocLQOwMJbr/tfzyZ8dQ2Fcus4vGlZgkCice A4f11CvC25F5GqzSZbPP3k2wBXVDYxB1Qfx+usXv+0FQzQD03h0Xs1YN9RDcV8yf2vaE rLx+m8YAEsfBFGbxSa/LGmnvIGQ4TY6AmsqsOZAYp2OGu4w7VxwKNlEblm3mCF8UKDKD J1l6V3k5hiV1kmZ1AUVbAcl0e7tyr7a16NjGj9gz0BB23EQSWIWjMb3B0CnxeuatUk5+ bpYQ== X-Gm-Message-State: APt69E1wZWj3pA4f/GANAIOClTZprwXdXcvkBk3kENuKGEWqtvX1SHKx 9D5sAdjcX65da0a/0DrbEYcCVo1xdTaKSNZCepk= X-Received: by 2002:aca:5b0b:: with SMTP id p11-v6mr7766218oib.116.1530803421307; Thu, 05 Jul 2018 08:10:21 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:63d2:0:0:0:0:0 with HTTP; Thu, 5 Jul 2018 08:10:20 -0700 (PDT) In-Reply-To: References: <1999215.6UrMtQZ5Bj@aspire.rjw.lan> From: "Rafael J. Wysocki" Date: Thu, 5 Jul 2018 17:10:20 +0200 X-Google-Sender-Auth: Xw_lt3xekggequfUCfG63KsPknQ Message-ID: Subject: Re: [REGRESSION 4.17] Spurious wakeup / reboot with power button To: Takashi Iwai Cc: Thomas H4nig , Erik Schmauss , Lv Zheng , "Rafael J. Wysocki" , "Rafael J. Wysocki" , Linux PM , Linux Kernel Mailing List 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 Thu, Jul 5, 2018 at 5:09 PM, Takashi Iwai wrote: > On Thu, 05 Jul 2018 16:00:14 +0200, > Thomas H4nig wrote: >> >> Am 05.07.2018 um 14:12 schrieb Takashi Iwai: >> > On Thu, 05 Jul 2018 12:41:03 +0200, >> > Rafael J. Wysocki wrote: >> >> >> >> On Thursday, July 5, 2018 11:50:11 AM CEST Takashi Iwai wrote: >> >>> On Thu, 05 Jul 2018 11:34:59 +0200, >> >>> Rafael J. Wysocki wrote: >> >>>> >> >>>> Hi, >> >>>> >> >>>> On Thu, Jul 5, 2018 at 9:05 AM, Takashi Iwai wrote: >> >>>>> Hi, >> >>>>> >> >>>>> we've got a regression report since 4.17 about the behavior of >> >>>>> power-off with the power button. When a machine is powered off with >> >>>>> the power button on desktop, it reboots after a few seconds instead of >> >>>>> power down. >> >>>>> >> >>>>> The manual power down via "systemctl poweroff" works fine, so it's >> >>>>> possibly some spurious wakeup by the power button action, and some >> >>>>> ACPI-related change is suspected. >> >>>>> The regression still remains in 4.18-rc3. >> >>>> >> >>>> There are only a few ACPI commits directly related to power management >> >>>> between 4.16 and 4.17 and none of them looks particularly suspicious. >> >>> >> >>> OK, interesting. >> >>> >> >>>> It looks like the power button state may not be cleared sufficiently >> >>>> after it's been pressed which is now visible for some reason. >> >>> >> >>> Hmm, where can such a state remain? Since it happens after the >> >>> machine turned off, some (ACPI) wakeup bits? >> >> >> >> Basically, yes. >> >> >> >> It looks like a GPE may remain active which then triggers wakeup after >> >> shutdown. >> >> >> >> On a hunch, I'm wondering if reverting commit >> >> >> >> 18996f2db918 ACPICA: Events: Stop unconditionally clearing ACPI IRQs during suspend/resume >> >> >> >> (may not revert clearly, though) makes any difference. >> > >> > OK, I'm building a 4.17.x test kernel with that revert, in OBS >> > home:tiwai:bsc1099930 repo. >> > >> > Thomas, could you try later the kernel in >> > http://download.opensuse.org/repositories/home:/tiwai:/bsc1099930/standard/ >> > ? It'll take an hour or so until the build finishes. >> >> With your new built kernel >> 4.17.4-1.g6f23755-default >> >> the power button works again, so the revert solved the problem > > Thanks, that clarifies the cause. > Adding Erik and Lv to Cc. > > I guess it's the side-effect by removing > acpi_ev_walk_gpe_list(acpi_hw_clear_gpe_block, NULL); > in acpi_hw_disable_all_gpes(). > > This function is called from acpi_power_off_prepare(), and the machine > goes to power off without clearing the GPEs, hence it's woken up later > unexpectedly. That's correct. We need to fix up that commit. I'll try to prepare something.