Power Management

Athena sets Windows power settings centrally across your fleet. These include display and sleep timeouts, what the power button and lid do, battery thresholds and actions, processor limits and USB selective suspend. You build named power policies, assign them to agents, collections or tags, and Athena writes each machine's values. Each agent's tab shows whether the machine still matches its policy. All of this runs between your Athena server and its agents, so it works on an air-gapped network.

Scope
  • Windows agents only. Linux agents are not managed.
  • A licensed module. Your licence must include the Power Management module (module.power). Without it, nothing is sent to agents and the power REST endpoints return 403. See Separately licensed modules.
  • Nothing is applied by default. Two switches control applying, and both are off by default. Until you turn on Enforce power policies, your policies are only a plan and no machine is changed.
  • Not copied by settings sync. Power policies stay on the server where you create them. Settings sync does not copy them to your other Athena servers.

Where Power Management appears#

Permissions

Power Management has two permissions. The built-in Admin role has both. View power management is also given to the built-in Helpdesk and Operator roles, because a machine's power settings are not sensitive. Manage power management is also given to Operator. Roles can't be edited in this release, so to give someone a permission, give them a role that holds it. See Roles & Permissions.

PermissionKeyDefault rolesAllows
View power managementpower.viewHelpdesk, Operator, AdminSee power policies, their assignments, an agent's effective policy and the power configuration agents report. Both Power tabs are hidden without it.
Manage power managementpower.manageOperator, AdminCreate, edit, delete and assign policies, and turn the two switches on or off. Also apply a policy, ask agents to report, and schedule the Power State Collection task.

Power policies#

A policy is a named set of power settings. Click Add a power policy on the Power Management tab to open New power policy. To change a policy, click Edit in its row.

FieldValuesNotes
NameUp to 100 charactersRequired. Must be unique, ignoring case (Laptops and laptops are the same name).
DescriptionUp to 500 charactersOptional.
Policy enabledOn / offA disabled policy is skipped when Athena works out which policy applies. Its agents fall through to the next matching assignment (see Assignments).
Managed settingsThe grid of 25 settingsTick a setting to manage it, then set its On battery and Plugged in values.

Managed, "Never" and unmanaged

Each setting in a policy is in one of three states:

You can also manage one side only. Leave either the On battery or the Plugged in value empty and Athena leaves that side of the machine alone. The policy list shows how many settings each policy manages ({n} of 25 settings managed), or No settings managed.

If you open the editor while automatic re-apply is off, it shows a notice: "Policies are not applied automatically. Assigning this policy will show drift but will not change any device until someone presses Apply." See Applying policies.

The 25 settings

Timeouts are entered in minutes in the console, from 0 (Never) up to 24 hours. Percentages range from 0 to 100. Settings marked hidden in the editor do not appear in the Windows Power Options control panel, but Athena sets them anyway.

GroupSettingValuesREST key
DisplayTurn off display afterMinutesdisplay-timeout
Dim display after (hidden)Minutesdisplay-dim-timeout
Display brightness%display-brightness
Dimmed display brightness%display-dim-brightness
Enable adaptive brightnessOff, Onadaptive-brightness
SleepSleep afterMinutessleep-timeout
Allow hybrid sleepOff, Onhybrid-sleep
Hibernate afterMinuteshibernate-timeout
Allow wake timersDisable, Enable, Important Wake Timers Onlywake-timers
Allow away mode (hidden)No, Yesaway-mode
Power buttons and lidPower button action (hidden)Do nothing, Sleep, Hibernate, Shut down, Turn off the displaypower-button-action
Sleep button action (hidden)Do nothing, Sleep, Hibernate, Shut down, Turn off the displaysleep-button-action
Lid close action (hidden)Do nothing, Sleep, Hibernate, Shut downlid-close-action
Start menu power buttonSleep, Hibernate, Shut down, Turn off the displaystart-menu-power-button
Hard diskTurn off hard disk afterMinutesdisk-timeout
BatteryLow battery level%battery-low-level
Critical battery level%battery-critical-level
Low battery actionDo nothing, Sleep, Hibernate, Shut downbattery-low-action
Critical battery actionDo nothing, Sleep, Hibernate, Shut downbattery-critical-action
Low battery notificationOff, Onbattery-low-notification
Critical battery notificationOff, Onbattery-critical-notification
Processor power managementMinimum processor state%processor-min
Maximum processor state%processor-max
System cooling policy (hidden)Active, Passivecooling-policy
USB settingsUSB selective suspendDisabled, Enabledusb-selective-suspend
Keep machines reachable

