Caring for your hardware - cpufreqd settings

This is the software reference for the article on Caring for your hardware.

Relevant commands (on Debian at least):

  • cpufreq-info shows you what frequency your CPU is running at
  • sudo service cpufreqd status shows whether the cpufreqd daemon is running
  • sudo journalctl -u cpufreqd shows the SystemD log of the cpufreqd unit
  • watch sensors shows the current temperatures, updated every 5 seconds using the watch command
  • nano /etc/cpufreqd.conf edit the cpufreqd config file
  • man 5 cpufreqd.conf read the manual for the configuration, which includes a sample config

Laptop settings

My laptop settings, which throttle CPU by temperature when plugged in, and keeps it on power saver when unplugged:

# see CPUFREQD.CONF(5) manpage for a complete reference
# General settings

[General]
pidfile=/var/run/cpufreqd.pid
poll_interval=5
verbosity=4
[/General]


# Profiles which specify various levels of CPU throttling

[Profile]
name=Performance Max
minfreq=100%
maxfreq=100%
policy=performance
[/Profile]

[Profile]
name=Performance High
minfreq=0%
maxfreq=80%
policy=performance
[/Profile]

[Profile]
name=Performance Medium
minfreq=0%
maxfreq=70%
policy=performance
[/Profile]

[Profile]
name=Powersave Low
minfreq=0%
maxfreq=40%
policy=powersave
[/Profile]


# Rules which decide which profile to apply and when

[Rule]
name=CPU Cool
ac=on
acpi_temperature=0-55
profile=Performance Max
[/Rule]

[Rule]
name=CPU Warm
ac=on
acpi_temperature=55-65
profile=Performance High
[/Rule]

[Rule]
name=CPU Hot
ac=on
acpi_temperature=65-70
profile=Performance Medium
[/Rule]

[Rule]
name=CPU TOO HOT!
ac=on
acpi_temperature=70-500
profile=Powersave Low
[/Rule]

# Aggressive power saver when not plugged in
[Rule]
name=AC Off
ac=off
profile=Powersave Low
[/Rule]

Desktop/server settings

My desktop settings (The desktop is always plugged into the power grid, so there is no need to match for ac=on).

# see CPUFREQD.CONF(5) manpage for a complete reference
# General settings
[General]
pidfile=/var/run/cpufreqd.pid
poll_interval=5
verbosity=4
[/General]


# Profiles which specify various levels of CPU throttling

[Profile]
name=Performance Max
minfreq=100%
maxfreq=100%
policy=performance
#exec_post=echo 8 > /proc/acpi/sony/brightness
[/Profile]

[Profile]
name=Performance High
minfreq=0%
maxfreq=80%
policy=performance
[/Profile]

[Profile]
name=Performance Medium
minfreq=0%
maxfreq=70%
policy=performance
[/Profile]

[Profile]
name=Powersave Low
minfreq=40%
maxfreq=40%
policy=powersave
[/Profile]


# Rules which decide which profile to apply and when

[Rule]
name=CPU Cool
acpi_temperature=0-35
profile=Performance Max
[/Rule]

[Rule]
name=CPU Warm
acpi_temperature=35-45
profile=Performance High
[/Rule]

[Rule]
name=CPU Hot
acpi_temperature=45-60
profile=Performance Medium
[/Rule]

[Rule]
name=CPU TOO HOT!
acpi_temperature=60-200
profile=Powersave Low
[/Rule]

Comments