Skip to content

Remove fatal error for non mobile platform#581

Merged
spandruvada merged 1 commit into
masterfrom
thermald_next
Jul 9, 2026
Merged

Remove fatal error for non mobile platform#581
spandruvada merged 1 commit into
masterfrom
thermald_next

Conversation

@spandruvada

Copy link
Copy Markdown
Contributor

Downgrade to warning as some user do want to run on non Mobile platforms.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR relaxes thermald’s startup behavior on non-mobile platforms by turning the ACPI PM profile “non-mobile” condition from a fatal startup blocker into a warning so users can run the daemon on more systems.

Changes:

  • Downgrade the non-mobile ACPI PM profile check from fatal exit to a warning.
  • Stop aborting engine initialization based on the ACPI PM profile check result (both default and adaptive engines).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/thd_engine.cpp Logs a warning instead of exiting on non-mobile PM profiles; init path no longer returns fatal on this check.
src/thd_engine_adaptive.cpp Removes fatal early-return on non-mobile PM profiles during adaptive engine init.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/thd_engine.cpp
Comment on lines 262 to 266
thd_log_info("PM profile is %s\n", pm_profile.c_str());
if (pm_profile != "2" && pm_profile != "8") {
thd_log_error("Non mobile platform, exiting..\n");
return THD_FATAL_ERROR;
thd_log_warn("Non mobile platform, thermal tables may not have been validated.\n");
return THD_ERROR;
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I am thinking to turn this function to void

Comment thread src/thd_engine.cpp Outdated
Comment on lines +296 to +300
@@ -297,9 +297,7 @@ int cthd_engine::thd_engine_init(bool ignore_cpuid_check, bool adaptive) {
thd_log_debug("Ignore CPU ID check for MSRs\n");
proc_list_matched = true;
} else {
if (check_acpi_platform_profile() != THD_SUCCESS) {
return THD_FATAL_ERROR;
}
check_acpi_platform_profile();

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

With ignore_cpuid_check this function shouldn't be called?

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

Comment thread src/thd_engine.cpp Outdated

int cthd_engine::check_acpi_platform_profile() {
void cthd_engine::check_acpi_platform_profile() {
// Check PM profile and fail to start for non mobile platforms
Comment thread src/thd_engine.cpp Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

Comment thread src/thd_engine.cpp
Comment on lines 306 to 309
}

check_acpi_platform_profile();
}
Comment thread src/thd_engine.cpp Outdated
int cthd_engine::check_acpi_platform_profile() {
// Check PM profile and fail to start for non mobile platforms
void cthd_engine::check_acpi_platform_profile() {
// Check PM profile and warn to start for non mobile platforms
Downgrade to warning as some user do want to run on non Mobile
platforms.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
@spandruvada spandruvada merged commit 9c4812f into master Jul 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants