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