public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Kate Hsuan <hpa@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/thermald] f45: Defer service startup until intel_rapl sysfs is available (rhbz#2539078)
Date: Tue, 27 Oct 2026 07:03:51 GMT [thread overview]
Message-ID: <179308463185.1.9447797563191820992.rpms-thermald-0a760fec6d0f@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/thermald
Branch : f45
Commit : 0a760fec6d0f1ab011f6e10ae5a63c690060f943
Author : Kate Hsuan <hpa@redhat.com>
Date : 2026-10-27T14:37:33+08:00
Stats : +93/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/thermald/c/0a760fec6d0f1ab011f6e10ae5a63c690060f943?branch=f45
Log:
Defer service startup until intel_rapl sysfs is available (rhbz#2539078)
Start the daemon after rapl gets initialized
Merge branch "rawhide"
---
diff --git a/607.patch b/607.patch
new file mode 100644
index 0000000..f17946e
--- /dev/null
+++ b/607.patch
@@ -0,0 +1,88 @@
+From a8461eb3465cc4418526db69baf5bfb893c88e48 Mon Sep 17 00:00:00 2001
+From: Kate Hsuan <hpa@redhat.com>
+Date: Thu, 15 Oct 2026 15:45:53 +0800
+Subject: [PATCH] Defer service startup until intel_rapl sysfs is available
+
+Fix a race condition where thermald starts before intel_rapl
+initialization completes, causing a "NO RAPL sysfs present" error. Add
+udev rules and adjust systemd unit configuration so the service waits
+for the intel_rapl driver to finish loading.
+
+Link: https://bugzilla.redhat.com/show_bug.cgi?id=2539078
+---
+ configure.ac | 6 ++++++
+ data/99-thermald-powercap.rules.in | 1 +
+ data/Makefile.am | 9 ++++++++-
+ data/thermald.service.in | 1 +
+ 4 files changed, 16 insertions(+), 1 deletion(-)
+ create mode 100644 data/99-thermald-powercap.rules.in
+
+diff --git a/configure.ac b/configure.ac
+index 39e77918..49baad7b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -50,12 +50,18 @@ if test "x$with_systemdsystemunitdir" != xno; then
+ fi
+ AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ])
+
++AC_ARG_WITH([udevrulesdir],
++ [AS_HELP_STRING([--with-udevrulesdir=DIR], [Directory for udev rules [default=PREFIX/lib/udev/rules.d]])],
++ [], [with_udevrulesdir='${prefix}/lib/udev/rules.d'])
++AC_SUBST([udevrulesdir], [$with_udevrulesdir])
++
+ # print configuration
+ echo
+ echo "System paths:"
+ echo " prefix: $prefix"
+ echo " exec_prefix: $exec_prefix"
+ echo " systemdunitdir: $with_systemdsystemunitdir"
++echo " udevrulesdir: $with_udevrulesdir"
+ echo " tdbinary: $tdbinary"
+ echo " tdconfdir: $tdconfdir"
+ echo " tdrundir: $tdrundir"
+diff --git a/data/99-thermald-powercap.rules.in b/data/99-thermald-powercap.rules.in
+new file mode 100644
+index 00000000..c9d080d5
+--- /dev/null
++++ b/data/99-thermald-powercap.rules.in
+@@ -0,0 +1 @@
++SUBSYSTEM=="powercap", TAG+="systemd"
+diff --git a/data/Makefile.am b/data/Makefile.am
+index 1328be63..525b7ff6 100644
+--- a/data/Makefile.am
++++ b/data/Makefile.am
+@@ -12,6 +12,12 @@ servicedir = $(datadir)/dbus-1/system-services
+ service_in_files = org.freedesktop.thermald.service.in
+ service_DATA = $(service_in_files:.service.in=.service)
+
++udev_in_files = 99-thermald-powercap.rules.in
++udevrules_DATA = $(udev_in_files:.rules.in=.rules)
++
++%.rules: %.rules.in Makefile
++ @$(service_edit) $< >$@
++
+ $(service_DATA): $(service_in_files) Makefile
+ @$(service_edit) $< >$@
+
+@@ -34,7 +40,8 @@ tdconfig_DATA = \
+ EXTRA_DIST = \
+ thermald.service.in \
+ org.freedesktop.thermald.service.in \
++ 99-thermald-powercap.rules.in \
+ $(dbusservice_DATA) \
+ $(tdconfig_DATA)
+
+-CLEANFILES = thermald.service org.freedesktop.thermald.service
++CLEANFILES = thermald.service org.freedesktop.thermald.service 99-thermald-powercap.rules
+diff --git a/data/thermald.service.in b/data/thermald.service.in
+index b2ecafe9..5d7e70c2 100644
+--- a/data/thermald.service.in
++++ b/data/thermald.service.in
+@@ -1,6 +1,7 @@
+ [Unit]
+ Description=Thermal Daemon Service
+ ConditionVirtualization=no
++After=sys-class-powercap.device
+
+ [Service]
+ Type=dbus
diff --git a/thermald.spec b/thermald.spec
index 8d5377e..a4c7888 100644
--- a/thermald.spec
+++ b/thermald.spec
@@ -9,6 +9,10 @@ License: GPL-2.0-or-later
URL: https://github.com/intel/%{pkgname}
Source: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
+# Defer service startup until intel_rapl sysfs is available
+# https://github.com/intel/thermal_daemon/pull/607
+Patch00001: 607.patch
+
ExclusiveArch: %{ix86} %{x86_64} %{arm64}
BuildRequires: make
@@ -109,6 +113,7 @@ install -m0644 -D thermald.sysusers.conf %{buildroot}%{_sysusersdir}/thermald.co
%{_tmpfilesdir}/%{name}.conf
%{_unitdir}/%{name}.service
%{_sysusersdir}/thermald.conf
+%{_udevrulesdir}/99-thermald-powercap.rules
%changelog
reply other threads:[~2026-10-27 7:03 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=179308463185.1.9447797563191820992.rpms-thermald-0a760fec6d0f@fedoraproject.org \
--to=hpa@redhat.com \
--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