public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Neal Gompa <ngompa@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/thermald] f44: Backport fixes to allow thermald to work on "non-mobile platforms" (rhbz#2512758)
Date: Sun, 09 Aug 2026 15:11:50 GMT [thread overview]
Message-ID: <178628831075.1.16770131912690252734.rpms-thermald-43431ac8e51a@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/thermald
Branch : f44
Commit : 43431ac8e51a6d7b7c0e8947d95119d6fa72a616
Author : Neal Gompa <ngompa@fedoraproject.org>
Date : 2026-08-09T11:10:10-04:00
Stats : +140/-4 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/thermald/c/43431ac8e51a6d7b7c0e8947d95119d6fa72a616?branch=f44
Log:
Backport fixes to allow thermald to work on "non-mobile platforms" (rhbz#2512758)
- Modernize spec file
---
diff --git a/32c70aaba5837014fd3a2cb0b7e6b695d13043ad.patch b/32c70aaba5837014fd3a2cb0b7e6b695d13043ad.patch
new file mode 100644
index 0000000..afb35fa
--- /dev/null
+++ b/32c70aaba5837014fd3a2cb0b7e6b695d13043ad.patch
@@ -0,0 +1,37 @@
+From 32c70aaba5837014fd3a2cb0b7e6b695d13043ad Mon Sep 17 00:00:00 2001
+From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
+Date: Sat, 20 Jun 2026 16:11:27 -0700
+Subject: [PATCH] Allow desktop platform with ignore-cpuid-check
+
+Allow desktop platforms with --ignore-cpuid-check.
+
+Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
+---
+ src/thd_engine.cpp | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/thd_engine.cpp b/src/thd_engine.cpp
+index a85639bf..be924044 100644
+--- a/src/thd_engine.cpp
++++ b/src/thd_engine.cpp
+@@ -291,16 +291,16 @@ void cthd_engine::thd_parse_features()
+ int cthd_engine::thd_engine_init(bool ignore_cpuid_check, bool adaptive) {
+ int ret;
+
+- if (check_acpi_platform_profile() != THD_SUCCESS) {
+- return THD_FATAL_ERROR;
+- }
+-
+ adaptive_mode = adaptive;
+
+ if (ignore_cpuid_check) {
+ 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_cpu_id();
+
+ if (!proc_list_matched) {
diff --git a/de4821ce559a2041f6a5d574aeca278df340e379.patch b/de4821ce559a2041f6a5d574aeca278df340e379.patch
new file mode 100644
index 0000000..b426b25
--- /dev/null
+++ b/de4821ce559a2041f6a5d574aeca278df340e379.patch
@@ -0,0 +1,93 @@
+From de4821ce559a2041f6a5d574aeca278df340e379 Mon Sep 17 00:00:00 2001
+From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
+Date: Mon, 22 Jun 2026 09:42:36 -0700
+Subject: [PATCH] Remove fatal error for non mobile platform
+
+Downgrade to warning as some user do want to run on non Mobile
+platforms.
+
+Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
+---
+ src/thd_engine.cpp | 15 +++++----------
+ src/thd_engine.h | 2 +-
+ src/thd_engine_adaptive.cpp | 4 +---
+ 3 files changed, 7 insertions(+), 14 deletions(-)
+
+diff --git a/src/thd_engine.cpp b/src/thd_engine.cpp
+index be924044..83aad268 100644
+--- a/src/thd_engine.cpp
++++ b/src/thd_engine.cpp
+@@ -253,22 +253,19 @@ void cthd_engine::enable_power_floor_event()
+ ++current_zone_index;
+ }
+
+-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 on non-mobile platforms
+ csys_fs pm_profile_fs("/sys/firmware/acpi/pm_profile");
+ if (pm_profile_fs.exists()) {
+ std::string pm_profile;
+ pm_profile_fs.read("", pm_profile);
+ 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");
+ }
+ } else {
+ thd_log_info("PM profile is not available, skipping check\n");
+ }
+-
+- return THD_SUCCESS;
+ }
+
+ void cthd_engine::thd_parse_features()
+@@ -297,10 +294,6 @@ 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_cpu_id();
+
+ if (!proc_list_matched) {
+@@ -311,6 +304,8 @@ int cthd_engine::thd_engine_init(bool ignore_cpuid_check, bool adaptive) {
+ return THD_ERROR;
+ }
+ }
++
++ check_acpi_platform_profile();
+ }
+
+ ret = read_thermal_sensors();
+diff --git a/src/thd_engine.h b/src/thd_engine.h
+index 781f1e55..ac39eef2 100644
+--- a/src/thd_engine.h
++++ b/src/thd_engine.h
+@@ -302,7 +302,7 @@ class cthd_engine {
+ void parser_deinit();
+ int debug_mode_on(void);
+
+- int check_acpi_platform_profile();
++ void check_acpi_platform_profile();
+
+ int check_feature(thermald_feature_names_t feature) {
+ if (feature >= MAX_FEATURE) {
+diff --git a/src/thd_engine_adaptive.cpp b/src/thd_engine_adaptive.cpp
+index 5586523c..7a481994 100644
+--- a/src/thd_engine_adaptive.cpp
++++ b/src/thd_engine_adaptive.cpp
+@@ -660,9 +660,7 @@ int cthd_engine_adaptive::thd_engine_init(bool ignore_cpuid_check,
+ size_t size;
+ int res;
+
+- if (check_acpi_platform_profile() != THD_SUCCESS) {
+- return THD_FATAL_ERROR;
+- }
++ check_acpi_platform_profile();
+
+ thd_parse_features();
+
diff --git a/thermald.spec b/thermald.spec
index 51c5ac9..4fd3219 100644
--- a/thermald.spec
+++ b/thermald.spec
@@ -5,10 +5,13 @@ Version: 2.5.12
Release: %autorelease
Summary: Thermal Management daemon
-# Automatically converted from old format: GPLv2+ - review is highly recommended.
License: GPL-2.0-or-later
URL: https://github.com/intel/%{pkgname}
-Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
+Source: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
+
+# Backports from upstream
+Patch0: https://github.com/intel/thermal_daemon/commit/32c70aaba5837014fd3a2cb0b7e6b695d13043ad.patch
+Patch1: https://github.com/intel/thermal_daemon/commit/de4821ce559a2041f6a5d574aeca278df340e379.patch
ExclusiveArch: %{ix86} %{x86_64} %{arm64}
@@ -41,7 +44,7 @@ be easily enhanced.
%prep
-%autosetup -n %{pkgname}-%{version} -p 1
+%autosetup -C -p 1
# Create tmpfiles.d config.
mkdir -p fedora_addons
@@ -55,13 +58,15 @@ g power -
EOF
-%build
+%conf
NO_CONFIGURE=1 ./autogen.sh
%configure \
--with-systemdsystemunitdir=%{_unitdir} \
--disable-option-checking \
--disable-silent-rules
+
+%build
%make_build
@@ -92,6 +97,7 @@ install -m0644 -D thermald.sysusers.conf %{buildroot}%{_sysusersdir}/thermald.co
%postun
%systemd_postun_with_restart thermald.service
+
%files
%license COPYING
%config(noreplace) %{_sysconfdir}/%{name}
reply other threads:[~2026-08-09 15:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178628831075.1.16770131912690252734.rpms-thermald-43431ac8e51a@fedoraproject.org \
--to=ngompa@fedoraproject.org \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox