powerd: Linger a little bit if battery life is low
[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 October 28, 2014
5 .Dt POWERD 8
6 .Os
7 .Sh NAME
8 .Nm powerd
9 .Nd simple ACPI based CPU/power control
10 .Sh SYNOPSIS
11 .Nm
12 .Op Fl dtQ
13 .Op Fl p Ar hysteresis
14 .Op Fl u Ar trigger_up
15 .Op Fl r Ar poll_time
16 .Op Fl T Ar sample_time
17 .Op Fl B Ar minimum_battery_life
18 .Op Fl L Ar battery_life_linger
19 .Op Fl P Ar battery_poll_interval
20 .Sh DESCRIPTION
21 The
22 .Nm
23 daemon monitors the CPU load and automatically adjusts the CPU
24 frequency up or down.
25 .Pp
26 All CPUs will be set to their maximum frequency when the 1 second
27 machine load exceeds 25% of one CPU.
28 All CPUs will be set to their
29 minimum frequency when the 10 second machine load drops below 12% of
30 one CPU.
31 .Pp
32 The options are as follows:
33 .Bl -tag -width ".Fl p Ar hysteresis"
34 .It Fl d
35 Debug option.
36 Causes
37 .Nm
38 to not go to the background and prints some debug output to
39 .Va stdout .
40 .It Fl p Ar hysteresis
41 Percent of the upper limit to subtract as an hysteresis value to scale
42 down to the min frequency.
43 The default is 10 (meaning 10%).
44 .It Fl t
45 Turbo mode.
46 Disables switching to turbo mode as maximum frequency completely.
47 Switching to turbo mode as maximum frequency is enabled by default,
48 if the CPU supports it.
49 .It Fl u Ar trigger_up
50 Per CPU load limit in percent to force maximum frequency.
51 The default is 25 (meaning an instantanious load of 0.25 on a
52 single cpu).  The load is calculated over 3 polls.
53 It is suggested that this value not be made lower than
54 around 7.
55 .It Fl r Ar poll_time
56 Polling time in seconds.  Default is 1.0.
57 Setting this value lower will poll for load changes faster.
58 For example, a workstation might want to use 0.2 or 0.4.
59 .Nm can become unstable if you make this value too small.
60 .It Fl T Ar sample_time
61 Total sample interval in seconds.  Default is 8.0.
62 This effects how quickly powerd ratchets down the frequency
63 and cpus on an idle machine.  Longer times will ratchet down
64 more slowly.
65 For example, a workstation might want to use a value of 30.0.
66 .It Fl B Ar minimum_battery_life
67 If battery life is less than or equal to the specified value,
68 the machine will start shutting down process.
69 Default is 2 (2% battery life left).
70 .It Fl L Ar battery_life_linger
71 If battery life is less than or equal to the configured value,
72 shutting down the machine will be delayed by the specified value.
73 During the delay,
74 alert message will be logged to the console,
75 and audio alert will be alarmed.
76 If AC line is plugged in during this delay,
77 shutting down process will be cancelled.
78 Default is 60 seconds.
79 .It Fl P Ar battery_poll_interval
80 Poll the battery life at the specified interval.
81 If 0 is specified,
82 battery life monitoring will be disabled.
83 Default is 5 seconds.
84 .It Fl Q
85 Don't alarm audio alert,
86 if the battery life is low.
87 .El
88 .Sh EXAMPLES
89 The defaults work well for servers but a workstation user might want
90 to use something like the following in their
91 .Pa /etc/rc.conf
92 to ratchet up the machine more quickly in response to spike loads
93 (such as when you are browsing).
94 .Pp
95 .Li powerd_enable="YES"
96 .Pp
97 .Li powerd_flags="-u 7 -r 0.2 -T 60"
98 .Sh DIAGNOSTICS
99 The
100 .Nm
101 utility will exit with a non-zero code if the required sysctls are not
102 present.
103 .Sh SEE ALSO
104 .Xr acpi 4 ,
105 .Xr est 4 ,
106 .Xr powernow 4
107 .Sh HISTORY
108 The
109 .Nm
110 command first appeared in
111 .Dx 2.7 .
112 .Sh BUGS
113 I'm shocked I tell you, shocked that there might be bugs in this program!