xref: /dragonfly/usr.sbin/powerd/powerd.8 (revision cd1c6085)
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 17, 2015
5.Dt POWERD 8
6.Os
7.Sh NAME
8.Nm powerd
9.Nd simple CPU performance control and battery life monitor
10.Sh SYNOPSIS
11.Nm
12.Op Fl cdeftQ
13.Op Fl h Ar highest_freq
14.Op Fl l Ar lowest_freq
15.Op Fl p Ar hysteresis
16.Op Fl r Ar poll_time
17.Op Fl u Ar trigger_up
18.Op Fl B Ar minimum_battery_life
19.Op Fl L Ar battery_life_linger
20.Op Fl P Ar battery_poll_interval
21.Op Fl T Ar sample_time
22.Sh DESCRIPTION
23The
24.Nm
25daemon monitors the CPU load and automatically adjusts the CPU
26performance up or down accordingly.
27.Pp
28The
29.Nm
30also monitors battery life.
31If the battery life is low
32(less then or equal to 2% by default),
33.Nm
34will send audio alert immediately,
35and shutdown the machine after lingering for a little while
36(60 seconds by default).
37.Pp
38The options are as follows:
39.Bl -tag -width ".Fl p Ar hysteresis"
40.It Fl c
41Enable mwait C-state hint adjustment,
42if it is available.
43.It Fl d
44Debug option.
45Causes
46.Nm
47to not go to the background and prints some debug output to
48.Va stdout .
49.It Fl e
50Enable Intel Performance and Energy Bias Hint adjustment,
51if it is available.
52.It Fl f
53Disable CPU power domain frequency adjustment.
54CPU power domain frequency adjustment does not reduce CPU power consumption
55much
56(if any)
57on some of the modern Intel CPUs,
58when the CPU is idle.
59.It Fl h Ar highest_freq
60If CPU power domain frequency adjustment is enabled,
61then frequency of CPU power domains will not be set to a value higher
62than the specified limit.
63(unit: MHz)
64.It Fl l Ar lowest_freq
65If CPU power domain frequency adjustment is enabled,
66then frequency of CPU power domains will not be set to a value lower
67than the specified limit.
68(unit: MHz)
69.It Fl p Ar hysteresis
70Percent of the upper limit to subtract as an hysteresis value to scale
71down to the min performance.
72The default is 10
73(meaning 10%).
74.It Fl r Ar poll_time
75Polling time in seconds.
76Default is 1.0.
77Setting this value lower will poll for load changes faster.
78For example,
79a workstation might want to use 0.2 or 0.4.
80.Nm can become unstable if you make this value too small.
81.It Fl t
82Turbo mode.
83Disables switching to turbo mode as maximum frequency completely.
84Switching to turbo mode as maximum frequency is enabled by default,
85if the CPU supports it.
86.It Fl u Ar trigger_up
87Per CPU load limit in percent to force maximum performance.
88The default is 25
89(meaning an instantanious load of 0.25 on a single cpu).
90The load is calculated over 3 polls.
91It is suggested that this value not be made lower than around 7.
92.It Fl B Ar minimum_battery_life
93If battery life is less than or equal to the specified value,
94the machine will start shutting down process.
95Default is 2
96(2% battery life left).
97.It Fl L Ar battery_life_linger
98If battery life is less than or equal to the configured value,
99shutting down the machine will be delayed by the specified value.
100During the delay,
101alert message will be logged to the console,
102and audio alert will be alarmed.
103If AC line is plugged in during this delay,
104shutting down process will be cancelled.
105Default is 60 seconds.
106.It Fl P Ar battery_poll_interval
107Poll the battery life at the specified interval.
108If 0 is specified,
109battery life monitoring will be disabled.
110Default is 5 seconds.
111.It Fl Q
112Don't alarm audio alert,
113if the battery life is low.
114.It Fl T Ar sample_time
115Total sample interval in seconds.
116Default is 8.0.
117This effects how quickly powerd ratchets down the performance
118and cpus on an idle machine.
119Longer times will ratchet down more slowly.
120For example,
121a workstation might want to use a value of 30.0.
122.El
123.Sh EXAMPLES
124The defaults work well for servers but a workstation user might want
125to use something like the following in their
126.Pa /etc/rc.conf
127to ratchet up the machine more quickly in response to spike loads
128(such as when you are browsing).
129.Pp
130.Li powerd_enable="YES"
131.Pp
132.Li powerd_flags="-u 7 -r 0.2 -T 60"
133.Sh DIAGNOSTICS
134The
135.Nm
136utility will exit with a non-zero code if the required sysctls are not
137present.
138.Sh SEE ALSO
139.Xr acpi 4 ,
140.Xr perfbias 4
141.Sh HISTORY
142The
143.Nm
144command first appeared in
145.Dx 2.7 .
146.Sh BUGS
147I'm shocked I tell you,
148shocked that there might be bugs in this program!
149