A sleeping machine cannot receive deployments, commands or remote sessions. For desktops you manage remotely, consider a longer Sleep after (or 0 = Never) when plugged in. Use Allow wake timers if you run overnight maintenance windows. For docked laptops, set Lid close action to Do nothing.

Assignments#

An assignment links a policy to a target. In the Assignments section, choose a policy (Choose a policy) and a target type, then pick the target (Choose a target) and click Assign this policy to this target. You can target:

Which policy applies

Each machine gets exactly one policy, which works like a firewall rule list:

  1. Assignments are checked in priority order, top first. A lower priority number wins.
  2. The first assignment whose target contains the agent decides its policy. Nothing below it is considered.
  3. An assignment whose policy is disabled is skipped, and its agents fall through to the next matching assignment.
  4. If nothing matches, the agent is unmanaged. Athena writes nothing and the machine keeps its own power configuration.

Settings are never merged across policies. If the winning policy leaves a setting unmanaged, it stays unmanaged, even if a lower-priority policy manages it. This way you can always tell which single policy configured a machine.

A new assignment is added last, with the lowest precedence. Use the Higher precedence and Lower precedence arrows to reorder. Removing an assignment hands its agents to the next matching assignment, or leaves them unmanaged if none matches.

There is no "undo" on the machine

Deleting a policy also deletes its values and every assignment that points to it. Removing an assignment or unticking a setting has the same limit. None of these puts the old values back on a machine: machines keep whatever they were last set to. To change a setting back, manage it with the value you want and apply again.

Applying policies#

Editing policies and assignments changes only the plan on the server. Two switches at the top of the Power Management tab decide whether anything reaches a machine. Both are off by default:

SwitchWhen offWhen on
Enforce power policies on agentsNothing is sent to any agent, whoever asks. The tab says "Enforcement is off, so the values below are a plan: nothing is sent to any agent."Operators can apply policies with Apply now.
Re-apply automatically when an agent driftsA policy is applied only when someone clicks Apply now.If a machine no longer matches its policy, Athena sends it the policy again at check-in, when it reports, and on each run of the Power State Collection task. It also re-applies to the affected agents right after you save a policy or change an assignment. Needs the first switch on as well.

You can turn automatic re-apply on while enforcement is off. Nothing is re-applied until both switches are on.

Apply now and Refresh

Offline agents are not queued. An apply reaches only agents that are connected when you click. With automatic re-apply on, an agent that was offline gets its policy at its next check-in. Otherwise, apply again once it is online.

Athena writes values into the machine's currently active power plan. It writes only the settings the policy manages, and only the managed side (On battery or Plugged in) of each.

Apply messages

MessageMeaning
Sent.The policy was handed to the agent.
Power enforcement is off, so nothing was sent.Turn on Enforce power policies on agents.
No power policy is assigned to that agent.No assignment matches it, or the matching policy is disabled.
The assigned power policy manages no setting.The winning policy has nothing ticked.
That agent is not connected.Nothing was queued. Try again when it is online.
Power management is not licensed on this server.Your licence does not include module.power.

Agent details → Power#

The Power section of an agent shows:

