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