Bug 7682

Summary: acpitz-virtual-0 thermal device always returns 26.8 deg C
Product: [Hardware Platforms] MinnowBoard MAX Firmware Reporter: Darren Hart <dvhart>
Component: minnowmax-edk2Assignee: Unassigned <unassigned>
Status: RESOLVED MOVED QA Contact:
Severity: normal    
Priority: Medium CC: david.wei, dvhart, gerard.b, shifeix.a.lu, sjolley.yp.pm
Version: unspecified   
Target Milestone: Production Release   
Hardware: MinnowBoard Max   
OS: x86_64   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Darren Hart 2015-04-30 15:16:39 UTC
On Linux 3.19.2 (yocto), a user on MinnowBoard is reporting the acpitz-virtual-0 device, accessed via /sys/class/thermal/thermal_zone0/temp, is always returning 26800 (26.8 deg C), regardless of core temp.

Another Debian user reported the following using the lm-sensors package:
sensors
acpitz-virtual-0
Adapter: Virtual device
temp1:        +26.8°C  (crit = +90.0°C)

coretemp-isa-0000
Adapter: ISA adapter
Core 0:       +50.0°C  (high = +110.0°C, crit = +110.0°C)
Core 2:       +51.0°C  (high = +110.0°C, crit = +110.0°C)

The core* temps using the coretemp driver are what I use, I'm not sure what the acpitz-virtual-0 device is or what it reports. Since it's an ACPI device, I'm filing under firmware for an initial review of this device and it's ACPI implementation.

Should this device be reported?

I have asked on list for the firmware version. The original reported is Cc'd here. Gerard, if you can report your firmware version, that would be helpful.
Comment 1 Darren Hart 2015-04-30 15:38:13 UTC
Scanning through the edk2 sources, I see the following defaults for VLV2 devices, which explicitly returns this value (26.8 deg C) if "both EC and DTS are unavailable".

If this always returns the same value, should we be removing this from the table? Or at least disabling it via _STA?

   // _TMP (Temperature)
    //
    // Return the highest of the CPU temperatures to the OS.
    //
    // Arguments: (0)
    //   None
    // Return Value:
    //   An Integer containing the current temperature of the thermal zone (in tenths of degrees Kelvin)
    //
    Method(_TMP,0,Serialized)
    {
      If(DTSE)
      {
        If(LGreater(DTS2, DTS1))
        {
          Store(DTS2,Local0)
        } else
        {
          Store(DTS1,Local0)
        }
        Return(Add(2732,Multiply(Local0,10)))
        //
        // Else return a static value if both EC and DTS are unavailable.
        //
      } Else
      {
        Return(3000) // (3000-2732)/10 = 26.8 degree C
      }
    }
Comment 2 Gerard Bucas 2015-04-30 16:58:24 UTC
Problem reported when using firmware: 
MNW2MAX1.X64.0079.R01.1504081555

- Gerard Bucas (gerard.b@tekmagic.net)
Comment 3 David_Wei 2015-05-13 06:18:05 UTC
We are trying to enable Digital Thermal Sensor to detect the temperature.
Comment 4 David_Wei 2015-05-22 06:08:44 UTC
Firware team is optimizing Digital Thermal Sensor driver to make it able to detect smaller changes of processor temperature.
Comment 5 David_Wei 2015-05-26 23:23:38 UTC
Shifei has finished adding back Digital Thermal Sensor and tested its function. V0.81 release will include this feature.
Comment 6 David_Wei 2015-06-30 23:34:50 UTC
This issue has been fixed by V0.81 release. Please review it.
Comment 7 Gerard Bucas 2015-07-02 05:47:09 UTC
Ok - tested it on a minnowboard MAX with latest 0.81 firmware. 

It now behaves differently and after Linux starts in root shell it returns 60000 (= 60.0C). At that point the sensors command returns around 65C

However, then I run some heavy CPU/GPU content and the value returned by temp only rises to 70000 (70.0C) and then stats there, even though 'sensors' now reports 92C.

So the 'virtual device' seems to get stuck at a max of 70000, even though CPU (die) temp has gone up to 92C (stabilises around 92C with the content I am running). 

So my conclusion is that the behavior has changed (no longer returns a fixed/constant value like before) but it still does not report correct temp and always returns a value between 60000 and 70000.

A good 'check' is to compare the results of the Linux 'sensors' command - which I did.

Hope this helps. 

Regards
Gerard Bucas
Gerard.b@tekmagic.net
Comment 8 David_Wei 2015-07-14 06:14:29 UTC
Assign to Shifei to check the ACPI thermal zone.
Comment 9 Lu_Shifei 2015-08-05 07:13:10 UTC
Please double check with V0.82 Firmware Binary.Thanks a lot!
Comment 10 Gerard Bucas 2015-08-10 16:50:29 UTC
OK - I checked it out with 0.82 firmware and linux 3.19 kernel (ubuntu & yocto) running on a minnowboard MAX.

Seems to work and reports similar results now to "sensors" command.

Thanks for fixing this - much appreciated.

- Gerard
Comment 11 David_Wei 2015-08-11 23:25:48 UTC
Hi Dareen,
Gerard has confirmed this fix. Could you help change this bug status to "resolved"?
Comment 12 Stephen K Jolley 2017-06-13 18:08:08 UTC
We are no longer tracking in Yocto Project Bugzilla MinnowBoard and MinnowBoard-MAX HW and firmware bugs.