Modern mobile processors and compact workstations pack multi-core silicon into thin enclosures where thermal dissipation directly constrains sustained computing performance. While the Linux kernel includes basic ACPI thermal trip drivers, aggressive or reactive CPU throttling can result in abrupt clock fluctuations, audible fan cycling, and degraded user experience. In Ubuntu, Intel and open-source engineers provide the Linux Thermal Daemon (thermald)—a proactive user-space daemon that monitors platform temperature sensors, reads Dynamic Platform and Thermal Framework (DPTF) tables, and coordinates multi-zone cooling actions before silicon reaches emergency throttling thresholds. Configuring thermald empowers system administrators to establish custom thermal zones, fine-tune fan acoustics, and maximise sustained computational throughput.
How thermald Operates Across Linux Cooling Zones
Unlike basic reactive throttling built into BIOS microcode, thermald evaluates cooling decisions continuously using proportional-integral-derivative (PID) control algorithms:
- Thermal Zones: Temperature sensors exposed via sysfs (such as
/sys/class/thermal/thermal_zone*) monitoring CPU packages, GPU cores, battery cells, skin sensors, and ambient chassis thermistors. - Cooling Devices: Hardware actuators exposed via
/sys/class/thermal/cooling_device*, including system PWM cooling fans, processor P-state limiters (intel_pstate), RAPL (Running Average Power Limit) package clamps, and backlight brightness reduction. - Trip Points: Temperature thresholds (expressed in millidegrees Celsius) that trigger corresponding cooling actions:
Passive:Non-mechanical cooling adjustments (such as slight RAPL wattage reductions or CPU frequency caps) to contain temperature quietly.Active:Mechanical cooling activation (ramping fan RPM curves).Critical:Emergency shutdown or aggressive throttling to protect hardware from thermal destruction.
Auditing Active Thermal Zones and Cooling Devices
Before customising thermal policies, audit the thermal hardware sensors detected by your Ubuntu system. Open the terminal and query sysfs thermal zones:
# Query detected thermal zones and current temperatures
for zone in /sys/class/thermal/thermal_zone*; do
type=$(cat "$zone/type" 2>/dev/null)
temp=$(cat "$zone/temp" 2>/dev/null)
temp_c=$(awk "BEGIN {print $temp / 1000}")
echo "$(basename "$zone"): $type - ${temp_c}°C"
done
To inspect available cooling devices and their current operational levels:
for dev in /sys/class/thermal/cooling_device*; do
type=$(cat "$dev/type" 2>/dev/null)
cur=$(cat "$dev/cur_state" 2>/dev/null)
max=$(cat "$dev/max_state" 2>/dev/null)
echo "$(basename "$dev"): $type (Current: $cur / Max: $max)"
done
Installing and Verifying the thermald Service
On modern Ubuntu installations (including Ubuntu 24.04 and 22.04 LTS), thermald is available directly from the standard repositories.
# Install thermald and monitoring utilities
sudo apt update
sudo apt install -y thermald lm-sensors
# Verify active service status
sudo systemctl status thermald
To view real-time thermal management decisions, run thermald in interactive diagnostic mode:
sudo thermald --no-daemon --loglevel=debug
Creating a Custom Thermal Configuration File
By default, thermald automatically derives policies from ACPI DPTF tables. However, on machines with noisy fans or custom workloads, you can define explicit cooling zone rules in /etc/thermald/thermal-conf.xml.
Create a custom configuration file defining thermal trip points and cooling device bindings:
sudo tee /etc/thermald/thermal-conf.xml << 'EOF'
<?xml version="1.0"?>
<ThermalConfiguration>
<Platform>
<Name>Custom Workstation Profile</Name>
<ProductName>*</ProductName>
<Preference>QUIET</Preference>
<ThermalZones>
<ThermalZone>
<Type>x86_pkg_temp</Type>
<TripPoints>
<!-- Stage 1: Soft RAPL capping at 75°C to preserve fan silence -->
<TripPoint>
<SensorType>x86_pkg_temp</SensorType>
<Temperature>75000</Temperature>
<Type>Passive</Type>
<CoolingDevice>
<Type>rapl_controller</Type>
<SamplingPeriod>2</SamplingPeriod>
<TargetState>1</TargetState>
</CoolingDevice>
</TripPoint>
<!-- Stage 2: Fan cooling ramp at 85°C -->
<TripPoint>
<SensorType>x86_pkg_temp</SensorType>
<Temperature>85000</Temperature>
<Type>Active</Type>
<CoolingDevice>
<Type>Processor</Type>
<SamplingPeriod>1</SamplingPeriod>
<TargetState>2</TargetState>
</CoolingDevice>
</TripPoint>
</TripPoints>
</ThermalZone>
</ThermalZones>
</Platform>
</ThermalConfiguration>
EOF
Applying and Monitoring Thermal Policy Changes
Validate the syntax of your configuration file and restart the daemon:
# Restart the thermald daemon
sudo systemctl restart thermald
# Verify journal logs for configuration loading
sudo journalctl -u thermald -n 20 --no-pager
Look for confirmation lines such as sysfs open failed /etc/thermald/thermal-conf.xml: parsed successfully and Polling mode is enabled.
Stress Testing Thermal Behavior Under Load
To observe thermald managing temperature thresholds in real time, monitor CPU frequencies alongside temperature curves during a synthetic workload:
# In Terminal 1: Watch real-time package temperatures and clock speeds
watch -n 1 "sensors | grep -E 'Package id 0|Core'; cpupower frequency-info | grep 'current CPU frequency'"
# In Terminal 2: Run a multi-core workload
stress-ng --cpu $(nproc) --timeout 30s --metrics-brief
Observe how thermald gently constrains peak RAPL package wattage to stabilize thermal headroom before aggressive hardware trip limits force abrupt clock drops.
Tuning cooling zones with thermald delivers predictable thermal performance, reduced acoustic noise, and extended hardware lifespan across Ubuntu workstations.