ncpufreqd(8) ncpufreqd(8)
NAME
ncpufreqd - daemon for throttling CPU speed
SYNOPSIS
ncpufreqd [--version]
DESCRIPTION
ncpufreqd watches CPU temperature via ACPI's ( /proc/acpi/ther-
mal_zone/THM0/temperature ) interface. If temperature exceeds defined
value (in configuration file /etc/ncpufreqd.conf ) ncpufreqd will lower
the speed of CPU via cpufreq or ACPI's throttling interface. If temper-
ature drops below "low" temperature speed of CPU is restored to maxi-
mum. When machine is running on batteries (as indicated by ACPI) speed
of CPU is set to powersave mode (for cpufreq interface) or is throttled
down (ACPI throttling) to save batteries.
ncpufreqd requires ACPI's modules to be loaded (ACPI can be also com-
piled into kernel). Following kernel options are required as modules or
compiled into kernel: CONFIG_ACPI_AC, CONFIG_ACPI_PROCESSOR, CON-
FIG_ACPI_THERMAL. For ACPI throttling to work the processor has to sup-
port it. Most modern processor do so. cpufreq interface requires 2.6
series kernel and sysfs mounted on /sys , also this kernel options are
required: CONFIG_CPU_FREQ, CONFIG_CPU_FREQ_GOV_PERFORMANCE and CON-
FIG_CPU_FREQ_GOV_POWERSAVE.
EXIT STATUS
-2 when tried to run by normal user (not root)
-1 when fork() call failed (very unlikely)
In any other case the daemon returns 0. ncpufreqd logs all messages to
system logger.
USAGE
Configure ncpufreqd with /etc/ncpufreqd.conf and add it to init scripts
to run automaticaly on boot up.
FILES
/etc/ncpufreqd.conf - configuration file for daemon
CONFIGURATION
Following settings are valid in /etc/ncpufreqd.conf :
use_cpufreq If set to 1 ncpufreqd will use cpufreq interface, if
set to 0 it will use ACPI throttling
temp_high Sets the high temperature - if current temperature
exceeds this temperature ncpufreqd will cut the pro-
cessor power as much as possible, allowing it to
cool down.
temp_low Sets the low temperature - if current temperature is
below this temperature ncpufreqd will set the pro-
cessor speed to maximum.
throttling_states Sets the number of allowed states. This value can be
obtained from /proc/acpi/processor/CPU/throttling in
the "state count" line.
throttling_offline This value will be used to throttle processor speed
when AC is off-line (running on batteries). Recom-
mended value is that which cuts about 60% of proces-
sor speed (check /proc/acpi/processor/CPU/throttling
to see which state it is).
verbose Sets the verbosity level - how much of data will the
daemon send to system logger. Recomended values are
0 or 1. Setting verbose to 2 will produce huge
ammount of garbage in system logs (it's useful only
when debugging the daemon).
sleep How long to sleep between 'ticks' in seconds - how
often the daemon should check the AC state and tem-
perature of CPU. Recomended values are from 3 to 6
seconds. Allowed values are in range from 1 second
to 30 seconds.
fifo If set to 1 daemon will create /dev/ncpufreqd fifo
(pipe), which can be used to tune it's behaviour
when using cpufreq interface. ncpufreqd will refuse
to create the fifo if running with ACPI throttling
instead of cpufreq interface.
wheel_write If set to value other than 0 /dev/ncpufreqd will be
writable by members of wheel group.
default_mode Sets default mode (0 for auto, 1 for powersave, 2
for performance). Default mode is 0 - auto (change
processor speed depending on temperature).
PROGRAMS
ncpufreqd installs ncpuauto , ncpuperformance and ncpupowersave bina-
ries - this programs use the fifo created by the daemon to control
which governor will be used (powersave or performance). Setting auto
(via running ncpuauto ) will return the control over processor to
ncpufreqd ). Using each of this programs is equal to running
echo {powersave,performance,auto} > /dev/ncpufreqd
NOTES
Don't set the temp_high to too high value, or You may burn Your proces-
sor. Most modern processor have a built-in security chip, that will
turn them off before frying them, but... I've warned You.
BUGS
None observed. If You found a bug please contact the author.
AUTHOR
Krzysiek 'Nelchael' Pawlik <krzysiek.pawlik@people.pl>
SEE ALSO
http://www.gentoo.org/doc/en/power-management-guide.xml - great guide
about power management by Dennis Nienhüser.
ncpufreqd 2006-11-23 ncpufreqd(8)