xref: /freebsd/usr.sbin/powerd/powerd.8 (revision 2f513db72b034fd5ef7f080b11be5c711c15186a)
1.\" Copyright (c) 2005 Nate Lawson
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\"
13.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.\" $FreeBSD$
26.\"
27.Dd January 6, 2019
28.Dt POWERD 8
29.Os
30.Sh NAME
31.Nm powerd
32.Nd "system power control utility"
33.Sh SYNOPSIS
34.Nm
35.Op Fl a Ar mode
36.Op Fl b Ar mode
37.Op Fl i Ar percent
38.Op Fl m Ar freq
39.Op Fl M Ar freq
40.Op Fl n Ar mode
41.Op Fl p Ar ival
42.Op Fl P Ar pidfile
43.Op Fl r Ar percent
44.Op Fl s Ar source
45.Op Fl v
46.Sh DESCRIPTION
47The
48.Nm
49utility monitors the system state and sets various power control options
50accordingly.
51It offers power-saving modes that can be
52individually selected for operation on AC power or batteries.
53.Bl -tag -width ".Ar hiadaptive"
54.It Ar maximum
55Choose the highest performance values.
56May be abbreviated as
57.Ar max .
58.It Ar minimum
59Choose the lowest performance values to get the most power savings.
60May be abbreviated as
61.Ar min .
62.It Ar adaptive
63Attempt to strike a balance by degrading performance when the system
64appears idle and increasing it when the system is busy.
65It offers a good balance between a small performance loss for greatly
66increased power savings.
67May be abbreviated as
68.Ar adp .
69.It Ar hiadaptive
70Like
71.Ar adaptive
72mode, but tuned for systems where performance and interactivity are
73more important than power consumption.
74It increases frequency faster, reduces frequency less aggressively, and
75will maintain full frequency for longer.
76May be abbreviated as
77.Ar hadp .
78.El
79.Pp
80The default mode is
81.Ar adaptive
82for battery power and
83.Ar hiadaptive
84for the rest.
85.Pp
86.Nm
87recognizes these runtime options:
88.Bl -tag -width ".Fl r Ar percent"
89.It Fl a Ar mode
90Selects the
91.Ar mode
92to use while on AC power.
93.It Fl b Ar mode
94Selects the
95.Ar mode
96to use while on battery power.
97.It Fl i Ar percent
98Specifies the CPU load percent level when adaptive
99mode should begin to degrade performance to save power.
100The default is 50% or lower.
101.It Fl m Ar freq
102Specifies the minimum frequency to throttle down to.
103.It Fl M Ar freq
104Specifies the maximum frequency to throttle up to.
105.It Fl n Ar mode
106Selects the
107.Ar mode
108to use normally when the AC line state is unknown.
109.It Fl p Ar ival
110Specifies a different polling interval (in milliseconds) for AC line state
111and system idle levels.
112The default is 250 ms.
113.It Fl P Ar pidfile
114Specifies an alternative file in which the process ID should be stored.
115The default is
116.Pa /var/run/powerd.pid .
117.It Fl r Ar percent
118Specifies the CPU load percent level where adaptive
119mode should consider the CPU running and increase performance.
120The default is 75% or higher.
121.It Fl s Ar source
122Enforces method for AC line state refresh; by default, it is chosen
123automatically.
124The set of valid methods is
125.Cm sysctl , devd
126and
127.Cm apm
128(i386 only).
129.It Fl v
130Verbose mode.
131Messages about power changes will be printed to stdout and
132.Nm
133will operate in the foreground.
134.El
135.Sh SEE ALSO
136.Xr acpi 4 ,
137.Xr apm 4 ,
138.Xr cpufreq 4
139.Sh HISTORY
140The
141.Nm
142utility first appeared in
143.Fx 6.0 .
144.Sh AUTHORS
145.An -nosplit
146.An Colin Percival
147first wrote
148.Nm estctrl ,
149the utility that
150.Nm
151is based on.
152.An Nate Lawson
153then updated it for
154.Xr cpufreq 4 ,
155added features, and wrote this manual page.
156.Sh BUGS
157The
158.Nm
159utility should also power down idle disks and other components besides the CPU.
160.Pp
161If
162.Nm
163is used with
164.Pa power_profile ,
165they may override each other.
166.Pp
167The
168.Nm
169utility
170should probably use the
171.Xr devctl 4
172interface instead of polling for AC line state.
173