Dell XPS 13 / power

Laptop CPU power: intel_rapl

FreeBSD had no way to see how many watts the CPU package draws, or to change its power limits. intel_rapl does both, where the firmware allows.

A round gauge, mostly grey with a red arc, reading 20.8 W.

works Version 0.2.0 (12 September 2026), BSD 2-Clause, FreeBSD 13 and newer, Intel Sandy Bridge or newer. Source: spagu/intel_rapl. Someone also reported it working on MidnightBSD 4.0.9 with a Core Ultra 5 245K.

Install

make build
sudo make install      # into /boot/modules
sudo make load
make status

To load at boot, put intel_rapl_load="YES" in /boot/loader.conf. kld_list="intel_rapl" in rc.conf also works, but not when limits are set in /etc/sysctl.conf: rc.d/sysctl runs before rc.d/kld, and the write fails with unknown oid.

Expected dmesg line on the XPS:

intel_rapl: package TDP 15 W, accepting 5-30 W, register locked by firmware

Use

sysctl hw.intel_rapl
sysctl hw.intel_rapl.pl1_watts=10

The unreleased version adds pl1_window_ms and pl2_window_ms. The XPS ships with pl1_window_sec: 28.

What the XPS showed

On this laptop Dell's firmware locks the limit register, so the driver can measure but not set:

sysctl: hw.intel_rapl.pl1_watts=10: Operation not permitted

The measurements were still worth it. With a heatsink overdue for cleaning:

StatePackage powerTemperature
Idle3.5 to 6.4 W52 °C
Full load17.9 to 20.8 W97 to 100 °C, throttled to 500 MHz
Right after stopping2.2 W

That is 18 to 21 W sustained on a CPU designed for 15 W.

Built with ssg