Raptor Lake Thermald ITMT version 2 support

Bug #2007579 reported by Srinivas Pandruvada
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
thermald (Ubuntu)
Fix Released
High
Colin Ian King
Bionic
Won't Fix
High
Colin Ian King
Focal
Won't Fix
High
Colin Ian King
Jammy
Fix Released
High
Colin Ian King
Kinetic
Fix Released
High
Colin Ian King
Lunar
Fix Released
High
Colin Ian King

Bug Description

== SRU Justification Kinetic ==

Raptor Lake system uses ITMT v2 instead of V1 for thermal configuration via GDDV.

This was observed on Dell XPS 9320 system.
Because thermald can't parse V2 table, it is not getting correct thermal threshold temperature and power limits.

== The Fix ==

This is fixed in upstream thermald by the patch:
https://github.com/intel/thermal_daemon/commit/90d56bc06cdcf78e7398ea7da389401516591774
This fix is part of Thermald 2.5.2 release.

The fix applies cleanly and this is already in Ubuntu Lunar in thermald 2.5.2. The fix checks for illegal ITMT version and handles version 2 as a specific exceptional case.

== Regression Risks ==

For systems that do not used ITMT, no change in behaviour will occur. Systems with versions > 2 (currently not valid) will not have ITMT parsed anymore; this will avoid misinterpreting unsupported ITMT data. Finally, version 2 of ITMT will be now parsed differently and additional fields will be parsed and these will be ignored as intended.

== Test Plan ==

Test against a Dell XPS 9320 system. See if it handles the ITMT correctly. The thermald log should indicate version 2 is being used with the message:
"ignore dummy_str: ds d1 d2 d3 " where ds = a string, d1 .. d3 are uint64 values that are parsed and ignored.

Revision history for this message
Colin Ian King (colin-king) wrote :

I don't mind picking this one up.

Changed in thermald (Ubuntu):
assignee: nobody → Colin Ian King (colin-king)
importance: Undecided → High
status: New → In Progress
Revision history for this message
koba (kobako) wrote :

@Colin, so you will push to the lunar?

Revision history for this message
Colin Ian King (colin-king) wrote :

Lunar already has this fix as it is the current latest release: http://changelogs.ubuntu.com/changelogs/pool/main/t/thermald/thermald_2.5.2-1/changelog

This fix needs to be backported to other releases as a stable release update, I'll do these.

Changed in thermald (Ubuntu Lunar):
status: In Progress → Fix Released
Changed in thermald (Ubuntu Kinetic):
assignee: nobody → Colin Ian King (colin-king)
Changed in thermald (Ubuntu Jammy):
assignee: nobody → Colin Ian King (colin-king)
Changed in thermald (Ubuntu Focal):
assignee: nobody → Colin Ian King (colin-king)
Changed in thermald (Ubuntu Bionic):
assignee: nobody → Colin Ian King (colin-king)
Changed in thermald (Ubuntu Kinetic):
importance: Undecided → High
Changed in thermald (Ubuntu Bionic):
importance: Undecided → High
Changed in thermald (Ubuntu Focal):
importance: Undecided → High
Changed in thermald (Ubuntu Jammy):
importance: Undecided → High
Changed in thermald (Ubuntu Bionic):
status: New → In Progress
Changed in thermald (Ubuntu Focal):
status: New → In Progress
Changed in thermald (Ubuntu Jammy):
status: New → In Progress
Changed in thermald (Ubuntu Kinetic):
status: New → In Progress
Changed in thermald (Ubuntu Bionic):
status: In Progress → Won't Fix
Changed in thermald (Ubuntu Focal):
status: In Progress → Won't Fix
description: updated
Changed in thermald (Ubuntu Jammy):
status: In Progress → Won't Fix
description: updated
Changed in thermald (Ubuntu Jammy):
status: Won't Fix → In Progress
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Srinivas, or anyone else affected,

