xref: /dragonfly/usr.sbin/powerd/powerd.8 (revision 745703c7)
1.\" (c) Copyright 2010 by Matthew Dillon and Dima Ruban.  Permission to
2.\"    use and distribute based on the DragonFly copyright.
3.\"
4.Dd July 4, 2015
5.Dt POWERD 8
6.Os
7.Sh NAME
8.Nm powerd
9.Nd simple ACPI based CPU/power control
10.Sh SYNOPSIS
11.Nm
12.Op Fl detQ
13.Op Fl p Ar hysteresis
14.Op Fl u Ar trigger_up
15.Op Fl r Ar poll_time
16.Op Fl T Ar sample_time
17.Op Fl B Ar minimum_battery_life
18.Op Fl L Ar battery_life_linger
19.Op Fl P Ar battery_poll_interval
20.Sh DESCRIPTION
21The
22.Nm
23daemon monitors the CPU load and automatically adjusts the CPU
24frequency up or down.
25.Pp
26All CPUs will be set to their maximum frequency when the 1 second
27machine load exceeds 25% of one CPU.
28All CPUs will be set to their
29minimum frequency when the 10 second machine load drops below 12% of
30one CPU.
31.Pp
32The options are as follows:
33.Bl -tag -width ".Fl p Ar hysteresis"
34.It Fl d
35Debug option.
36Causes
37.Nm
38to not go to the background and prints some debug output to
39.Va stdout .
40.It Fl e
41Disable Intel Performance and Energy Bias Hint,
42even if it is available
43.It Fl p Ar hysteresis
44Percent of the upper limit to subtract as an hysteresis value to scale
45down to the min frequency.
46The default is 10 (meaning 10%).
47.It Fl t
48Turbo mode.
49Disables switching to turbo mode as maximum frequency completely.
50Switching to turbo mode as maximum frequency is enabled by default,
51if the CPU supports it.
52.It Fl u Ar trigger_up
53Per CPU load limit in percent to force maximum frequency.
54The default is 25 (meaning an instantanious load of 0.25 on a
55single cpu).  The load is calculated over 3 polls.
56It is suggested that this value not be made lower than
57around 7.
58.It Fl r Ar poll_time
59Polling time in seconds.  Default is 1.0.
60Setting this value lower will poll for load changes faster.
61For example, a workstation might want to use 0.2 or 0.4.
62.Nm can become unstable if you make this value too small.
63.It Fl T Ar sample_time
64Total sample interval in seconds.  Default is 8.0.
65This effects how quickly powerd ratchets down the frequency
66and cpus on an idle machine.  Longer times will ratchet down
67more slowly.
68For example, a workstation might want to use a value of 30.0.
69.It Fl B Ar minimum_battery_life
70If battery life is less than or equal to the specified value,
71the machine will start shutting down process.
72Default is 2 (2% battery life left).
73.It Fl L Ar battery_life_linger
74If battery life is less than or equal to the configured value,
75shutting down the machine will be delayed by the specified value.
76During the delay,
77alert message will be logged to the console,
78and audio alert will be alarmed.
79If AC line is plugged in during this delay,
80shutting down process will be cancelled.
81Default is 60 seconds.
82.It Fl P Ar battery_poll_interval
83Poll the battery life at the specified interval.
84If 0 is specified,
85battery life monitoring will be disabled.
86Default is 5 seconds.
87.It Fl Q
88Don't alarm audio alert,
89if the battery life is low.
90.El
91.Sh EXAMPLES
92The defaults work well for servers but a workstation user might want
93to use something like the following in their
94.Pa /etc/rc.conf
95to ratchet up the machine more quickly in response to spike loads
96(such as when you are browsing).
97.Pp
98.Li powerd_enable="YES"
99.Pp
100.Li powerd_flags="-u 7 -r 0.2 -T 60"
101.Sh DIAGNOSTICS
102The
103.Nm
104utility will exit with a non-zero code if the required sysctls are not
105present.
106.Sh SEE ALSO
107.Xr acpi 4 ,
108.Xr perfbias 4
109.Sh HISTORY
110The
111.Nm
112command first appeared in
113.Dx 2.7 .
114.Sh BUGS
115I'm shocked I tell you, shocked that there might be bugs in this program!
116