Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp1744014imm; Fri, 6 Jul 2018 05:51:53 -0700 (PDT) X-Google-Smtp-Source: AAOMgpewHE0vT8o1cAmpxflDhIYBuP0gS7SGoM1jLd7REyyFwfpm8xGC1PwLy0F0zpbKrg1mikEL X-Received: by 2002:a17:902:28ea:: with SMTP id f97-v6mr9892101plb.55.1530881513610; Fri, 06 Jul 2018 05:51:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530881513; cv=none; d=google.com; s=arc-20160816; b=zIRY4a573AsVjwRShuaWeEZ+FXgiCTXU2AQ5jv925nKSwmJBHW0X8i6vObr1wTODJR V5b+RvJ1K1mU0Y+Dn2hAY4QdeF5/ynsDBAFTlCJDeugHD+C66R63MMiuRvrXN6IO8lbA HOOScoadppQpJ1rPZedjiW014kVIZJBGVCbNhu9K0pINqIhiYOS6kJUWy346Dmm4nN48 XxyitlHF6dxFCkWWJ5cjVvMI0IhSOb6e7hT0QS+LuuArnqh67h7DqPK5x9a5cX5+uqKR yGfo4UJA5SqZz93aB3e8FB4HlGEOEYC5SlfesnFwTqaJP+fn72umFTN0F1MGUoP+kR6T glsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject :arc-authentication-results; bh=0ekjc/HLShOqw7zIXV3Dhm5sU55KZNp/KPcSryusTxA=; b=nqCCClUOF5UAM7FcAtDDyTS4bRNyT9KwNhZCrZ/mx/zdpByq23K7+RiRxfOtkGtslp bE3ArwjO31svDxvLWuk+Rzrr2OhEDDnwAJPG8GQk4PZQtGxHq9fQoWfPC/7oFQJ21n+W wikmeFDKzbgnoqBqAFyIkMPb+oZo5lujjZlIiHbesbU7ueo6GKk6kHIUnVNIVy6snEOh OlLN6aVmyXSNoYdt6kmrXZScfqc/bRmEj4ipX5JPLZkuZ//42aHPmagvVs6v30baaOYF lnR6LjQPRxLTWSLXbzdtlTCWmUQB/QWfVfwr2RhXkzryKBQr2amYHHwUR2cY35bs2kd0 dAgg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h16-v6si8034928pgb.39.2018.07.06.05.51.38; Fri, 06 Jul 2018 05:51:53 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933311AbeGFMtz convert rfc822-to-8bit (ORCPT + 99 others); Fri, 6 Jul 2018 08:49:55 -0400 Received: from mail2.cosifan.de ([85.239.105.221]:40370 "EHLO mail.cosifan.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932569AbeGFMty (ORCPT ); Fri, 6 Jul 2018 08:49:54 -0400 X-Virus-Scanned: amavisd-new at cosifan.de Received: from [192.168.216.41] (unknown [192.168.216.41]) by mail.cosifan.de (Postfix) with ESMTPSA id C1A88A1602; Fri, 6 Jul 2018 14:49:42 +0200 (CEST) Subject: Re: [REGRESSION 4.17] Spurious wakeup / reboot with power button To: "Rafael J. Wysocki" Cc: Takashi Iwai , Erik Schmauss , Linux PM , Linux Kernel Mailing List , Linux ACPI References: <7049b672-859c-e049-a391-f66e4336d4a9@cosifan.de> <1704080.gFTvVrrZA1@aspire.rjw.lan> From: =?UTF-8?Q?Thomas_H=c3=a4nig?= Openpgp: preference=signencrypt Autocrypt: addr=haenig@cosifan.de; pr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NfSNKM7hHF69dbWbutOUg/Eg0fMvKrsdjm F/XA0VlF03XXgw6xTNwuca4v4IAG6pxVpC7CRgQYEQIABgUCPLw2iAAKCRCgtpJomYiNNunp AJ4piTdHnixDPkGiNgVNA4iW7P+hAwCfRGZcwHPpxIqnDkeibEmvO6qcRYs= Message-ID: <6f01a906-b27c-0e1a-e9f6-fa27c015faa3@cosifan.de> Date: Fri, 6 Jul 2018 14:49:42 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <1704080.gFTvVrrZA1@aspire.rjw.lan> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 06.07.2018 um 14:13 schrieb Rafael J. Wysocki: > On Friday, July 6, 2018 1:21:50 PM CEST Rafael J. Wysocki wrote: >> On Fri, Jul 6, 2018 at 1:12 PM, Thomas Hänig wrote: > > [cut] > >> So the latest patch: >> >> https://patchwork.kernel.org/patch/10511211/ >> >> should work for you (please verify) and the change in >> drivers/acpi/sleep.c in it most likely is not necessary. >> >> If you can confirm that this one works for you, I'll send a smaller >> one with the acpi_hw_legacy_sleep() part alone. > > Well, scratch this, sorry. > > The power button probably is a fixed event and it won't be effected by > that patch. > > Instead, please test the patch below. > > --- > drivers/acpi/acpica/hwsleep.c | 15 +++++++++++---- > 1 file changed, 11 insertions(+), 4 deletions(-) > > Index: linux-pm/drivers/acpi/acpica/hwsleep.c > =================================================================== > --- linux-pm.orig/drivers/acpi/acpica/hwsleep.c > +++ linux-pm/drivers/acpi/acpica/hwsleep.c > @@ -51,16 +51,23 @@ acpi_status acpi_hw_legacy_sleep(u8 slee > return_ACPI_STATUS(status); > } > > - /* > - * 1) Disable all GPEs > - * 2) Enable all wakeup GPEs > - */ > + /* Disable all GPEs */ > status = acpi_hw_disable_all_gpes(); > if (ACPI_FAILURE(status)) { > return_ACPI_STATUS(status); > } > + /* > + * If the target sleep state is S5, clear all GPEs and fixed events too > + */ > + if (sleep_state == ACPI_STATE_S5) { > + status = acpi_hw_clear_acpi_status(); > + if (ACPI_FAILURE(status)) { > + return_ACPI_STATUS(status); > + } > + } > acpi_gbl_system_awake_and_running = FALSE; > > + /* Enable all wakeup GPEs */ > status = acpi_hw_enable_all_wakeup_gpes(); > if (ACPI_FAILURE(status)) { > return_ACPI_STATUS(status); > after cancelling the build with patch 10511211 and rolling everything back, I applied the patch above to my kernel 4.17.3-1-default and when pressing the power button the system shuts down and stays off! :-) Thanks Thomas