powerd: unable to determine AC line status <=== Important for "-n" option of powerd !!!load 10%, current freq 1200 MHz (13), wanted freq 1200 MHzload 6%, current freq 1200 MHz (13), wanted freq 1200 MHzload 8%, current freq 1200 MHz (13), wanted freq 1200 MHzload 10%, current freq 1200 MHz (13), wanted freq 1200 MHzload 6%, current freq 1200 MHz (13), wanted freq 1200 MHz
-n mode Selects the mode to use normally when the AC line state is unknown.
performance_cx_lowest="Cmax"economy_cx_lowest="Cmax"
if ($_SERVER['REQUEST_METHOD'] === 'GET') { $pconfig = array(); $pconfig['powerd_enable'] = isset($config['system']['powerd_enable']); $pconfig['crypto_hardware'] = !empty($config['system']['crypto_hardware']) ? $config['system']['crypto_hardware'] : null; $pconfig['cryptodev_enable'] = isset($config['system']['cryptodev_enable']); $pconfig['thermal_hardware'] = !empty($config['system']['thermal_hardware']) ? $config['system']['thermal_hardware'] : null; $pconfig['use_mfs_tmpvar'] = isset($config['system']['use_mfs_tmpvar']); $pconfig['use_mfs_tmp'] = isset($config['system']['use_mfs_tmp']); $pconfig['powerd_ac_mode'] = "hadp"; $pconfig['rrdbackup'] = !empty($config['system']['rrdbackup']) ? $config['system']['rrdbackup'] : null; $pconfig['dhcpbackup'] = !empty($config['system']['dhcpbackup']) ? $config['system']['dhcpbackup'] : null; $pconfig['netflowbackup'] = !empty($config['system']['netflowbackup']) ? $config['system']['netflowbackup'] : null; if (!empty($config['system']['powerd_ac_mode'])) { $pconfig['powerd_ac_mode'] = $config['system']['powerd_ac_mode']; } $pconfig['powerd_battery_mode'] = "hadp"; if (!empty($config['system']['powerd_battery_mode'])) { $pconfig['powerd_battery_mode'] = $config['system']['powerd_battery_mode']; }
if ($_SERVER['REQUEST_METHOD'] === 'GET') { $pconfig = array(); $pconfig['powerd_enable'] = isset($config['system']['powerd_enable']); $pconfig['crypto_hardware'] = !empty($config['system']['crypto_hardware']) ? $config['system']['crypto_hardware'] : null; $pconfig['cryptodev_enable'] = isset($config['system']['cryptodev_enable']); $pconfig['thermal_hardware'] = !empty($config['system']['thermal_hardware']) ? $config['system']['thermal_hardware'] : null; $pconfig['use_mfs_tmpvar'] = isset($config['system']['use_mfs_tmpvar']); $pconfig['use_mfs_tmp'] = isset($config['system']['use_mfs_tmp']); $pconfig['rrdbackup'] = !empty($config['system']['rrdbackup']) ? $config['system']['rrdbackup'] : null; $pconfig['dhcpbackup'] = !empty($config['system']['dhcpbackup']) ? $config['system']['dhcpbackup'] : null; $pconfig['netflowbackup'] = !empty($config['system']['netflowbackup']) ? $config['system']['netflowbackup'] : null;// define powerd default or saved state(s) from the systemconfig $pconfig['powerd_ac_mode'] = "hadp"; if (!empty($config['system']['powerd_ac_mode'])) { $pconfig['powerd_ac_mode'] = $config['system']['powerd_ac_mode']; } $pconfig['powerd_battery_mode'] = "hadp"; if (!empty($config['system']['powerd_battery_mode'])) { $pconfig['powerd_battery_mode'] = $config['system']['powerd_battery_mode']; } $pconfig['powerd_normal_mode'] = "hadp"; if (!empty($config['system']['powerd_normal_mode'])) { $pconfig['powerd_battery_mode'] = $config['system']['powerd_normal_mode']; }
if (count($input_errors) == 0) { if (!empty($pconfig['powerd_enable'])) { $config['system']['powerd_enable'] = true; } elseif (isset($config['system']['powerd_enable'])) { unset($config['system']['powerd_enable']); } $config['system']['powerd_ac_mode'] = $pconfig['powerd_ac_mode']; $config['system']['powerd_battery_mode'] = $pconfig['powerd_battery_mode'];
if (count($input_errors) == 0) { if (!empty($pconfig['powerd_enable'])) { $config['system']['powerd_enable'] = true; } elseif (isset($config['system']['powerd_enable'])) { unset($config['system']['powerd_enable']); } $config['system']['powerd_ac_mode'] = $pconfig['powerd_ac_mode']; $config['system']['powerd_battery_mode'] = $pconfig['powerd_battery_mode']; $config['system']['powerd_normal_mode'] = $pconfig['powerd_normal_mode'];
<tr> <td><a id="help_for_powerd_enable" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Use PowerD"); ?></td> <td> <input name="powerd_enable" type="checkbox" id="powerd_enable" value="yes" <?=!empty($pconfig['powerd_enable']) ? "checked=\"checked\"" : "";?> /> <div class="hidden" for="help_for_powerd_enable"> <?=gettext("The powerd utility monitors the system state and sets various power control " . "options accordingly. It offers four modes (maximum, minimum, adaptive " . "and hiadaptive) that can be individually selected while on AC power or batteries. " . "The modes maximum, minimum, adaptive and hiadaptive may be abbreviated max, " . "min, adp, hadp. Maximum mode chooses the highest performance values. Minimum " . "mode selects the lowest performance values to get the most power savings. " . "Adaptive mode attempts to strike a balance by degrading performance when " . "the system appears idle and increasing it when the system is busy. It " . "offers a good balance between a small performance loss for greatly " . "increased power savings. Hiadaptive mode is alike adaptive mode, but " . "tuned for systems where performance and interactivity are more important " . "than power consumption. It raises frequency faster, drops slower and " . "keeps twice lower CPU load."); ?> </div> </td> </tr> <tr> <td><i class="fa fa-info-circle text-muted"></i> <?=gettext('On AC Power Mode') ?></td> <td> <select name="powerd_ac_mode" class="selectpicker" data-style="btn-default" data-width="auto"> <option value="hadp" <?=$pconfig['powerd_ac_mode']=="hadp" ? "selected=\"selected\"" : "";?>> <?=gettext("Hiadaptive");?> </option> <option value="adp" <?=$pconfig['powerd_ac_mode']=="adp" ? "selected=\"selected\"" : "";?>> <?=gettext("Adaptive");?> </option> <option value="min" <?=$pconfig['powerd_ac_mode']=="min" ? "selected=\"selected\"" : "";?>> <?=gettext("Minimum");?> </option> <option value="max" <?=$pconfig['powerd_ac_mode']=="max" ? " selected=\"selected\"" : "";?>> <?=gettext("Maximum");?> </option> </select> </td> <tr> <td><i class="fa fa-info-circle text-muted"></i> <?=gettext('On Battery Power Mode') ?></td> <td> <select name="powerd_battery_mode" class="selectpicker" data-style="btn-default" data-width="auto"> <option value="hadp"<?=$pconfig['powerd_battery_mode']=="hadp" ? "selected=\"selected\"" : "";?>> <?=gettext("Hiadaptive");?> </option> <option value="adp" <?=$pconfig['powerd_battery_mode']=="adp" ? "selected=\"selected\"" : "";?>> <?=gettext("Adaptive");?> </option> <option value="min" <?=$pconfig['powerd_battery_mode']=="min" ? "selected=\"selected\"" :"";?>> <?=gettext("Minimum");?> </option> <option value="max" <?=$pconfig['powerd_battery_mode']=="max" ? "selected=\"selected\"" : "";?>> <?=gettext("Maximum");?> </option> </select> </td> </tr>
<tr> <td><a id="help_for_powerd_enable" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Use PowerD"); ?></td> <td> <input name="powerd_enable" type="checkbox" id="powerd_enable" value="yes" <?=!empty($pconfig['powerd_enable']) ? "checked=\"checked\"" : "";?> /> <div class="hidden" for="help_for_powerd_enable"> <?=gettext("The powerd utility monitors the system state and sets various power control " . "options accordingly. It offers four modes (maximum, minimum, adaptive " . "and hiadaptive) that can be individually selected while on AC power or batteries. " . "The modes maximum, minimum, adaptive and hiadaptive may be abbreviated max, " . "min, adp, hadp. Maximum mode chooses the highest performance values. Minimum " . "mode selects the lowest performance values to get the most power savings. " . "Adaptive mode attempts to strike a balance by degrading performance when " . "the system appears idle and increasing it when the system is busy. It " . "offers a good balance between a small performance loss for greatly " . "increased power savings. Hiadaptive mode is alike adaptive mode, but " . "tuned for systems where performance and interactivity are more important " . "than power consumption. It raises frequency faster, drops slower and " . "keeps twice lower CPU load."); ?> </div> </td> </tr> <tr> <td><i class="fa fa-info-circle text-muted"></i> <?=gettext('On AC Power Mode') ?></td> <td> <select name="powerd_ac_mode" class="selectpicker" data-style="btn-default" data-width="auto"> <option value="hadp" <?=$pconfig['powerd_ac_mode']=="hadp" ? "selected=\"selected\"" : "";?>> <?=gettext("Hiadaptive");?> </option> <option value="adp" <?=$pconfig['powerd_ac_mode']=="adp" ? "selected=\"selected\"" : "";?>> <?=gettext("Adaptive");?> </option> <option value="min" <?=$pconfig['powerd_ac_mode']=="min" ? "selected=\"selected\"" : "";?>> <?=gettext("Minimum");?> </option> <option value="max" <?=$pconfig['powerd_ac_mode']=="max" ? " selected=\"selected\"" : "";?>> <?=gettext("Maximum");?> </option> </select> </td> <tr> <td><i class="fa fa-info-circle text-muted"></i> <?=gettext('On Battery Power Mode') ?></td> <td> <select name="powerd_battery_mode" class="selectpicker" data-style="btn-default" data-width="auto"> <option value="hadp"<?=$pconfig['powerd_battery_mode']=="hadp" ? "selected=\"selected\"" : "";?>> <?=gettext("Hiadaptive");?> </option> <option value="adp" <?=$pconfig['powerd_battery_mode']=="adp" ? "selected=\"selected\"" : "";?>> <?=gettext("Adaptive");?> </option> <option value="min" <?=$pconfig['powerd_battery_mode']=="min" ? "selected=\"selected\"" :"";?>> <?=gettext("Minimum");?> </option> <option value="max" <?=$pconfig['powerd_battery_mode']=="max" ? "selected=\"selected\"" : "";?>> <?=gettext("Maximum");?> </option> </select> </td> </tr> <td><a id="help_for_powerd_normal_mode" href="#" class="showhelp"><i class="fa fa-info-circle text-circle"></i></a> <?=gettext('On Normal Power Mode'); ?></td> <td> <select name="powerd_normal_mode" class="selectpicker" data-style="btn-default" data-width="auto"> <option value="hadp"<?=$pconfig['powerd_normal_mode']=="hadp" ? "selected=\"selected\"" : "";?>> <?=gettext("Hiadaptive");?> </option> <option value="adp" <?=$pconfig['powerd_normal_mode']=="adp" ? "selected=\"selected\"" : "";?>> <?=gettext("Adaptive");?> </option> <option value="min" <?=$pconfig['powerd_normal_mode']=="min" ? "selected=\"selected\"" :"";?>> <?=gettext("Minimum");?> </option> <option value="max" <?=$pconfig['powerd_normal_mode']=="max" ? "selected=\"selected\"" : "";?>> <?=gettext("Maximum");?> </option> </select> <div class="hidden" for="help_for_powerd_normal_mode"> <?=gettext("If the powerd utility can not determine the power state it uses \"normal\" for control."); ?> </div> </td> </tr>