Difference between revisions of "How to configure cpufreqd"

From ThinkWiki
Jump to: navigation, search
 
(10 intermediate revisions by 7 users not shown)
Line 1: Line 1:
 +
{{NOTE|Make sure you have the appropriate kernel modules loaded, such as <tt>cpufreq_powersave</tt>, <tt>cpufreq_userspace</tt>, and <tt>cpufreq_ondemand</tt> (see above note).}}
 +
 
In Debian, all you have to do is:
 
In Debian, all you have to do is:
apt-get install cpufreqd
+
:{{cmdroot|apt-get install cpufreqd}}
  
 
And in most cases it will work out of the box.
 
And in most cases it will work out of the box.
  
This is the default Debian config, but works well out of the box:
+
This is the default Debian config, but works well out of the box. Notice that the syntax for the config file has changed in cpufreqd-2.0.0, where you need to close [] sections with tags like [/Profile] or [/Rule].
  
 
  # this is a comment
 
  # this is a comment
Line 31: Line 33:
 
  #
 
  #
 
  # see CPUFREQD.CONF(5) manpage for a complete reference
 
  # see CPUFREQD.CONF(5) manpage for a complete reference
 
+
 
  [General]
 
  [General]
 
  pidfile=/var/run/cpufreqd.pid
 
  pidfile=/var/run/cpufreqd.pid
Line 38: Line 40:
 
  # Uncomment the following line to enable ACPI workaround (see cpufreqd.conf(5)) # acpi_workaround=1
 
  # Uncomment the following line to enable ACPI workaround (see cpufreqd.conf(5)) # acpi_workaround=1
 
  verbosity=4 #(if you want a minimal logging set to 5)
 
  verbosity=4 #(if you want a minimal logging set to 5)
 
+
 
  [Profile]
 
  [Profile]
 
  name=hi_boost
 
  name=hi_boost
Line 44: Line 46:
 
  maxfreq=100%
 
  maxfreq=100%
 
  policy=performance
 
  policy=performance
 
+
 
  [Profile]
 
  [Profile]
 
  name=medium_boost
 
  name=medium_boost
Line 50: Line 52:
 
  maxfreq=66%
 
  maxfreq=66%
 
  policy=performance
 
  policy=performance
 
+
 
  [Profile]
 
  [Profile]
 
  name=lo_boost
 
  name=lo_boost
Line 56: Line 58:
 
  maxfreq=33%
 
  maxfreq=33%
 
  policy=performance
 
  policy=performance
 
+
 
  [Profile]
 
  [Profile]
 
  name=lo_power
 
  name=lo_power
Line 62: Line 64:
 
  maxfreq=33%
 
  maxfreq=33%
 
  policy=powersave
 
  policy=powersave
 
+
 
  # conservative mode when not AC
 
  # conservative mode when not AC
 
  [Rule]
 
  [Rule]
Line 72: Line 74:
 
  delay_cycles=3
 
  delay_cycles=3
 
  profile=lo_boost
 
  profile=lo_boost
 
+
 
  # need some power
 
  # need some power
 
  [Rule]
 
  [Rule]
Line 80: Line 82:
 
  cpu_interval=30-80
 
  cpu_interval=30-80
 
  profile=medium_boost
 
  profile=medium_boost
 
+
 
  # need big power (not if battery very low)
 
  # need big power (not if battery very low)
 
  [Rule]
 
  [Rule]
Line 88: Line 90:
 
  cpu_interval=70-100
 
  cpu_interval=70-100
 
  profile=medium_boost
 
  profile=medium_boost
 
+
 
  # full power when AC
 
  # full power when AC
 
  [Rule]
 
  [Rule]
Line 94: Line 96:
 
  ac=on                  # (on/off)
 
  ac=on                  # (on/off)
 
  profile=hi_boost
 
  profile=hi_boost
 
+
 
  # full power when watching DVDs and not AC:
 
  # full power when watching DVDs and not AC:
 
  # this is the last rule and takes less
 
  # this is the last rule and takes less

Latest revision as of 00:35, 18 January 2006

NOTE!
Make sure you have the appropriate kernel modules loaded, such as cpufreq_powersave, cpufreq_userspace, and cpufreq_ondemand (see above note).

In Debian, all you have to do is:

# apt-get install cpufreqd

And in most cases it will work out of the box.

This is the default Debian config, but works well out of the box. Notice that the syntax for the config file has changed in cpufreqd-2.0.0, where you need to close [] sections with tags like [/Profile] or [/Rule].

# this is a comment
#
# you need: 1 [General] section,
#           1 or more [Profile] sections
#                1 or more [Rule] sections
#
# a section ends at the first blank line
#
# [Rule] sample:
#           [Rule]
#           name=sample_rule
#           ac=on                    # (on/off)
#           battery_interval=0-10
#           cpu_interval=30-60
#           programs=xine,mplayer
#           profile=sample_profile
#
# [Profile] sample:
#           [Profile]
#           name=sample_profile
#           minfreq=10%
#           maxfreq=100%
#           policy=performance
#
# see CPUFREQD.CONF(5) manpage for a complete reference

[General]
pidfile=/var/run/cpufreqd.pid
poll_interval=2
pm_type=acpi #(acpi, apm or pmu)
# Uncomment the following line to enable ACPI workaround (see cpufreqd.conf(5)) # acpi_workaround=1
verbosity=4 #(if you want a minimal logging set to 5)

[Profile]
name=hi_boost
minfreq=66%
maxfreq=100%
policy=performance

[Profile]
name=medium_boost
minfreq=33%
maxfreq=66%
policy=performance

[Profile]
name=lo_boost
minfreq=0%
maxfreq=33%
policy=performance

[Profile]
name=lo_power
minfreq=0%
maxfreq=33%
policy=powersave

# conservative mode when not AC
[Rule]
name=conservative
ac=off                   # (on/off)
battery_interval=0-100
cpu_interval=0-40
cpu_nice_scale=1.5
delay_cycles=3
profile=lo_boost

# need some power
[Rule]
name=lo_cpu_boost
ac=off                   # (on/off)
battery_interval=0-100
cpu_interval=30-80
profile=medium_boost

# need big power (not if battery very low)
[Rule]
name=hi_cpu_boost
ac=off                   # (on/off)
battery_interval=50-100
cpu_interval=70-100
profile=medium_boost

# full power when AC
[Rule]
name=AC_on
ac=on                   # (on/off)
profile=hi_boost

# full power when watching DVDs and not AC:
# this is the last rule and takes less
# precedence with respect to the others
[Rule]
name=dvd_watching
ac=off                   # (on/off)
battery_interval=0-100
programs=xine,totem,vlc,avidemux
cpu_interval=0-100
profile=hi_boost