DEV Community

Masih Maafi
Masih Maafi

Posted on

How I Saved My Laptop CPU After a Bad Thermal Paste Job (Windows + Linux)

The Problem: A "Fixed" Laptop That Got Worse

About three years of heavy use in, I took my laptop in for a routine cleaning. Fan vents clogged, running hot — the usual. The technician cleaned it up and replaced the thermal paste. Standard stuff.

Except it wasn't. After getting it back, something was wrong.

In games like Elden Ring and Sekiro: Shadows Die Twice — demanding but not unusually so — my CPU used to top out around 75°C. Warm, manageable, stable. After the service? It was sitting above 90°C consistently. Throttling. Spiking. Never coming down.

The thermal paste had been applied badly. Too much, wrong type, poor spread — I'll never know exactly, but the result was clear: my laptop was now thermally worse than before it was serviced.

No Warranty, No Local Expert

Here's where it got frustrating: I hadn't bought this laptop in my home country. The local warranty system doesn't cover that. Refused, end of story.

And finding a technician I could actually trust with a disassembly? That's harder than it sounds. I've seen what bad service jobs do — I was living with one. So I decided to handle it myself. Not the thermal paste (yet) — but the temperatures.

Step 1: Windows — 99% CPU Cap (Surprisingly Effective)

The quickest win was on Windows. In Power Options → Advanced → Processor power management, I set the Maximum processor state to 99%.

That's it. One percent less.

This disables Intel's Turbo Boost — a feature that temporarily spikes the CPU far above its base clock for short bursts. It sounds drastic, but in practice: zero noticeable quality loss in Elden Ring or Sekiro, and temperatures dropped back below 70°C.

The CPU still runs at full base clock. Turbo is a headroom feature, not a sustained performance feature. For gaming at 1080p, you don't need it.

This bought me stability on Windows. But I spend most of my time on Linux — and there, I wanted something more robust.

Step 2: Linux — A 3-Tier Thermal Manager

On Linux, the equivalent of "disable turbo" is one line (echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo), but I wanted something smarter: automatic, tiered, and running before I even log in.

I discovered the msi-ec kernel module — a DKMS driver that exposes the MSI laptop's Embedded Controller, including a cooler_boost sysfs node that does exactly what Fn+F8 does: forces the fans to maximum.

With that, I built a 3-tier system:

Tier 1 — Fan Boost at 70°C (System Service, Pre-Login)

A root-level systemd service monitors CPU temperature every 2 seconds. When it hits 70°C, it writes on to /sys/devices/platform/msi-ec/cooler_boost. When temp drops back below 68°C (hysteresis to avoid flutter), it writes off.

This runs before any user logs in — at the system level.

# /usr/local/sbin/msi-cooler-boost (excerpt)
if [ "$temp" -ge 70 ] && [ "$boosting" -eq 0 ]; then
    echo on > /sys/devices/platform/msi-ec/cooler_boost
    boosting=1
    logger -t msi-cooler-boost "ON at ${temp}°C"
fi
Enter fullscreen mode Exit fullscreen mode

Tier 2 — CPU Frequency Throttle at 75°C (thermald)

Intel's thermald daemon runs in adaptive mode by default, using the platform's own DPTF tables. I supplemented it with a custom XML config that adds a passive CPU frequency trip point at 75°C — so if the fans alone aren't enough, thermald starts walking down the CPU's frequency states.

<TripPoint>
  <SensorType>x86_pkg_temp</SensorType>
  <Temperature>75000</Temperature>
  <type>passive</type>
  <CoolingDevice>
    <type>cpufreq</type>
    <influence>100</influence>
  </CoolingDevice>
</TripPoint>
Enter fullscreen mode Exit fullscreen mode

This keeps the existing adaptive DPTF policy intact — the custom config is additive, not replacing.

Tier 3 — Kill & Notify at 81°C (User Service)

A user-level systemd service (runs after login) monitors the same temp sensor. If things still reach 81°C, it:

  1. Finds the top CPU-consuming user process
  2. Sends SIGTERM, waits 2s, then SIGKILL if needed
  3. Fires a desktop notification so you know what was terminated
# Graceful kill with fallback to SIGKILL
kill -15 "$pid"
sleep 2
if kill -0 "$pid" 2>/dev/null; then
    kill -9 "$pid"
fi
notify-send -u critical "CPU Temp Spike: ${temp}°C" \
    "Terminated '$comm' to prevent overheating."
Enter fullscreen mode Exit fullscreen mode

The Full Picture

Tier Trigger Action Runs
1 ≥ 70°C Cooler boost ON (fans max) Before login
2 ≥ 75°C CPU freq throttle Always
3 ≥ 81°C Kill process + notify After login

Everything is automatic and persistent across reboots:

  • msi-ec loads via /etc/modules-load.d/
  • udev rule makes the cooler_boost node group-writable on load
  • System service is enabled in multi-user.target
  • User service is enabled via systemctl --user enable

Install It Yourself

Everything — scripts, service files, thermald config, and a one-shot install.sh — is in the GitHub repo:

👉 github.com/MasihMoafi/msi-linux-thermal

The install script handles msi-ec DKMS build, udev rules, group setup, and service registration in one run. Tested on Ubuntu 24.04 with kernel 7.x.

Note: Check the msi-ec supported device list before installing. Your MSI model needs to be on it for the cooler boost tier to work. The thermald and kill tiers work on any Intel laptop.


Sometimes the right fix isn't opening the chassis — it's writing a better daemon.

Top comments (0)