Agents report their power configuration on their own. It is requested when an agent connects (at most once every 5 minutes per agent), after a policy or assignment change, and on each run of the Power State Collection task. If an agent has never reported, the section says so. Click Refresh to ask it.

Setting states

StateMeaning
In syncEvery managed side matches the machine.
DriftA managed side differs from what the machine holds.
FailedThe last apply of the current policy failed on this setting.
Not reportedThe machine has never reported this setting. This is never treated as in sync.
Not reported since the policy changedThe last report is older than the last change to the policy, so it cannot be compared.
Not available hereThis machine does not support the setting. This is a normal state, not a warning.
Set by Group PolicyA Group Policy controls this setting on the machine, so Athena does not change it. This is a normal state, not a warning.
Not managedThe policy manages neither side of this setting. Athena shows the machine's value for information only.

Machines without a battery (most desktops and virtual machines): the On battery values are neither written nor compared. The section says "This machine has no battery, so the On battery values are neither written nor compared."

Power State Collection task#

A value changed by hand on a quiet machine produces no event. To catch that drift, schedule the Power State Collection task on the Scheduler. It needs power.manage. Each run:

  1. re-applies the policy to connected agents that have drifted, but only when both switches are on;
  2. then asks every connected agent to report its current power configuration.

With either switch off, the task only collects. Every 60 minutes is recommended. Machines already in sync are sent nothing, so a shorter interval mostly adds reports.

The automatic triggers (check-in and a new report) never resend a policy that a machine has already answered with drift. This stops an endless loop of re-applies. Retries come from this task. If an apply is still in progress (sent less than 10 minutes ago and not yet answered), it is not sent again. Automatic applies are recorded in the audit log with the user name power.autoconverge.

Filter fields#

Power adds four fields for collections, monitors, tagging rules and reports. See Filter Field Reference.

FieldLabelTypeValue
Module.power.DriftStatePower Drift StateEnumThe agent's worst setting state, in this order: Failed, Drift, NotCapable, PolicyManaged, NotReportedSince, NotReported, Unmanaged, InSync. It is recalculated against the current policy.
Module.power.ManagedPower Policy ManagedBooleanWhether any enabled policy applies to the agent.
Module.power.HasBatteryPower Has BatteryBooleanFrom the agent's last report. false if it has never reported.
Module.power.PolicyNamePower Policy NameStringThe effective policy's name. Empty for an unmanaged agent. To ask whether a machine is managed at all, use Managed.

For example, a collection with Module.power.DriftState equals Drift lists every machine whose power settings no longer match its policy.

Audit events#

Event typeConsole labelWritten when
power.policy-changedPower policy changedA policy is created, updated or deleted. The entry records the full set of managed values (and, on delete, the assignments that were removed with it).
power.assignment-changedPower policy assignment changedAn assignment is added or removed, or the assignments are reordered.
power.enforcement-toggledPower enforcement toggledEither switch is turned on or off (Severity: Warning). The resource id tells them apart: EnforcementEnabled or AutoConvergeEnabled.
power.apply-requestedPower policy applied to an agentA policy is actually sent to a machine, by an operator or automatically. The entry names the policy and the assignment that selected it.
power.apply-incompletePower policy did not fully applyAn apply result includes a failed or drifting setting, or the whole apply errored (Severity: Warning). This is written once per result. It is not written for Not available here or Set by Group Policy.
power.status-failedPower configuration could not be readAn agent could not read its own power configuration.

REST API#

All routes are under /api/power and need a bearer token (see API Reference). Reads need power.view, and everything else needs power.manage. Responses use the standard success / data / message envelope.

