OBSDFREQD(1)

NAME
obsdfreqd - manage the CPU frequency on OpenBSD from userland

SYNOPSIS
obsdfreqd [-hv] [-d downstepfrequency] [-i inertia] [-m maxfrequency] [-l minfrequency] [-r threshold] [-s stepfrequency] [-t timefrequency] [-T maxtemperature [-S sensorpath]]

DESCRIPTION
obsdfreqd is a program to play with the CPU frequency scheduler by providing many variables involved in the process. obsdfreqd will switch the frequency policy to manual to manage the frequency itself and will restore the policy to auto upon exit.

OpenBSD 7.6 added a sysctl(2) hw.perfpolicy that can be used to restore the previous behavior when setting it to auto, making obsdfreqd obsolete when advanced control over temperature or frequency is not needed.

OPTIONS
Arguments can be comma separated to provide different values for when on battery, if so, the first value is used when power plug is connected and second value when on battery.

-v  Enable verbose output in CSV format.

-h  Display usage

-d downstepfrequency
    Defines the frequency decrease step in percent. The default is 100.

-i inertia
    Defines the number of cycles under the CPU threshold before decreasing frequency. The default is 0.

-m maxfrequency
    Defines the maximum frequency in percent the CPU can be increased to. The default is 100.

-l minfrequency
    Defines the minimum frequency in percent the CPU can be reduced to. The default is 0.

-r threshold
    Defines the CPU usage in percent above which the frequency is increased. The default is to use a value that match the usage of 80% of a single core. Example: for a 4 CPU system, the threshold will be 100/4*0.8 = 20%

-s stepfrequency
    Defines the frequency increase step in percent. The default is 10.

-t timefrequency
    Defines the time in milliseconds between each cycle. The default is 300.

-T maxtemperature
    Defines the maximum temperature in Celcius obsdfreqd will allow before lowering the maximum frequency until the temperature cooled down.

-S sensorpath
    In conjunction with -T, allows you to specify which sensor to use for temperature readings. If unspecified, obsdfreqd will try to guess which temperature sensor to use (usually hw.sensors.cpu0.temp0).

EXIT STATUS

EXAMPLES
Temperature throttling at 50°C

    obsdfreqd -T 50

Temperature throttling at 50°C using sensor hw.sensors.acpithinkpad0.temp0

    obsdfreqd -T 50 -S hw.sensors.acpithinkpad0.temp0

DIAGNOSTICS
obsdfreqd has a verbose mode to get realtime information about frequency.

AUTHORS
See the LICENSE file for the authors.

LICENSE
See the LICENSE file for the terms of redistribution.

BUGS
When set to run a startup, if you also start the apmd(8) service, make sure to start it with -H or -L to avoid apmd(8) to reset the performance policy to automatic which would cause obsdfreqd to crash.

There may be other bugs.