1.\" (c) Copyright 2010 by Matthew Dillon and Dima Ruban. Permission to 2.\" use and distribute based on the DragonFly copyright. 3.\" 4.Dd August 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 b Ar backlight_percentage 14.Op Fl h Ar highest_freq 15.Op Fl l Ar lowest_freq 16.Op Fl p Ar hysteresis 17.Op Fl r Ar poll_time 18.Op Fl u Ar trigger_up 19.Op Fl B Ar minimum_battery_life 20.Op Fl L Ar battery_life_linger 21.Op Fl P Ar battery_poll_interval 22.Op Fl T Ar sample_time 23.Sh DESCRIPTION 24The 25.Nm 26daemon monitors the CPU load and automatically adjusts the CPU 27performance up or down accordingly. 28.Pp 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). 38.Pp 39The options are as follows: 40.Bl -tag -width ".Fl p Ar hysteresis" 41.It Fl b Ar backlight_percentage 42Set backlight to the specified percentage, 43if AC line is not plugged in. 44.It Fl c 45Enable mwait C-state hint adjustment, 46if it is available. 47.It Fl d 48Debug option. 49Causes 50.Nm 51to not go to the background and prints some debug output to 52.Va stdout . 53.It Fl e 54Enable Intel Performance and Energy Bias Hint adjustment, 55if it is available. 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) 61on some of the modern Intel CPUs, 62when the CPU is idle. 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) 73.It Fl p Ar hysteresis 74Percent of the upper limit to subtract as an hysteresis value to scale 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. 85.It Fl t 86Turbo mode. 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. 90.It Fl u Ar trigger_up 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. 96.It Fl B Ar minimum_battery_life 97If battery life is less than or equal to the specified value, 98the machine will start shutting down process. 99Default is 2 100(2% battery life left). 101.It Fl L Ar battery_life_linger 102If battery life is less than or equal to the configured value, 103shutting down the machine will be delayed by the specified value. 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. 109Default is 60 seconds. 110.It Fl P Ar battery_poll_interval 111Poll the battery life at the specified interval. 112If 0 is specified, 113battery life monitoring will be disabled. 114Default is 5 seconds. 115.It Fl Q 116Don't alarm audio alert, 117if the battery life is low. 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. 126.El 127.Sh EXIT STATUS 128The 129.Nm 130utility will exit with a non-zero code if the required sysctls are not 131present. 132.Sh EXAMPLES 133The defaults work well for servers but a workstation user might want 134to use something like the following in their 135.Pa /etc/rc.conf 136to ratchet up the machine more quickly in response to spike loads 137(such as when you are browsing). 138.Pp 139.Li powerd_enable="YES" 140.Pp 141.Li powerd_flags="-u 7 -r 0.2 -T 60" 142.Sh SEE ALSO 143.Xr acpi 4 , 144.Xr perfbias 4 145.Sh HISTORY 146The 147.Nm 148command first appeared in 149.Dx 2.7 . 150.Sh BUGS 151I'm shocked I tell you, 152shocked that there might be bugs in this program! 153