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