# Cpufreqd with CPU temperature.

## brianhsu

I got an Acer 3820 with an i5-450 processor.

Follow with the instruction described at Gentoo Power Management Guide,it works well with cpufreqd, I could let it scalaing CPU frequency by different governors according to AC connected/disconnected and current battery level.

But I would like cpufreqd scale down to minimal CPU frequency when CPU temperature is high when use portage to build software.

So I added the hotcpu rule into /etc/cpufreqd.conf, which is basically come from the original distrubtion of cpufreqd, here is my cpufreqd.conf.

```

[General]

pidfile=/var/run/cpufreqd.pid

poll_interval=3

enable_plugins=acpi_ac, acpi_battery

enable_remote=1

remote_group=wheel

verbosity=5

[/General]

[Profile]

name=ondemand

minfreq=0%

maxfreq=100%

policy=ondemand

[/Profile]

[Profile]

name=conservative

minfreq=0%

maxfreq=100%

policy=conservative

[/Profile]

[Profile]

name=powersave

minfreq=0%

maxfreq=10%

policy=powersave

[/Profile]

[Profile]

name=performance

minfreq=0%

maxfreq=100%

policy=performance

[/Profile]

[Rule]

name=battery

ac=off

profile=conservative

[/Rule]

[Rule]

name=battery_low

ac=off

battery_interval=0-20

profile=powersave

[/Rule]

[Rule]

name=ac

ac=on

profile=ondemand

[/Rule]

[Rule]

name=hotcpu

acpi_temperature=55-100

profile=powersave

[/Rule]

```

And I've confirmed ACPI thermal kernel module is loaded, I got the following two thermal zone under /proc/acpi/thermal_zone.

/proc/acpi/thermal_zone/TZS0

/proc/acpi/thermal_zone/TZS1

Where TZS0 is CPU temperature.

But it seems not working, when AC is connected, and my CPU temperature >= 55, it is still using ondemand instead of powersave.

I also tried modify 

```
acpi_temperature=55-100
```

 to 

```
acpi_temperature=TZS0:55-100
```

 according to cpufreqd.conf man pages. But it still not working, and cpufreqd complains that there is no TZS0 thermal_zone.

Where should I check to make this work?

----------

## mikegpitt

Perhaps you are setting your cpufreq too low in your powersave profile.  I personally use this temp rule in the default gentoo cpufreqd.conf.

```
...

[Profile]

name=Performance Low

minfreq=80%

maxfreq=80%

policy=performance

[/Profile]

...

[Rule]

name=CPU Too Hot

acpi_temperature=80-100

cpu_interval=50-100

profile=Performance Low

[/Rule]

...

```

----------

## dreadlorde

What version of the kernel are you running?

I had problems with all of the governors + cpufreqd when I used 2.6.30; someone told me in #gentoo that there were some problems with the governors with 2.6.30. I've upgraded to 2.6.31 and my cpu temperature is about 10°C cooler on my laptop.

----------

