Bug 2539078
| Summary: | thermald can start before Intel RAPL sysfs is available during boot | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Dany <dnup> |
| Component: | thermald | Assignee: | Kate Hsuan <hpa> |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 44 | CC: | ali.koroglu, benjamin-fedora, besser82, hpa, lx, ngompa13 |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | thermald-2.5.13-2.fc46 | Doc Type: | --- |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2026-10-27 06:21:20 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Dany
2026-09-23 01:31:18 UTC
### Additional investigation / updated findings I performed additional boot-time testing after filing this report. The original observation of a race between Intel RAPL registration and thermald startup is reproducible. However, the subsequent testing also revealed that the systemd timeouts are an important part of the resulting failure. On the affected system, the vendor/systemd configuration originally showed: ```text TimeoutStartUSec=1s TimeoutStopUSec=1s ``` When thermald starts before the Intel RAPL sysfs interface is available, it reports: ```text NO RAPL sysfs present ``` The first thermald startup can then take longer than the 1-second systemd start timeout: ```text thermald.service: start operation timed out. Terminating. ``` Thermald does not terminate within the following 1-second stop timeout either: ```text thermald.service: State 'stop-sigterm' timed out. Aborting. thermald.service: Killing process ... with signal SIGABRT. ``` This produces the observed thermald coredump. The coredump from the current thermald version was consistent with the process being interrupted while handling the termination signal, rather than with an independent spontaneous crash. I also measured the RAPL race directly with temporary systemd instrumentation. In one boot, `/sys/class/powercap/intel-rapl/intel-rapl:0` appeared approximately 1.54 seconds after the pre-start check began. In another boot, it was available approximately 2 ms after the check began. In a further boot, the relevant monotonic timestamps were: ```text [5.530708] systemd[1]: Starting thermald.service [5.540698] thermald-race: RAPL available [5.939576] systemd[1]: Started thermald.service ``` So RAPL became available approximately 10 ms after the thermald service startup sequence began in that boot. This confirms that the issue is a genuine boot-time ordering/race condition, but that the timing varies significantly between boots. As a workaround, I currently use: ```ini [Service] TimeoutStartSec=15s TimeoutStopSec=15s ExecStartPre=/bin/sh -c 'for i in $(seq 1 300); do [ -e /sys/class/powercap/intel-rapl/intel-rapl:0 ] && exit 0; sleep 0.05; done; exit 1' ``` This waits for the Intel RAPL sysfs interface before starting thermald. I have tested this workaround across a real reboot. With the workaround enabled: * thermald starts successfully; * the `NO RAPL sysfs present` message is avoided; * no thermald startup timeout occurs; * no thermald coredump is generated. Based on these additional observations, the problem appears to involve two related issues: 1. thermald can be started before the Intel RAPL sysfs interface required by its initialization is registered; 2. the Fedora systemd service has a 1-second startup/stop timeout, which is shorter than the observed initialization/termination time on this system. I am not sure whether the preferred fix should be in thermald itself, the Fedora systemd unit, or the kernel/RAPL initialization ordering. Possible fixes would be either: * make thermald tolerate RAPL appearing after daemon startup and retry initialization; or * add an appropriate systemd dependency/ordering mechanism for the required RAPL interface; and/or * increase the thermald service startup/stop timeout so that a slow initialisation does not result in forced SIGABRT termination. The important point is that waiting for `/sys/class/powercap/intel-rapl/intel-rapl:0` before starting thermald reliably eliminates the observed failure on this hardware. Hi Thank you for reporting the issue. You can try 1. Add a new udev rules to tag rapl when it is loaded. Add a new rule called 99-thermald-powercap.rules and place it in /etc/udev/rules.d $cat <<EOF > /etc/udev/rules.d/99-thermald-powercap.rules SUBSYSTEM=="powercap", TAG+="systemd" EOF 2. add `After=sys-class-powercap.device` in the [Unit] section in /usr/lib/systemd/system/thermald.service For example: [Unit] Description=Thermal Daemon Service ConditionVirtualization=no After=sys-class-powercap.device 3. reboot If it works, I'll submit the fix to the upstream. Hi Kate, I tested your proposed fix on my Acer Nitro 5 running Fedora 44, and it works successfully. I added: `/etc/udev/rules.d/99-thermald-powercap.rules` ```udev SUBSYSTEM=="powercap", TAG+="systemd" ``` and used a systemd drop-in: `/etc/systemd/system/thermald.service.d/10-powercap.conf` ```ini [Unit] After=sys-class-powercap.device ``` I removed my previous `ExecStartPre` workaround completely and tested the system with three consecutive reboots. All three boots were successful: * `thermald.service` started normally and remained `active (running)`. * `/sys/class/powercap/intel-rapl/intel-rapl:0` was available on every boot. * No RAPL/powercap startup errors appeared in the journal. * The journal consistently showed `Started thermald.service`. * The old polling workaround is no longer needed. So, at least on my Nitro 5, your proposed udev + systemd dependency solution appears to fix the startup issue reliably. Thanks for working on this and for providing the workaround! Thank you for the test. I'll submit the fix to the upstream and update the package with this solution shortly. FEDORA-2026-7912139c40 (thermald-2.5.13-2.fc46) has been submitted as an update to Fedora 46. https://bodhi.fedoraproject.org/updates/FEDORA-2026-7912139c40 FEDORA-2026-7912139c40 (thermald-2.5.13-2.fc46) has been pushed to the Fedora 46 stable repository. If problem still persists, please make note of it in this bug report. |