# Overclocking Patches

## KWhat

The linux kernel really doesn't like overclocking and seems to panic if there is a cpu thermal event.  Does anyone know if there is a patch set to prevent halts due to thermal events?

----------

## eccerr0r

My i5 gets thermal events frequently but does not panic.

What CPU and exactly what events show up?

----------

## PaulBredbury

Undervolt, to help keep the CPU cool. Here's how:

For an Intel CPU, get phc-intel-pack-rev11.tar.bz2, Then in the "inc" dir, go to dir for your kernel, and get a single patch.

Edit: Bah, URL above is a dead link, so here's PHC releases thread.

Apply the patch (to drivers/cpufreq/acpi-cpufreq.c), just before compiling a kernel, like this:

```
patch -d drivers/cpufreq -Np0 -i $PATCH_DIR/linux-phc-0.4.0.patch
```

A little undervolt startup script I've just started using:

```
DEFAULTS="41 35 23 19"

VIDS="27 27 14 10"

if [[ `cat /sys/devices/system/cpu/cpu0/cpufreq/phc_default_vids` != $DEFAULTS ]] ; then

    echo "Unexpected defaults - will not undervolt!"

    exit 1

fi

# Have to apply to all cores

for cpu in /sys/devices/system/cpu/cpu*/cpufreq/phc_vids ; do

    echo $VIDS > $cpu

done
```

You have to experiment, to find the low-but-still-stable values. The first number in $VIDS, which applies to the highest performance state, is the most important to make low, because that produces the most heat.

My laptop runs hot, and this tweak helps with (but does not completely fix) the CPU's thermal throttling  :Very Happy: Last edited by PaulBredbury on Wed Feb 26, 2014 8:48 pm; edited 4 times in total

----------

## Jaglover

sys-power/phc-intel

It's in portage.

----------

