Skip to content

performance: add thermal limit adjustment option#1605

Merged
brianmcgillion merged 1 commit intotiiuae:mainfrom
kajusnau:thermal-limit
Dec 2, 2025
Merged

performance: add thermal limit adjustment option#1605
brianmcgillion merged 1 commit intotiiuae:mainfrom
kajusnau:thermal-limit

Conversation

@kajusnau
Copy link
Copy Markdown
Collaborator

@kajusnau kajusnau commented Dec 2, 2025

Description of Changes

Introduced new options to configure Intel CPUs' thermal behavior

  • New options as part of ghaf.services.performance.host:
    • thermalLimitMode - enum used to control vendor-defined thermal limits
    • thermalLimitTemp - configure a custom thermal limit at which the system will start throttling
  • Thermal throttling seems to occur at 60-70C on many laptops by default.
    Disabling the thermal limit allows the CPU to boost up to the defined limit (90 C by default).
  • Thermal limits are managed by Thermal Daemon and apply only to Intel CPUs
  • Vendor thermal limits are now disabled by default when running on AC power to improve sustained performance under load.
  • May result in improved boot times, especially in scenarios where the system is thermally constrained (e.g., lab testing environments) 🤞 .

Type of Change

  • New Feature
  • Bug Fix
  • Improvement / Refactor

Related Issues / Tickets

Checklist

  • Clear summary in PR description
  • Detailed and meaningful commit message(s)
  • Commits are logically organized and squashed if appropriate
  • Contribution guidelines followed
  • Ghaf documentation updated with the commit - https://tiiuae.github.io/ghaf/
  • Author has run make-checks and it passes
  • All automatic GitHub Action checks pass - see actions
  • Author has added reviewers and removed PR draft status

Testing Instructions

Applicable Targets

  • Orin AGX aarch64
  • Orin NX aarch64
  • Lenovo X1 x86_64
  • Dell Latitude x86_64
  • System 76 x86_64

Installation Method

  • Requires full re-installation
  • Can be updated with nixos-rebuild ... switch
  • Other:

Test Steps To Verify:

Reference values used below are for X1 gen 11, with an i7-1355U

  1. Boot into Ghaf and open two remote terminals in ghaf-host
  2. Make sure device is running on AC power and is in "balanced" power profile.
  3. In term A, run sudo s-tui; In term B run watch "systemctl status thermald --no-pager"
  4. In term B, confirm the service thermald.service is active
  5. In term A, start the stress test (click or select and hit Enter on the ( ) Stress mode)
  6. Observe CPU core temps and frequencies during the test:
    • The CPU should comfortably boost to 80% of its all-core max frequency (on X1 this should be 3.8 GHz for P-cores, 2.6 GHz for E-cores)
    • CPU should not start throttling until ~95-100C. If cooling is sufficient, throttling should not occur at all.
  7. Keep the stress test running and disconnect the AC power adapter
  8. In term B, confirm the service thermald.service is inactive.
  9. Observe CPU core temps and frequencies during the test:
    • Within ~15 seconds of thermald.service becoming inactive the CPU should start throttling in an attempt to keep CPU core temps under 70 C
    • After throttling, the all-core frequency for P-cores should settle around 2.6 GHz
  10. (Optional) Switch power profiles (powersave -> balanced -> performance) and repeat the test with and without AC power and observe CPU behavior.

- add option to disable vendor temp limits for intel
- disable vendor temp limits by default on AC

Signed-off-by: Kajus Naujokaitis <kajus.naujokaitis@unikie.com>
@kajusnau kajusnau added the Needs Testing CI Team to pre-verify label Dec 2, 2025
@kajusnau kajusnau marked this pull request as ready for review December 2, 2025 11:12
Copy link
Copy Markdown
Collaborator

@brianmcgillion brianmcgillion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bring your own eggs, and we will fry 'em for you :)

@milva-unikie
Copy link
Copy Markdown

Tested on Darter Pro and Lenovo X1 (nixos-rebuild switch)

  • Seems to be working great now, my X1 does not crash anymore :)
  • Checked with both balanced and performance profiles

bring your own eggs, and we will fry 'em for you :)

We have a long winter ahead of us here, good to have something to keep us warm.

@milva-unikie milva-unikie added Tested on Lenovo X1 Carbon This PR has been tested on Lenovo X1 Carbon Tested on System76 and removed Needs Testing CI Team to pre-verify labels Dec 2, 2025
@brianmcgillion brianmcgillion merged commit 0476b6f into tiiuae:main Dec 2, 2025
30 checks passed
@kajusnau kajusnau deleted the thermal-limit branch December 2, 2025 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Tested on Lenovo X1 Carbon This PR has been tested on Lenovo X1 Carbon Tested on System76

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants