How does Fedora handle thermal management?

I have an interest in how Fedora handles thermal profiles.

What software and firmware elements are in play?

What and where are the relevant config files?

If a config file reverts to a previous setting, how to make it ‘sticky’?

Some hints in which you can go deeper:

man thermald (description)
DESCRIPTION
       thermald is a Linux daemon used to prevent the overheating of platforms. This daemon monitors temperature and applies compensation using available cool‐
       ing methods.
       By default, it monitors CPU temperature using available CPU digital temperature sensors and maintains CPU temperature under control, before HW takes ag‐
       gressive correction action.

Thermal  daemon  looks  for thermal sensors and thermal cooling drivers in the Linux thermal sysfs (/sys/class/thermal) and builds a list of sensors and
       cooling drivers. Each of the thermal sensors can optionally be binded to a cooling driver by the in kernel drivers. In this case the Linux kernel  ther‐
       mal core can directly take actions based on the temperature trip points, for each sensor and associated cooling device. For example a trip temperature X
       in a sensor can be associates a cooling driver Y. So when the sensor temperature = X, the cooling driver "Y" is activated.

       Thermal  daemon  allows  one  to change this relationship or add new one via a thermal configuration file (thermal-conf.xml). This file is automatically
       created (thermal-conf.xml.auto) and used, if the platform has ACPI thermal relationship table.  If not this needs to be manually configured.

       For manual configuration refer to the manual page of the thermal-conf.xml.

       In some newer platforms the auto creation  of  the  config  file  is  done  by  a  companion  tool  "dptfxtract".  This  tool  can  be  downloaded  from
       "https://github.com/intel/dptfxtract". It is suggested as parts of the install process, run dptfxtract.

       There  can  be multiple configuration files. User can select a configuration file via -config-file option to override the default selection. The default
       selection picks one of the file in the following order:

       - /etc/thermald/thermal-conf.xml.auto

       - /var/run/thermald/thermal-conf.xml.auto

       - /etc/thermald/thermal-conf.xml

       (*Assuming configure prefix=/ is used during build.)

       There is another companion tool "ThermalMonitor", which presents a graphical front end. This allows the monitoring of sensors and  changing  of  thermal
       trips to give the user more control. The source code of "ThermalMonitor" is a part of the thermald github source, in the tools folder.
1 Like

I have a Dell Latitude 5591 and set a firmware-level fan/cooling profile from smbios-thermal-ctl:

sudo smbios-thermal-ctl --set-thermal-mode='performance'

It applies everywhere Windows/Linux/FreeBSD and with reboots; only resets to default Balanced with a CMOS reset. I prefer the hardware handling thermals vs software OS-side.


I haven’t heard of other thermal management methods on Linux, but I’m used to laptops handling fan speeds and not exposing it to the OS, and desktop motherboards with their own fan PWM profiles/settings in BIOS.

4 Likes