Skip to main content

Work around overheating with cpufreq-set

One of my Gentoo boxes has overheating issues which I have yet to properly address on hardware level. Compiling something like Boost or Firefox results in a guaranteed emergency reboot, literally not cool. The box has a dual core CPU with 2.53 GHz. Fortunately, it can be throttled to do operate at a lower frequency which results in less heat from the CPU. Using cpufreq-info(1) I can see that the CPU is happy to operate under a few alternative frequencies:

$ cpufreq-info | fgrep 'available frequency' | head -n 1
  available frequency steps: 2.53 GHz, 2.53 GHz, 1.60 GHz, 800 MHz

Now different CPU governors give me different options:

  • Governor 'performance' runs at maximum frequency (i.e. 2.53 GHz), not cool
  • Governor 'powersave' runs at the minimum frequency (i.e. 800 MHz) where compilation may take forever
  • Governor 'ondemand' jumps from mode to mode depending on workload: still reboots from overheating
  • Governor 'userspace' allows me to keep the frequency at 1.60 GHz -- nice!

You can check for availability of a specific CPU governor with

$ zgrep FREQ_GOV_ /proc/config.gz

and make use of modprobe(8) as needed. So with a single call

$ sudo cpufreq-set -r --min 1.60Ghz --max 1.60Ghz -g userspace

that box seems to stop overheating for now. Nice! [EDIT] : What Robin is suggesting in the comments would make

$ sudo cpufreq-set -r --max 1.60GHz -g ondemand

on the shell.