Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp219417lqs; Thu, 13 Jun 2024 08:16:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW3TuuRPM4fqd9FcH5/VkMWLgYoeXI2tp6BUyke0RtXPuetmdx71+kVhtngF/CPgVXj0CRO4SMfa6PfO14OaK8bL0eu9WI6vSYxWXU4TQ== X-Google-Smtp-Source: AGHT+IGnRULaAe8W9DbCEDO+xIZ5beLTyMxYp2K1BOZpP5rafR5aqErBl4T5749VFLVwusj9VtPp X-Received: by 2002:a05:6a20:72a0:b0:1af:8fa8:3126 with SMTP id adf61e73a8af0-1bae7d9821fmr174329637.6.1718291796082; Thu, 13 Jun 2024 08:16:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718291796; cv=pass; d=google.com; s=arc-20160816; b=UtSlMKkCGppGdeGFe/BpMiSX5xBZ7uR43riVZZotcqPLvsei/KhlyPL07DpWKzIHA5 sU5ERMY7BSb+k5FIDfnpF4jVKfdxL9md2omVIs7fE9+yRnfYj6ACOeKals4uuB6j4Dlj 4iFJjUD3YtFMjkiAktWYxbjF5UovUF9bOF9z5ZhWQ3rlovVedGr4aDmk+zcThQ5PMD99 Kwt7SXMMOFtBcQCf32x7JIW32ndqc8T8NPHz0bQw+Anuecptb6lhB5AVFSqkw7MxCcDc Vu4zL989+dB0oTBTbYGijmEuXPUBUilbZGjSMr9EdFaTqJY+PMD83WZkwA2+fh7QHLlH 3N8w== 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=OSIoFPP6ehaEIJXs+89MIW5R38UOvWK3VJSPoOB54oA=; fh=BadlwtNYIs7Tu/MVX/X9tzX97YK23qjfzUvqfB6HM/I=; b=FWtmWtW8IcbXtkZI4xmXjKU3fcTVg1KcJum7tplJftTkKSmX59PdIY9eyp4Q/+fxhA HoeVhtwh6lxCQO03X+YPan28LKIrbc2kB9GYgxpxqIbzNhesDvwb9cJ+UxkCSjDCTy2/ YLYkYKUmYDFHhnD1zOlkxxjCQNb9aOoZdB7ZOHw1W86IYU71m9o9Od5RIxrLBZG4FATB OiYUFDd4zlD/dZHwZUfGxnl0BdATbshJt7uKG8QV4DXuporZdRwE7O7TWa9eNEAqz35P 2wTGk4I3JLoiisKz3FuudLiPGuYUZyhCSkgp4k1IRzD5p1MVr9okFdT+IubF2im7Q4O2 4Meg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ijlEn8zx; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-213513-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213513-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d2e1a72fcca58-705ccb71720si1603233b3a.239.2024.06.13.08.16.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 08:16:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-213513-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ijlEn8zx; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-213513-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213513-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 881A128256A for ; Thu, 13 Jun 2024 15:14:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0EFB81494C2; Thu, 13 Jun 2024 15:14:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ijlEn8zx" 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 2108D1448ED; Thu, 13 Jun 2024 15:14:41 +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=1718291682; cv=none; b=gMnWIfgdKb+ZLO4cSDXu06GvpK4mMk2P35kdIPxyZLt3mg68V5VzjNFmIU1oFFbW2Vvw5xZJC/04MQqdapuCfOckP1x36Fk3AFBrVMwhVxxXfzYnOX6BDeeQj0e9uyFrqpare2Z6x9XqTjCiRPN3HXsEOL56ySltbEmZ5X5k0Z0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718291682; c=relaxed/simple; bh=OSIoFPP6ehaEIJXs+89MIW5R38UOvWK3VJSPoOB54oA=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=T0H3NvMkHlsvCKR5Iloq+mzg2jOufut3Zijt8EAbsWFXqzWC5L+g5HwmJtrqMbjc8zeWspi7cvWUaUH0GDkNfK/NACDJ2lO23naXJ6XDOTbBqaIt8xcAuzC4TnP0jInjG1nk0JKK3Edm853OUnd9Vx8fu55HFtSZb7kMOeNms0Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ijlEn8zx; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B067EC2BBFC; Thu, 13 Jun 2024 15:14:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718291681; bh=OSIoFPP6ehaEIJXs+89MIW5R38UOvWK3VJSPoOB54oA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ijlEn8zxPhPR00qsRkxvJ35VZGdeRjO0h5xFd/XDzboC7Xu4f8r+0MNMxHDqWnLZN PuxUMKDS68lsFAyxvvqUTPbgh6i+0ODEuHejFHF7MF4eAWAARs5nfTjO/ExuAMvLce icIh1xcYqw5bzS2bqrC7QYw2f0kCOrgq8IcpFQ4E9j/IMZ+6uPljgPpH00oaNhCCIE e87cm49l9EsATTdgauu1Gpkb11smfXl+lvRiWLHKV5myUAI4cZ4uKO1Yt/WPRaMQUj TpQgizCrCx7Yt+1Q/86vBQpEHpgrIbC6JCLgJ8lmOlZq25AqxCLO+98k7Yk0996OuH 47oA8Gwsk0tDQ== Received: by mail-oo1-f41.google.com with SMTP id 006d021491bc7-5bad112b623so38694eaf.3; Thu, 13 Jun 2024 08:14:41 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCXFC2oMDMtU3/azuVdTu3dOF6BhZKjCdiCjkIEDaqHjTeFaJ6/MLjs693O4ow+E5ZAs7v7wCeY6fzfU1BbYJtY0m2qT8tjslOT/dGPI X-Gm-Message-State: AOJu0YzsXqW3Iaq3FIgYeCCQ1fop++YqTKmyZ3QU0wuvgnI7KP1fM8qk q9kTckVnFEeuruaxTD5wdNj/py2TZLhvQYDcADilo22occecG5OGnJ7emc+SF1OiR8ytOINlqGy Lpy6QcXyRf1Ere4LPa0oFrVE/k8Q= X-Received: by 2002:a4a:b4c1:0:b0:5bb:815d:e2ab with SMTP id 006d021491bc7-5bdabf41a2bmr663673eaf.1.1718291680932; Thu, 13 Jun 2024 08:14:40 -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: Thu, 13 Jun 2024 17:14:27 +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="000000000000437c47061ac6f571" --000000000000437c47061ac6f571 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jun 12, 2024 at 7:23=E2=80=AFPM Rafael J. Wysocki wrote: > > 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. Attached is a slightly modified version of the last patch I sent. Please test it and let me know if it addresses the problem you are seeing. If it helps, I think we are done with this at least for now. --000000000000437c47061ac6f571 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_lxdeempy0 LS0tCiBkcml2ZXJzL3RoZXJtYWwvdGhlcm1hbF9jb3JlLmMgfCAgICA2ICsrKysrKwogMSBmaWxl IGNoYW5nZWQsIDYgaW5zZXJ0aW9ucygrKQoKSW5kZXg6IGxpbnV4LXBtL2RyaXZlcnMvdGhlcm1h bC90aGVybWFsX2NvcmUuYwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBsaW51eC1wbS5vcmlnL2RyaXZlcnMvdGhl cm1hbC90aGVybWFsX2NvcmUuYworKysgbGludXgtcG0vZHJpdmVycy90aGVybWFsL3RoZXJtYWxf Y29yZS5jCkBAIC0xNzEyLDYgKzE3MTIsMTIgQEAgc3RhdGljIGludCB0aGVybWFsX3BtX25vdGlm eShzdHJ1Y3Qgbm90aQogCiBzdGF0aWMgc3RydWN0IG5vdGlmaWVyX2Jsb2NrIHRoZXJtYWxfcG1f bmIgPSB7CiAJLm5vdGlmaWVyX2NhbGwgPSB0aGVybWFsX3BtX25vdGlmeSwKKwkvKgorCSAqIFJ1 biBhdCB0aGUgbG93ZXN0IHByaW9yaXR5IHRvIGF2b2lkIGludGVyZmVyZW5jZSBiZXR3ZWVuIHRo ZSB0aGVybWFsCisJICogem9uZSByZXN1bWUgd29yayBpdGVtcyBzcGF3bmVkIGJ5IHRoZXJtYWxf cG1fbm90aWZ5KCkgYW5kIHRoZSBvdGhlcgorCSAqIFBNIG5vdGlmaWVycy4KKwkgKi8KKwkucHJp b3JpdHkgPSBJTlRfTUlOLAogfTsKIAogc3RhdGljIGludCBfX2luaXQgdGhlcm1hbF9pbml0KHZv aWQpCg== --000000000000437c47061ac6f571--