Re: Regression, thermal: core: battery reading wrong after wake from S3 [Was: Bug Report according to thermal_core.c]

From: fhortner@xxxxxxxx
Date: Mon Jun 03 2024 - 15:15:37 EST


I Totally agree, this was also my first thought, what has the battery state to do with thermals.
But at least, so far, we have in total three repros confirmed in the bug report. All of the same machine.
Thinkpad X1 Xtreme Gen2 = Thinkpad P1 Gen2. The only difference is the graphics Nvidia Geforce vs Nvidia Quadro

these are the types of thermal zones:

cat /sys/class/thermal/thermal_zone*/type
acpitz
SEN6
SEN7
SEN8
SEN9
SENA
SENB
SENC
SEND
x86_pkg_temp
iwlwifi_1
INT3400 Thermal
SEN1
SEN2
pch_cannonlake
SEN3
SEN0
B0D4
SEN4
SEN5


Am 03.06.24 um 20:38 schrieb Rafael J. Wysocki:
On Thu, May 30, 2024 at 1:10 PM fhortner@xxxxxxxx <fhortner@xxxxxxxx> wrote:
Thanks Thorsten for the side note.

I have compiled kernel 6.8.11 with reverted commit
5a5efdaffda5d23717d9117cf36cda9eafcf2fae.

Battery Status works fine now with reverted commit after S3 Sleep and
Wake cycles.
Well, the connection between the battery status and the resume of
thermal zones is somewhat unclear to me at the moment.

Most likely, the commit in question changes the timing of system
resume which affects the battery behavior and it seems to be related
to the EC somehow.

Let's first see what thermal zones there are on your system, so please
send the output of

$ cat /sys/class/thermal/thermal_zone*/type