# Laptop CPU power: intel_rapl

<span class="badge badge-ok">works</span> Version 0.2.0 (12 September 2026), BSD 2-Clause, FreeBSD 13 and newer, Intel Sandy Bridge or newer. Source: [spagu/intel_rapl](https://github.com/spagu/intel_rapl). Someone also reported it working on MidnightBSD 4.0.9 with a Core Ultra 5 245K.

## Install

```sh
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:

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

## Use

```sh
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:

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

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

| State | Package power | Temperature |
|---|---|---|
| Idle | 3.5 to 6.4 W | 52 °C |
| Full load | 17.9 to 20.8 W | 97 to 100 °C, throttled to 500 MHz |
| Right after stopping | 2.2 W | |

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