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