xref: /freebsd/usr.sbin/powerd/powerd.8 (revision fe75646a0234a261c0013bf1840fdac4acaf0cec)
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.Dd February 25, 2023
26.Dt POWERD 8
27.Os
28.Sh NAME
29.Nm powerd
30.Nd "system power control utility"
31.Sh SYNOPSIS
32.Nm
33.Op Fl a Ar mode
34.Op Fl b Ar mode
35.Op Fl i Ar percent
36.Op Fl M Ar freq
37.Op Fl m Ar freq
38.Op Fl N
39.Op Fl n Ar mode
40.Op Fl P Ar pidfile
41.Op Fl p Ar ival
42.Op Fl r Ar percent
43.Op Fl s Ar source
44.Op Fl v
45.Sh DESCRIPTION
46The
47.Nm
48utility monitors the system state and sets various power control options
49accordingly.
50It offers power-saving modes that can be
51individually selected for operation on AC power or batteries.
52.Bl -tag -width "hiadaptive"
53.It Cm maximum
54Choose the highest performance values.
55May be abbreviated as
56.Cm max .
57.It Cm minimum
58Choose the lowest performance values to get the most power savings.
59May be abbreviated as
60.Cm min .
61.It Cm adaptive
62Attempt to strike a balance by degrading performance when the system
63appears idle and increasing it when the system is busy.
64It offers a good balance between a small performance loss for greatly
65increased power savings.
66May be abbreviated as
67.Cm adp .
68.It Cm hiadaptive
69Like
70.Cm adaptive
71mode, but tuned for systems where performance and interactivity are
72more important than power consumption.
73It increases frequency faster, reduces frequency less aggressively, and
74will maintain full frequency for longer.
75May be abbreviated as
76.Cm hadp .
77.El
78.Pp
79The default mode is
80.Cm adaptive
81for battery power and
82.Cm hiadaptive
83for the rest.
84.Pp
85.Nm
86recognizes these runtime options:
87.Bl -tag -width "-r percent"
88.It Fl a Ar mode
89Selects the
90.Ar mode
91to use while on AC power.
92.It Fl b Ar mode
93Selects the
94.Ar mode
95to use while on battery power.
96.It Fl i Ar percent
97Specifies the CPU load percent level when adaptive
98mode should begin to degrade performance to save power.
99The default is 50% or lower.
100.It Fl M Ar freq
101Specifies the maximum frequency to throttle up to.
102.It Fl m Ar freq
103Specifies the minimum frequency to throttle down to.
104.It Fl N
105Treat "nice" time as idle for the purpose of load calculation;
106i.e., do not increase the CPU frequency if the CPU is only busy
107with "nice" processes.
108.It Fl n Ar mode
109Selects the
110.Ar mode
111to use normally when the AC line state is unknown.
112.It Fl P Ar pidfile
113Specifies an alternative file in which the process ID should be stored.
114.It Fl p Ar ival
115Specifies a different polling interval (in milliseconds) for AC line state
116and system idle levels.
117The default is 250 ms.
118.It Fl r Ar percent
119Specifies the CPU load percent level where adaptive
120mode should consider the CPU running and increase performance.
121The default is 75% or higher.
122.It Fl s Ar source
123Enforces method for AC line state refresh; by default, it is chosen
124automatically.
125The set of valid methods is
126.Cm sysctl , devd
127and
128.Cm apm
129(i386 only).
130.It Fl v
131Verbose mode.
132Messages about power changes will be printed to stdout and
133.Nm
134will operate in the foreground.
135.El
136.Sh FILES
137.Bl -tag -width "/var/run/powerd.pid"
138.It Pa /var/run/powerd.pid
139The default PID file.
140.El
141.Sh SEE ALSO
142.Xr acpi 4 ,
143.Xr apm 4 ,
144.Xr cpufreq 4 ,
145.Xr rc.conf 5
146.Sh HISTORY
147The
148.Nm
149utility first appeared in
150.Fx 6.0 .
151.Sh AUTHORS
152.An -nosplit
153.An Colin Percival
154first wrote
155.Nm estctrl ,
156the utility that
157.Nm
158is based on.
159.An Nate Lawson
160then updated it for
161.Xr cpufreq 4 ,
162added features, and wrote this manual page.
163.Sh BUGS
164The
165.Nm
166utility should also power down idle disks and other components besides the CPU.
167.Pp
168If
169.Nm
170is used with
171.Pa /etc/rc.d/power_profile ,
172they may override each other.
173.Pp
174The
175.Nm
176utility
177should probably use the
178.Xr devctl 4
179interface instead of polling for AC line state.
180