On Tue, Apr 04, 2023 at 10:45:53PM -0500, joshua stein wrote: > acpithinkpad sets up a hard-coded number of temperature sensors and > doesn't check the result of aml_evalinteger when polling, so for all > invalid sensors it ends up reporting the value of the previous > successful sensor check resulting in this (for a machine with only a > TMP0 sensor):
I see this on a X230 with coreboot: hw.sensors.acpithinkpad0.temp0=66.00 degC hw.sensors.acpithinkpad0.temp1=0.00 degC hw.sensors.acpithinkpad0.temp2=0.00 degC hw.sensors.acpithinkpad0.temp3=0.00 degC hw.sensors.acpithinkpad0.temp4=0.00 degC hw.sensors.acpithinkpad0.temp5=0.00 degC hw.sensors.acpithinkpad0.temp6=0.00 degC hw.sensors.acpithinkpad0.temp7=0.00 degC hw.sensors.acpithinkpad0.fan0=4326 RPM hw.sensors.acpithinkpad0.indicator0=Off (port replicator), UNKNOWN (It's in a proper dock, but .indicator0 always says "Off"; I think this used to work...) > This diff checks whether the TMP[0-8] node actually exists during > attach and if not, it doesn't create the sensor. It also checks the > return value during polling and sets the sensor to invalid if it > failed for some reason. hw.sensors.acpithinkpad0.temp0=65.00 degC hw.sensors.acpithinkpad0.temp1=0.00 degC hw.sensors.acpithinkpad0.fan0=4326 RPM hw.sensors.acpithinkpad0.indicator0=Off (port replicator), UNKNOWN Works for me, but looks like temp1 is actually a second sensor which doesn't work? Definitely warmer around here. Do you want me to test anything?