Accepted thermald into kinetic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/thermald/2.5.1-1ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-kinetic to verification-done-kinetic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-kinetic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in thermald (Ubuntu Kinetic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-kinetic
Revision history for this message
Colin Ian King (colin-king) wrote :

I've been exercising the existing code paths of thermald for several days now with no observable regression in behaviour. I cannot test the new code path change for this fix as I don't have the exact same system as that reported in the bug.

For what I can see, there is no regression on this single change for Kinetic.

Revision history for this message
koba (kobako) wrote :

@Colin, i could help to verify on the target.

Revision history for this message
Colin Ian King (colin-king) wrote :

@koba, if you have access to a Dell XPS 9320 then that would be super useful to verify too - thanks!

Revision history for this message
koba (kobako) wrote (last edit ):

@Colin, i have accessed the Dell XPS 9320 and run some rounds of stress-ng.
Monitored through s-tui and thermald lod.
Didn't find any side-effects.

May i know if you're working on Jammy version?thanks
~~~
ubuntu@ubuntu:~$ ubuntu-report show
{
  "Version": "22.10",
  "OEM": {
    "Vendor": "Dell Inc.",
    "Product": "XPS 9320",
    "Family": "XPS",
    "DCD": "canonical-oem-somerville-jammy-amd64-20220504-33+jellyfish-tentacool-rpl+X88"
  },

ubuntu@ubuntu:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.10
Release: 22.10
Codename: kinetic
ubuntu@ubuntu:~$ sudo apt policy thermald
thermald:
  Installed: 2.5.1-1ubuntu1
  Candidate: 2.5.1-1ubuntu1
  Version table:
 *** 2.5.1-1ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu kinetic-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
     2.5.1-1 500
        500 http://tw.archive.ubuntu.com/ubuntu kinetic/main amd64 Packages

~~~

Revision history for this message
Timo Aaltonen (tjaalton) wrote : Proposed package upload rejected

An upload of thermald to jammy-proposed has been rejected from the upload queue for the following reason: "refers to private bugs".

koba (kobako)
tags: added: verification-done-kinetic
removed: verification-needed-kinetic
tags: added: verification-done
removed: verification-needed
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

@koba, thanks for your kinetic testing. The [test plan] however also has this bit:

"""
The thermald log should indicate version 2 is being used with the message:
"ignore dummy_str: ds d1 d2 d3 " where ds = a string, d1 .. d3 are uint64 values that are parsed and ignored.
"""

Did you observe that message in the thermald log? I confess I don't know what in that message would indicate that "version 2 is being used", and I would have asked clarification on that before accepting the package.

Revision history for this message
koba (kobako) wrote (last edit ):
Download full text (4.4 KiB)

+202304281026,
 there're related logs,
~~~
[1682648590][DEBUG] ITMT version 2 (null)
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG] ITMT version 2 itm_b
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG] ITMT version 2 itm_b_35
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG] ITMT version 2 itm_b_lap
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG] ITMT version 2 itm_c
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG] ITMT version 2 itm_p
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG] ITMT version 2 itm_p_35
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[1682648590][DEBUG]ignore dummy_str:\_SB_.PC00.TCPU 5 9 65536
[168264...

Read more...

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package thermald - 2.5.1-1ubuntu1

---------------
thermald (2.5.1-1ubuntu1) kinetic; urgency=medium

  * Fix ITMT parsing, skip fields that are not known (LP: #2007579)
    upstream commit 90d56bc06cdcf78e7398ea7da389401516591774
    - 0001-Process-ITMT-v2.patch

 -- Colin Ian King <email address hidden> Thu, 16 Feb 2023 16:46:11 +0100

Changed in thermald (Ubuntu Kinetic):
status: Fix Committed → Fix Released
Revision history for this message
Andreas Hasenack (ahasenack) wrote : Update Released

The verification of the Stable Release Update for thermald has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Please note that the jammy upload was rejected in comment #10, and the jammy task is therefore still "in progress".

Revision history for this message
Chris Halse Rogers (raof) wrote : Please test proposed package

Hello Srinivas, or anyone else affected,

Accepted thermald into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/thermald/2.4.9-1ubuntu0.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in thermald (Ubuntu Jammy):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-jammy
removed: verification-done
Revision history for this message
koba (kobako) wrote (last edit ):

Verified
~~~
$ uname -a
Linux u-Precision-5480 6.1.0-1016-oem #16-Ubuntu SMP PREEMPT_DYNAMIC Wed Jun 21 08:45:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

$ sudo apt policy thermald
[sudo] password for x31:
thermald:
  Installed: 2.4.9-1ubuntu0.3
  Candidate: 2.4.9-1ubuntu0.3
  Version table:
 *** 2.4.9-1ubuntu0.3 500
        500 http://tw.archive.ubuntu.com/ubuntu jammy-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
     2.4.9-1ubuntu0.3 500
        500 https://ppa.launchpadcontent.net/kobako/exp-thermald/ubuntu jammy/main amd64 Packages
     2.4.9-1ubuntu0.2 500
        500 http://tw.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
     2.4.9-1 500
        500 http://tw.archive.ubuntu.com/ubuntu jammy/main amd64 Packages

$ sudo thermald --no-daemon --adaptive --loglevel=debug

[1690482544][INFO]Processing ppcc limit 2, length 300
[1690482544][DEBUG] ITMT version 2 (null)
[1690482544][WARN]Found object of type 4, expecting 8
~~~

tags: added: verification-done verification-done-jammy
removed: verification-needed verification-needed-jammy
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Hi @koba,

I think you pasted the wrong log in this bug here. You pasted the verification for INT3400 (bug #1989044)?

tags: added: verification-needed-jammy
removed: verification-done-jammy
Revision history for this message
koba (kobako) wrote :

@Andreas, correct it.

koba (kobako)
tags: added: verification-done-jammy
removed: verification-needed-jammy
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package thermald - 2.4.9-1ubuntu0.3

---------------
thermald (2.4.9-1ubuntu0.3) jammy; urgency=medium

  * Cherry-pick following fixes from thermald 2.5.1 and 2.5.2 (LP: #1995606)
  * debian/patches/0013-Add-AlderLake-N.patch
    - Add support for Adler Lake N (LP: #2012260)
  * debian/patches/0007-Add-INT3400-base-path-for-Raptor-Lake.patch
    - Fix RPL: Add INT3400 base path(LP: #1989044)
  * debian/patches/0014-Process-ITMT-v2.patch
    - Support ITMTv2 for Raptor Lake (LP: #2007579)
  * debian/patches/0008-Install-passive-default.patch
    - Fix throttled GPU (LP: #1981087)
  * debian/patches/0012-Always-match-motion-0.patch
    - Fix in-motion function doesn't work (LP: #2018275)
  * debian/patches/0003-Parse-ITMT-Table.patch
  * debian/patches/0004-Add-capability-for-min-max-per-trip.patch
  * debian/patches/0005-Install-ITMT_target.patch
  * debian/patches/0006-Use-per-trip-min-max.patch
  * debian/patches/0009-Parse-idsp-and-trips.patch
  * debian/patches/0010-use-PL1-max-min-from-PPCC-when-policies-match.patch
  * debian/patches/0011-Parse-GDDV-before-thd_engine-init.patch
    - Fix i9-12900k shutdown when run Prime95 and stress-ng (LP: #2018236)

 -- Koba Ko <email address hidden> Wed, 05 Jul 2023 13:37:32 +0200

Changed in thermald (Ubuntu Jammy):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.