Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp600511lqp; Wed, 12 Jun 2024 10:23:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX3bch3+utx/1rfv3qpugOkKFERu/gobbQb+M4cqDgxU707B9sSBgfIPdgnJppY8GBDXnaU8/FgRfttvkN6xwOXD/IpmAOWMQX6gPmyuA== X-Google-Smtp-Source: AGHT+IH54FbPFcYaaLBdAcbUyvoyAYi1rnI2d1QRJQyRmLfRsMETmx0YQQaQlc7hNfx+3lW//Fzy X-Received: by 2002:a2e:964d:0:b0:2ea:e383:3bbd with SMTP id 38308e7fff4ca-2ebfca602acmr13639101fa.46.1718213027471; Wed, 12 Jun 2024 10:23:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718213027; cv=pass; d=google.com; s=arc-20160816; b=UplWzcBV5o8m63HiUamg+AXjaGd/DNj93M8BGUL11cUdq5/RR212kDP9/MRVXR02bM Opz3aZ18BWb29VYA0Tn6uKoF4sHM8Q6SXnS24MLstEjDtKrmwymmyr7ruoSaUzz3xGHC ZwIoCDSmq/3+CoH1bZVzlgjgY70kdCeKtXfi07J4p12xpPYrkGBPTl3s7lwQm34OmzoR PFecBEgPSgY3xc7hkupcaLPUXlZ9j4neuT6tdT3LT47GAdjqwwUQAefPs4gPijlmSe5X BihHyoBQk6AZJ+niLPgM5XzKpE3rDKeNqcmsiE/dGqSWcAF0wZtkwAyFoCjY63WUiJhD pCrA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=SmhgWhV+k+k1Jn01Ck0bRn6varewMhGpbVWsepDCohQ=; fh=8Llyy14TLVRp09mnNuc2B9iIlT6+4sgrkkw9Jt2KBEI=; b=Q7Rr9B179rcpiCziQ0DaEzfGM5NtEuXRAPrpy0ygqTSWs+CKw9i8iGHGd58aFMGPm/ XA7oAMFGWWW5Efmi6hXp6lp/nzardw7qBglKrjCZ+pAQ5eyckRL3QUjrBW14sNehNn04 GcEqJ+lxUbHXIdNwVKusd3nBg3TG/57X2b97DpbiT1sv8DBFxvPP2aKUtV6CXzTzBPt0 Rte5avUcygGgC1fHwmgrdzdjnWMkpf6xMlTWt5MhRtuXYy3VqT/rT52Qoq1gEnEHoXkA Dr9jIKvLNHJwuGS8/A4LQpf4yqFdBmYHTH+I8dU7eHKEqx2lF1elDX2UsbPm/maf30ey WdBg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pqrTaVqb; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-211997-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211997-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57c5f7bae1csi5539205a12.188.2024.06.12.10.23.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 10:23:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-211997-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pqrTaVqb; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-211997-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211997-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 2F9D51F21E65 for ; Wed, 12 Jun 2024 17:23:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C9DC41822D2; Wed, 12 Jun 2024 17:23:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="pqrTaVqb" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EB3FD181BB3; Wed, 12 Jun 2024 17:23:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718213020; cv=none; b=Mdmlg/VVeVwnTsRBAVLMELn+hjql7mlKBjO/LDohSwYjfnE8ApZKaEfCCJYUArGZ3y4QhjBWfyuQ2Sz0rezghNdqG+Wns6lJD2/iSGcAn5IenW49VYChWhUIVCGsDrrq6FOrhcm3YGOWgR9k0ERQEB2gVXsQtq+WuNnjJ1GHi1k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718213020; c=relaxed/simple; bh=SmhgWhV+k+k1Jn01Ck0bRn6varewMhGpbVWsepDCohQ=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=g3sDqbfmFnMzPmE0DGAsvkphsvkw3t7xDLGx3efagXOdohSs2sIakU9rb8+WGir5I6/sPn0gF7ia0HMCefdgbzR23L3t6SF/5qqXxLTxIRwTm1OkctpTrlmT4m9Kh9lH4lPqNHmpmiPz19KYwzwh5pxA51HEWk9cjZ5xXlLlXrw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=pqrTaVqb; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 94953C4AF1A; Wed, 12 Jun 2024 17:23:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718213019; bh=SmhgWhV+k+k1Jn01Ck0bRn6varewMhGpbVWsepDCohQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=pqrTaVqbhIjv/5M8kgJm/nWlZnSpwPKvcvfMYVmqbQDycCvmXpxhINXk0quLhfJji 1tzAVwHYvTQgsXIAFqkJn1XZTdNgEiZWlgI04X/YzeTS91XRmErFPijdGVuxMV4xlT Fx+sQkld9jE73/EbIUyLBv3oLxx4puivwceUHjwZu8JjN6zgDb7AIoUBvooMLllAFq /Fs8A8/4om3TAYNL775gT2Z4Z0QRbBJSxKelhXDCoPcE7qiDklNkc0eclRMMxJKUw3 xrd4Zm29I4LsOkbZUCSGMQDMRZ0j7WBR6ia/TOnXdbkaq5LUGuvdoXqwcq1D83o4/Z H2A+c+5PqbVyg== Received: by mail-oo1-f41.google.com with SMTP id 006d021491bc7-5baf76164fbso16367eaf.1; Wed, 12 Jun 2024 10:23:39 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCVA4ZcvnHvngM8gCKcTfiNl/wpKcbYdq4a7dWHiLNnRN1veVs8MHcnGhsCG7cRH767eJTSS3QGNKXWhdiiJ5mC4rQw7BHLO5AG2WoP5 X-Gm-Message-State: AOJu0YxpkgS/4txa8yLVwN/vCnSc/+ySX+js3AoVe9eNo6htIhUxfOvM vBOP8F5aCIS+pMzFavrOFHGHk9ZQ3I1/oOVSjv64AM+U3eAnc20y2/s5HK7xwiLdsnCaIzVn01D wQbHvQG+owwS1jUeLtn1mvP2lTRM= X-Received: by 2002:a05:6871:286:b0:254:d417:351f with SMTP id 586e51a60fabf-25514bfd75fmr2688487fac.1.1718213018901; Wed, 12 Jun 2024 10:23:38 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <1051df4c-067f-455e-8c7f-9dc47dc8ed00@yahoo.de> <7f4a777b-88f6-4429-b168-d1337d291386@yahoo.de> <435867b5-029b-419f-bb7f-2d4902c62556@leemhuis.info> <312649b1-eea9-4346-af93-76a821e88eb7@yahoo.de> <78549853-1763-40cf-9974-3fc737fad093@yahoo.de> <91d94429-fc7e-4828-914d-1a251ee1ba99@yahoo.de> <543787c3-db5b-4f63-b5e0-df508300db73@yahoo.de> <40ec1e53-2bc8-48aa-9909-fac9072adb57@yahoo.de> In-Reply-To: From: "Rafael J. Wysocki" Date: Wed, 12 Jun 2024 19:23:26 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Regression, thermal: core: battery reading wrong after wake from S3 [Was: Bug Report according to thermal_core.c] To: "fhortner@yahoo.de" Cc: Linux PM , Linux Kernel Mailing List , Linux regressions mailing list Content-Type: multipart/mixed; boundary="000000000000a420a8061ab4a412" --000000000000a420a8061ab4a412 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Restored list CCs. On Wed, Jun 12, 2024 at 3:41=E2=80=AFPM Rafael J. Wysocki wrote: > > On Wed, Jun 12, 2024 at 11:56=E2=80=AFAM fhortner@yahoo.de wrote: > > > > Am 11.06.24 um 16:42 schrieb Rafael J. Wysocki: > > > > This doesn't make them run in a different order, it just delays both > > of them, because the notifiers are called sequentially. > > > > However, if you added the msleep() at the beginning of > > thermal_zone_device_resume(), it would change the ordering of this > > function with respect to the PM notifiers, so please try doing this. > > > > I did so and added msleep(1000) to thermal_core.c line 1634 > > I have also reverted the patch you sent me. > > > > The battery readings after resume from S3 sleep where fine. > > I have tried 2 reboots with 4 sleep/wake cycles, respectively > > Thanks! > > This means that the two code paths in question somehow interfere > destructively when they are running in parallel with each other. One more thing to try is the attached patch (independent of the previous one) to lower the priority of the thermal PM notifier to make it run always after the ACPI battery one. Please test this one too and let me know if it works for you. --000000000000a420a8061ab4a412 Content-Type: text/x-patch; charset="US-ASCII"; name="thermal-core-resume-prio.patch" Content-Disposition: attachment; filename="thermal-core-resume-prio.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_lxc3mpe90 LS0tCiBkcml2ZXJzL3RoZXJtYWwvdGhlcm1hbF9jb3JlLmMgfCAgICAxICsKIDEgZmlsZSBjaGFu Z2VkLCAxIGluc2VydGlvbigrKQoKSW5kZXg6IGxpbnV4LXBtL2RyaXZlcnMvdGhlcm1hbC90aGVy bWFsX2NvcmUuYwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09Ci0tLSBsaW51eC1wbS5vcmlnL2RyaXZlcnMvdGhlcm1hbC90 aGVybWFsX2NvcmUuYworKysgbGludXgtcG0vZHJpdmVycy90aGVybWFsL3RoZXJtYWxfY29yZS5j CkBAIC0xNzEyLDYgKzE3MTIsNyBAQCBzdGF0aWMgaW50IHRoZXJtYWxfcG1fbm90aWZ5KHN0cnVj dCBub3RpCiAKIHN0YXRpYyBzdHJ1Y3Qgbm90aWZpZXJfYmxvY2sgdGhlcm1hbF9wbV9uYiA9IHsK IAkubm90aWZpZXJfY2FsbCA9IHRoZXJtYWxfcG1fbm90aWZ5LAorCS5wcmlvcml0eSA9IC0xLAog fTsKIAogc3RhdGljIGludCBfX2luaXQgdGhlcm1hbF9pbml0KHZvaWQpCg== --000000000000a420a8061ab4a412--