Cpupower: Difference between revisions

From wikinotes
No edit summary
No edit summary
Line 1: Line 1:
Displays cpu frequency info, and can be used as a '''governor''' (see <code>cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors</code>).
Display and/or manages cpu frequency.
Display and/or manages cpu frequency.
= Documentation =
<blockquote>
{| class="wikitable"
|-
| github || https://github.com/torvalds/linux/tree/master/tools/power/cpupower
|-
|}
</blockquote><!-- Documentation -->
= Locations =
<blockquote>
{| class="wikitable"
|-
| <code>/etc/default/cpupower</code> || config
|-
|}
</blockquote><!-- Locations -->


= Install =
= Install =
Line 7: Line 27:
</syntaxhighlight>
</syntaxhighlight>
</blockquote><!-- Install -->
</blockquote><!-- Install -->
= Usage =
<blockquote>
== For Info/Settings ==
<blockquote>
<syntaxhighlight lang="bash">
cpupower monitor        # show stats
cpupower frequency-info  # show range/current
# setting frequencies
cpupower frequency-set -u 3GHz    # set max clock
cpupower frequency-set -d 800MHz  # set min clock
cpupower frequency-set -f 800MHz  # set clock
# governor/driver
cpupower frequency-set -g ${GOVERNOR}
</syntaxhighlight>
</blockquote><!-- Info/Setting -->
== As Governor ==
<blockquote>
<syntaxhighlight lang="bash">
systemctl enable --now cpupower.service
</syntaxhighlight>
</blockquote><!-- As Governor -->
</blockquote><!-- Usage -->


= Configuration =
= Configuration =
<blockquote>
<blockquote>
Configuration isn't necessary, but if you'd like to enforce min/max cpu.


<syntaxhighlight lang="bash">
# /etc/default/cpupower
min_freq="2.25GHz"
max_freq="3GHZ"
# see
</syntaxhighlight>
</blockquote><!-- Configuration -->
</blockquote><!-- Configuration -->

Revision as of 16:28, 7 March 2022

Displays cpu frequency info, and can be used as a governor (see cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors). Display and/or manages cpu frequency.

Documentation

github https://github.com/torvalds/linux/tree/master/tools/power/cpupower

Locations

/etc/default/cpupower config


Install

pacman -S cpupower

Usage

For Info/Settings

cpupower monitor         # show stats
cpupower frequency-info  # show range/current

# setting frequencies
cpupower frequency-set -u 3GHz    # set max clock
cpupower frequency-set -d 800MHz  # set min clock
cpupower frequency-set -f 800MHz  # set clock

# governor/driver
cpupower frequency-set -g ${GOVERNOR}

As Governor

systemctl enable --now cpupower.service

Configuration

Configuration isn't necessary, but if you'd like to enforce min/max cpu.

# /etc/default/cpupower

min_freq="2.25GHz"
max_freq="3GHZ"

# see