Method & routePermissionPurpose
GET /api/power/settingsviewThe two switches: enforcementEnabled, autoConvergeEnabled.
PUT /api/power/settingsmanageSet either switch. An omitted (or null) field is left unchanged.
GET /api/power/policiesviewEvery policy with its values.
POST /api/power/policiesmanageCreate a policy. 400 for an invalid body, 409 for a duplicate name.
PUT /api/power/policies/{id}manageReplace a policy, including its whole value set. A key you leave out becomes unmanaged. 404 if unknown.
DELETE /api/power/policies/{id}manageDelete a policy with its values and assignments.
GET /api/power/assignmentsviewAll assignments in resolution order (priority ascending).
POST /api/power/assignmentsmanageAdd an assignment (appended last). Body: policyId, targetKind (Agent, Collection or Tag, by name), targetKey (agent id, collection id or tag name).
DELETE /api/power/assignments/{id}manageRemove an assignment.
POST /api/power/assignments/reordermanageBody {"assignmentIds": [...]}: every assignment id exactly once, highest precedence first (at most 500). Applied all-or-nothing.
GET /api/power/agents/{id}/effective-policyviewThe agent's effective policy and the assignment that selected it. An unmanaged agent returns 200 with a null policy.
GET /api/power/agents/{id}/reported-stateviewWhat the agent last reported beside the policy, with a state per setting. An agent that never reported returns reportedAt: null and every setting NotReported.
POST /api/power/agents/{id}/statusmanageAsk one agent to report. Works while enforcement is off.
POST /api/power/agents/{id}/applymanageSend one agent its effective policy. Refused while enforcement is off.
POST /api/power/agents/applymanageApply to every connected agent. Returns sent and skipped counts.

In a policy body, values maps a setting key from the catalog to {"ac": …, "dc": …}. Here ac is Plugged in, dc is On battery, and null leaves that side unmanaged. Unlike the console, the API uses the units Windows stores. Timeouts are in seconds (0 to 86400, with 0 = Never). Choice settings take the Windows value, not the option's position in the list: 0 Do nothing, 2 Sleep, 3 Hibernate, 6 Shut down, 8 Turn off the display. For System cooling policy, 0 is Active and 1 is Passive. Off/On, No/Yes and Disabled/Enabled settings take 0 and 1. Wake timers take 0 Disable, 1 Enable and 2 Important only. Out-of-range values are rejected with 400, never adjusted.

The per-agent status and apply routes always return 200. The success flag and message tell you whether the request was sent, using the apply messages above.

For example, a policy that turns the display off after 10 minutes on battery and 30 minutes plugged in, and never sleeps when plugged in:

curl -k -X POST -H "Authorization: Bearer <token>" -H "Content-Type: application/json" \
  -d '{"name":"Office desktops","enabled":true,
       "values":{"display-timeout":{"ac":1800,"dc":600},
                 "sleep-timeout":{"ac":0,"dc":null}}}' \
  "https://<server>:8443/api/power/policies"

Troubleshooting#

SymptomWhat to check
Policy assigned but nothing changes on the machineEnforce power policies on agents is off. Or automatic re-apply is off and nobody clicked Apply now. Or the policy is disabled, or a higher-priority assignment matches the agent first.
Agent shows Not reported everywhereThe agent has not reported since the module was available, or it is a Linux agent. Click Refresh while it is connected.
"That agent is not connected."Applies are not queued. Apply when the agent is online, or turn on automatic re-apply so it happens at the next check-in.
Stays in DriftAutomatic triggers do not resend a policy the agent has already answered. Click Apply now, or schedule the Power State Collection task with both switches on. If it still drifts, something on the machine is overriding the value.
Set by Group PolicyA Group Policy controls that power setting. Athena leaves it alone. Change it in the GPO, or remove it from the Athena policy.
Not available hereThat machine does not support the setting (for example, no lid or no ambient light sensor). This is normal.
On battery values ignored on a desktopThe machine has no battery, so On battery values are neither written nor compared.
Removed a policy, but machines kept its valuesThis is expected. Athena does not undo values on a machine. Apply a policy with the values you want.
REST 400: "'…' takes a value between …"A timeout sent in minutes instead of seconds, or a choice value that is not in the list (for example, 4 for an action).