<br />

The system activity governor (SAG) is a subsystem of the power framework
that manages the execution and suspend state of the hardware platform. It
also allows observers to watch for suspend/resume transitions of the
platform.

Other components can create dependencies on SAG's power elements with
[fuchsia.power.broker](https://fuchsia.dev/reference/fuchsia.power.broker/)/[ElementControl](https://fuchsia.dev/reference/fuchsia.power.broker/#ElementControl) to influence SAG's behavior
including preventing system suspension.

The power elements that SAG creates and manages are as follows:

- [fuchsia.power.system](https://fuchsia.dev/reference/fuchsia.power.system/)/[ExecutionState](https://fuchsia.dev/reference/fuchsia.power.system/#ExecutionState)
- [fuchsia.power.system](https://fuchsia.dev/reference/fuchsia.power.system/)/[ApplicationActivity](https://fuchsia.dev/reference/fuchsia.power.system/#ApplicationActivity)
- [fuchsia.power.system](https://fuchsia.dev/reference/fuchsia.power.system/)/[Cpu](https://fuchsia.dev/reference/fuchsia.power.system/#Cpu)

# Internal Dependency Diagram

                   +---+                  +---+
                   | **ExecutionState** |                  |     **ApplicationActivity**     |
                   +---+                  +---+
                   |       ACTIVE       |<---|             ACTIVE              |
                   +---+                  +---+
    +---|     SUSPENDING     |                  |            INACTIVE             |
    |              |                    |                  +---+
    |              +---+
    |              |      INACTIVE      |
    |              +---+
    |
    |    +---+
    |    |             **CPU**             |
    |    +---+
    +--->|             ACTIVE              |
         +---+
         |            INACTIVE             |
         +---+

# Usage

To prevent system suspension, a component can create an assertive dependency
using the `assertive_dependency_token` from `ApplicationActivity`. If the
dependency causes the power level of `ApplicationActivity` to be raised to
[fuchsia.power.system](https://fuchsia.dev/reference/fuchsia.power.system/)/[ApplicationActivityPowerLevel.ACTIVE](https://fuchsia.dev/reference/fuchsia.power.system/#ApplicationActivityPowerLevel.ACTIVE), SAG will not
trigger system suspension until their power levels drop to `INACTIVE`.

Alternatively, components can call [fuchsia.power.system](https://fuchsia.dev/reference/fuchsia.power.system/)/[ActivityGovernor.AcquireWakeLease](https://fuchsia.dev/reference/fuchsia.power.system/#ActivityGovernor.AcquireWakeLease).
Added: 26

## **PROTOCOLS**

## ActivityGovernor

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=222)*

A service for exposing events and power elements managed by the system
activity governor (SAG).

SAG is responsible for managing the execution state of the hardware
platform. The hardware platform consists of the components required to
execute code on the device. This typically includes the CPU, memory,
operating system, and other components required for these components to
function (clock trees, power domains, etc.).
Added: 26

<br />

### AcquireUnmonitoredWakeLease

Creates an unmonitored lease that blocks suspension of the hardware platform.

The hardware platform will not suspend as long as a valid
[LeaseToken](https://fuchsia.dev/reference/fidl/fuchsia.power.system#LeaseToken) exists.

This is intended for leases expected to be held for extended periods.
Unlike normal wake leases, the server does not monitor the duration
of an unmonitored wake lease and will not file a crash report if it exceeds
preconfigured alert thresholds.
Added: HEAD

#### Request

| Name | Type |
|---|---|
| `name` | `string:64` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#ActivityGovernor_AcquireUnmonitoredWakeLease_Result` |

### AcquireWakeLease

Creates a lease that blocks suspension of the hardware platform.

The hardware platform will not suspend as long as a valid
[LeaseToken](https://fuchsia.dev/reference/fidl/fuchsia.power.system#LeaseToken) exists.
Added: 26

#### Request

| Name | Type |
|---|---|
| `name` | `string:64` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#ActivityGovernor_AcquireWakeLease_Result` |

### AcquireWakeLease2

Creates a lease that blocks suspension of the hardware platform, optionally
associating it with a predecessor lease (`previous_client_token`).

WARNING: Suspension can only be considered blocked after the client
receives the response to this call, unless `previous_client_token` is
provided and actively blocking suspension. When `previous_client_token`
is provided, SAG retains the `previous_client_token` handle until the new
wake lease is registered to prevent suspension.

The hardware platform will remain resumed until `server_token` observes
`PEER_CLOSED`, indicating all handles to the client side of the
`LeaseToken` are closed.
Added: HEAD

#### Request

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#ActivityGovernorAcquireWakeLease2Request` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#ActivityGovernor_AcquireWakeLease2_Result` |

### AcquireWakeLeaseWithToken

Creates a lease that blocks suspension of the hardware platform.
WARNING: Suspension can only be considered blocked after the client
receives the response to this call. This means, for example, an
interrupt should only be ack'ed or a different wake lease dropped only
**after** getting an error-free response.

The hardware platform will remain resumed until `server_token` observes
`PEER_CLOSED`, indicating all handles to the client side of the
`LeaseToken` are closed.
Added: HEAD

#### Request

| Name | Type |
|---|---|
| `name` | `string:64` |
| `server_token` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#LeaseToken` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#ActivityGovernor_AcquireWakeLeaseWithToken_Result` |

### GetPowerElements

Gets the power elements owned by the activity governor.

If an error occurs while the server is registering a power element with
the power broker or an error occurs while creating a token for a power
element, then the channel to `ActivityGovernor` will be closed by the
server and no response will be returned.
Added: HEAD

#### Request

\<EMPTY\>

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#ActivityGovernor_GetPowerElements_Result` |

### RegisterSuspendBlocker

Registers a suspend blocker.

On successful registration, a wake lease token is returned. This token
prevents hardware platform suspension while it exists. Clients are
expected to perform any initialization of the given `suspend_blocker`
server while holding this token. Additionally, this means the first call
`suspend_blocker` will get is `BeforeSuspend`.

To unregister, close the `SuspendBlocker` channel.

If any required field of the table is missing, the error
[RegisterSuspendBlockerError.INVALID_ARGS](https://fuchsia.dev/reference/fidl/fuchsia.power.system#RegisterSuspendBlockerError.INVALID_ARGS) is returned.

If an error occurs while registering `suspend_blocker`, it will be
dropped, closing the channel.
Added: 27

#### Request

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#ActivityGovernorRegisterSuspendBlockerRequest` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#ActivityGovernor_RegisterSuspendBlocker_Result` |

### TakeApplicationActivityLease

Creates a lease that blocks the system from dropping below the Application
Activity 'Active' state. In particular, this blocks suspension of the
hardware platform.

This method is *not* safe to call during SuspendBlocker.BeforeSuspend.

If an error occurs while creating a token for the activity lease, then the
channel to `ActivityGovernor` will be closed by the server and no
response will be returned.
Added: HEAD

#### Request

| Name | Type |
|---|---|
| `name` | `string:64` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#ActivityGovernor_TakeApplicationActivityLease_Result` |

## BootControl

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=419)*

A service that processes notification about the system boot state.

<br />

### SetBootComplete

Notify the SAG that the system has booted. SAG will not suspend the
hardware platform until this method is called at least once per boot.

#### Request

\<EMPTY\>

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#BootControl_SetBootComplete_Result` |

## CpuElementManager

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=428)*

A service that provides access to CPU-related power elements.
Added: HEAD

<br />

### AddExecutionStateDependency

Adds a dependency from the Execution State power element to the target
power element identified by [dependency_token](https://fuchsia.dev/reference/fidl/fuchsia.power.system#dependency_token) at [power_level](https://fuchsia.dev/reference/fidl/fuchsia.power.system#power_level).

Once the Execution State power element is created, future calls will
return [fuchsia.power.system](https://fuchsia.dev/reference/fuchsia.power.system/)/[AddExecutionStateDependencyError.BAD_STATE](https://fuchsia.dev/reference/fuchsia.power.system/#AddExecutionStateDependencyError.BAD_STATE)
and no changes to Execution State dependencies will be made.

If any required entries in the request are missing, the server will
return [fuchsia.power.system](https://fuchsia.dev/reference/fuchsia.power.system/)/[AddExecutionStateDependencyError.INVALID_ARGS](https://fuchsia.dev/reference/fuchsia.power.system/#AddExecutionStateDependencyError.INVALID_ARGS).

#### Request

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#CpuElementManagerAddExecutionStateDependencyRequest` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#CpuElementManager_AddExecutionStateDependency_Result` |

### GetCpuDependencyToken

Gets the assertive dependency token for the CPU power element.

#### Request

\<EMPTY\>

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#CpuElementManager_GetCpuDependencyToken_Result` |

## ExecutionStateManager

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=395)*

A service for exposing execution state management capabilities.
Added: HEAD

<br />

### AddApplicationActivityDependency

Adds a dependency from the Application Activity power element to the target
power element identified by [dependency_token](https://fuchsia.dev/reference/fidl/fuchsia.power.system#dependency_token) at [power_level](https://fuchsia.dev/reference/fidl/fuchsia.power.system#power_level).
Be aware of the following client-side conditions:

- If SAG is not fully initialized, the call blocks until initialization is complete.
- The call may block as required by `fuchsia.power.broker/ElementControl.AddDependency`, which at time of writing may call `fuchsia.power.ElementControl.SetLevel` on the associated power element.

#### Request

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#ExecutionStateManagerAddApplicationActivityDependencyRequest` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#ExecutionStateManager_AddApplicationActivityDependency_Result` |

### GetExecutionStateDependencyToken

Gets the dependency token for the execution state power element. This will block if SAG
is not fully initialized.

#### Request

\<EMPTY\>

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#ExecutionStateManager_GetExecutionStateDependencyToken_Result` |

## SuspendBlocker

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=173)*

An entity that blocks suspend until it handles transitions across hardware
platform suspend and resume.
Added: 27

<br />

### AfterResume

Called after system activity governor is aware that the hardware
platform has resumed.

For the duration of this call, ExecutionState is at level INACTIVE,
but all dependencies of `ExecutionStateLevel::SUSPENDING` are guaranteed
be satisified.

Consequently, a SuspendBlocker MUST NOT call
`ActivityGovernor.TakeApplicationActivityLease` nor perform any other
action that blocks on Execution State reaching a level other than
INACTIVE. Doing so will result in a deadlock. (However, AcquireWakeLease
does *not* block in this way and is safe to call.)

#### Request

\<EMPTY\>

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#SuspendBlocker_AfterResume_Result` |

### BeforeSuspend

Called after system activity governor begins operations to suspend the
hardware platform.

The server is expected to respond once it has performed the operations
it needs to prepare itself for suspend, if any. All dependencies of
`ExecutionStateLevel::SUSPENDING` are guaranteed to be satisified for
the duration of this call and may be revoked once the server replies.

Operations to suspend the hardware platform may vary between different
hardware platforms and product configurations. At a minimum, the client
and server MUST assume that general code execution continues
until a reply to this call is received by the client. If the
SuspendBlocker wants to preempt suspend operations, it MUST call
`ActivityGovernor.AcquireWakeLease` before replying to this call.

ExecutionState will be at its SUSPENDING level for the duration of this
call. Consequently, a SuspendBlocker MUST NOT call
`ActivityGovernor.TakeApplicationActivityLease` nor perform any other
action that blocks on Execution State reaching a level other than
INACTIVE. Doing so will result in a deadlock. (However, AcquireWakeLease
does *not* block in this way and is safe to call.)

#### Request

\<EMPTY\>

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#SuspendBlocker_BeforeSuspend_Result` |

## **STRUCTS**

### ActivityGovernor_AcquireUnmonitoredWakeLease_Response [resource](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#value-vs-resource)

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=266)*

| Field | Type | Description | Default |
|---|---|---|---|
| `token` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#LeaseToken` | The token that blocks hardware platform suspension. | No default |

### ActivityGovernor_AcquireWakeLease2_Response

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=336)*

\<EMPTY\>

### ActivityGovernor_AcquireWakeLeaseWithToken_Response

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=291)*

\<EMPTY\>

### ActivityGovernor_AcquireWakeLease_Response [resource](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#value-vs-resource)

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=245)*

| Field | Type | Description | Default |
|---|---|---|---|
| `token` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#LeaseToken` | The token that blocks hardware platform suspension. | No default |

### ActivityGovernor_RegisterSuspendBlocker_Response [resource](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#value-vs-resource)

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=386)*

| Field | Type | Description | Default |
|---|---|---|---|
| `token` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#LeaseToken` | The token that blocks hardware platform suspension. | No default |

### ActivityGovernor_TakeApplicationActivityLease_Response [resource](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#value-vs-resource)

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=353)*

| Field | Type | Description | Default |
|---|---|---|---|
| `token` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#LeaseToken` | The token that blocks application activity from dropping below the 'Active' state. | No default |

### BootControl_SetBootComplete_Response

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=422)*

\<EMPTY\>

### CpuElementManager_AddExecutionStateDependency_Response

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=449)*

\<EMPTY\>

### ExecutionStateManager_AddApplicationActivityDependency_Response

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=414)*

\<EMPTY\>

### SuspendBlocker_AfterResume_Response

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=209)*

\<EMPTY\>

### SuspendBlocker_BeforeSuspend_Response

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=195)*

\<EMPTY\>

## **ENUMS**

### AcquireWakeLeaseError [flexible](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

Type: `uint32`

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=66)*

Errors returned by `ActivityGovernor/AcquireWakeLease` and `AcquireWakeLease2`.
Added: 26

<br />

| Name | Value | Description |
|---|---|---|
| ### INTERNAL | `1` | The service encountered an error while attempting to issue a wake lease. |
| ### INVALID_NAME | `2` | The name for the wake lease is empty or invalid. |
| ### SERVER_TOKEN_REQUIRED | `3` | The required `server_token` argument was not provided. Added: HEAD |
| ### INVALID_PREVIOUS_TOKEN | `4` | The `previous_client_token` argument is invalid (for example, it refers to the same token pair as `server_token`). Added: HEAD |

### AddApplicationActivityDependencyError [flexible](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

Type: `uint32`

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=151)*

Error codes for responses from `AddApplicationActivityDependency` in
[fuchsia.power.system](https://fuchsia.dev/reference/fuchsia.power.system/)/[ActivityGovernor](https://fuchsia.dev/reference/fuchsia.power.system/#ActivityGovernor).
Added: HEAD

<br />

| Name | Value | Description |
|---|---|---|
| ### ALREADY_EXISTS | `1` | The dependency already exists. |
| ### INVALID | `2` | Required arguments are either not given or are not valid. |
| ### INTERNAL | `3` | The service encountered an error while attempting to add the dependency. |

### AddExecutionStateDependencyError [flexible](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

Type: `uint32`

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=141)*

Error codes for responses from `AddExecutionStateDependency` in
[fuchsia.power.system](https://fuchsia.dev/reference/fuchsia.power.system/)/[CpuElementManager](https://fuchsia.dev/reference/fuchsia.power.system/#CpuElementManager).
Added: HEAD

<br />

| Name | Value | Description |
|---|---|---|
| ### INVALID_ARGS | `1` | Required arguments are either not given or are not valid. |
| ### BAD_STATE | `2` | The server is not in a state to handle the request. |

### ApplicationActivityLevel [flexible](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

Type: `uint8`

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=127)*

Application activity power levels

Elements that need to keep the system from suspending should take an assertive
dependency on `ApplicationActivityLevel::ACTIVE`. When these components are
performing work, they should request a lease to ensure the system remains
active, and drop the lease when they are done.
Added: HEAD

<br />

| Name | Value | Description |
|---|---|---|
| ### INACTIVE | `0` |   |
| ### ACTIVE | `1` |   |

### CpuLevel [flexible](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

Type: `uint8`

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=107)*

CPU power levels

Elements should take an assertive dependency on `CpuLevel::ACTIVE`
to ensure that the element will be suspended before the CPU suspends.
Added: HEAD

<br />

| Name | Value | Description |
|---|---|---|
| ### INACTIVE | `0` |   |
| ### ACTIVE | `1` |   |

### ExecutionStateLevel [flexible](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

Type: `uint8`

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=82)*

Execution state power levels
Added: HEAD

<br />

| Name | Value | Description |
|---|---|---|
| ### INACTIVE | `0` |   |
| ### SUSPENDING | `1` |   |
| ### ACTIVE | `2` |   |

### RegisterSuspendBlockerError [flexible](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

Type: `uint32`

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=163)*

Error codes for responses from `RegisterSuspendBlocker` in
[fuchsia.power.system](https://fuchsia.dev/reference/fuchsia.power.system/)/[ActivityGovernor](https://fuchsia.dev/reference/fuchsia.power.system/#ActivityGovernor).
Added: 27

<br />

| Name | Value | Description |
|---|---|---|
| ### INTERNAL | `1` | The service encountered an error while attempting to issue a wake lease. |
| ### INVALID_ARGS | `2` | Required arguments are either not given or are not valid. |

## **TABLES**

### ActivityGovernorAcquireWakeLease2Request [resource](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#value-vs-resource)

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=306)*

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `name` | `string:64` | The name of the lease. Required. The name cannot be empty but is not required to be globally unique. |
| ### 2 | `server_token` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#LeaseToken` | The server side of the token that blocks hardware platform suspension. Required. The caller should give out handles to the client side of the `LeaseToken` which is peered to this `server_token`. |
| ### 3 | `previous_client_token` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#LeaseToken` | Optional predecessor client token for the lease being exchanged. If present, SAG holds this handle until the new wake lease is registered in SAG's internal tracking structures, and records in Inspect that the new wake lease is associated with the predecessor lease (`replaces_lease_id`). Providing `previous_client_token` does not destroy the previous lease if other handles to its client token remain open. |
| ### 4 | `unmonitored` | `bool` | Optional flag indicating whether the wake lease is unmonitored. If present and true, behaves like `AcquireUnmonitoredWakeLease`: SAG does not monitor the duration of this lease and will not file a crash report if it exceeds preconfigured alert thresholds. Defaults to false if absent. |

### ActivityGovernorRegisterSuspendBlockerRequest [resource](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#value-vs-resource)

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=375)*

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `suspend_blocker` | `client_end:https://fuchsia.dev/reference/fidl/fuchsia.power.system#SuspendBlocker` | The client end of the SuspendBlocker service. Required. |
| ### 2 | `name` | `string:64` | The name of the suspend blocker. Required. The name cannot be empty but is not required to be globally unique. |

### ApplicationActivity [resource](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#value-vs-resource)

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=116)*

Holds tokens to the application activity power element.

[fuchsia.power.system](https://fuchsia.dev/reference/fuchsia.power.system/)/[ApplicationActivityLevel](https://fuchsia.dev/reference/fuchsia.power.system/#ApplicationActivityLevel) defines the power levels supported by this power element.
Added: HEAD

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `assertive_dependency_token` | `https://fuchsia.dev/reference/fuchsia.power.broker//https://fuchsia.dev/reference/fuchsia.power.broker#DependencyToken` |   |

### Cpu [resource](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#value-vs-resource)

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=92)*

Holds tokens to the CPU power element.

[fuchsia.power.system](https://fuchsia.dev/reference/fuchsia.power.system/)/[CpuLevel](https://fuchsia.dev/reference/fuchsia.power.system/#CpuLevel) defines the power levels supported by this power element.
Added: HEAD

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `assertive_dependency_token` | `https://fuchsia.dev/reference/fuchsia.power.broker//https://fuchsia.dev/reference/fuchsia.power.broker#DependencyToken` |   |

### CpuElementManagerAddExecutionStateDependencyRequest [resource](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#value-vs-resource)

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=441)*

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `dependency_token` | `https://fuchsia.dev/reference/fuchsia.power.broker//https://fuchsia.dev/reference/fuchsia.power.broker#DependencyToken` | The assertive dependency token representing the target power element of the dependency. Required. |
| ### 2 | `power_level` | `https://fuchsia.dev/reference/fuchsia.power.broker//https://fuchsia.dev/reference/fuchsia.power.broker#PowerLevel` | The power level of the target power element. Required. |

### ExecutionState [resource](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#value-vs-resource)

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=98)*

Holds the dependency token for the Execution State power element.
Added: HEAD

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `dependency_token` | `https://fuchsia.dev/reference/fuchsia.power.broker//https://fuchsia.dev/reference/fuchsia.power.broker#DependencyToken` |   |

### ExecutionStateManagerAddApplicationActivityDependencyRequest [resource](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#value-vs-resource)

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=407)*

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `dependency_token` | `https://fuchsia.dev/reference/fuchsia.power.broker//https://fuchsia.dev/reference/fuchsia.power.broker#DependencyToken` | The dependency token representing the target power element of this dependency. Required. |
| ### 2 | `power_level` | `https://fuchsia.dev/reference/fuchsia.power.broker//https://fuchsia.dev/reference/fuchsia.power.broker#PowerLevel` | The power level of the target power element. Required. |

### PowerElements [resource](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#value-vs-resource)

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=134)*

A collection of power elements that are managed by the activity governor.
Added: HEAD

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 3 | `application_activity` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#ApplicationActivity` |   |

## **UNIONS**

### ActivityGovernor_AcquireUnmonitoredWakeLease_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible) [resource](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#value-vs-resource)

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=266)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#ActivityGovernor_AcquireUnmonitoredWakeLease_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#AcquireWakeLeaseError` |   |
| ### 3 | `framework_err` | `internal` |   |

<br />

### ActivityGovernor_AcquireWakeLease2_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=336)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#ActivityGovernor_AcquireWakeLease2_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#AcquireWakeLeaseError` |   |
| ### 3 | `framework_err` | `internal` |   |

<br />

### ActivityGovernor_AcquireWakeLeaseWithToken_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=291)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#ActivityGovernor_AcquireWakeLeaseWithToken_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#AcquireWakeLeaseError` |   |
| ### 3 | `framework_err` | `internal` |   |

<br />

### ActivityGovernor_AcquireWakeLease_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible) [resource](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#value-vs-resource)

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=245)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#ActivityGovernor_AcquireWakeLease_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#AcquireWakeLeaseError` |   |
| ### 3 | `framework_err` | `internal` |   |

<br />

### ActivityGovernor_GetPowerElements_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible) [resource](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#value-vs-resource)

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=233)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#PowerElements` |   |
| ### 3 | `framework_err` | `internal` |   |

<br />

### ActivityGovernor_RegisterSuspendBlocker_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible) [resource](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#value-vs-resource)

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=386)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#ActivityGovernor_RegisterSuspendBlocker_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#RegisterSuspendBlockerError` |   |
| ### 3 | `framework_err` | `internal` |   |

<br />

### ActivityGovernor_TakeApplicationActivityLease_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible) [resource](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#value-vs-resource)

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=353)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#ActivityGovernor_TakeApplicationActivityLease_Response` |   |
| ### 3 | `framework_err` | `internal` |   |

<br />

### BootControl_SetBootComplete_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=422)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#BootControl_SetBootComplete_Response` |   |
| ### 3 | `framework_err` | `internal` |   |

<br />

### CpuElementManager_AddExecutionStateDependency_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=449)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#CpuElementManager_AddExecutionStateDependency_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#AddExecutionStateDependencyError` |   |
| ### 3 | `framework_err` | `internal` |   |

<br />

### CpuElementManager_GetCpuDependencyToken_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible) [resource](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#value-vs-resource)

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=430)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#Cpu` |   |
| ### 3 | `framework_err` | `internal` |   |

<br />

### ExecutionStateManager_AddApplicationActivityDependency_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=414)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#ExecutionStateManager_AddApplicationActivityDependency_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#AddApplicationActivityDependencyError` |   |
| ### 3 | `framework_err` | `internal` |   |

<br />

### ExecutionStateManager_GetExecutionStateDependencyToken_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible) [resource](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#value-vs-resource)

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=398)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#ExecutionState` |   |
| ### 3 | `framework_err` | `internal` |   |

<br />

### SuspendBlocker_AfterResume_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=209)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#SuspendBlocker_AfterResume_Response` |   |
| ### 3 | `framework_err` | `internal` |   |

<br />

### SuspendBlocker_BeforeSuspend_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.power.system/system.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=195)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.power.system#SuspendBlocker_BeforeSuspend_Response` |   |
| ### 3 | `framework_err` | `internal` |   |

<br />

## **CONSTANTS**

| Name | Value | Type | Description |
|---|---|---|---|
| [MAX_ELEMENT_NAME_LEN](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=62) | `64` | `uint8` | Added: 26 |

## **ALIASES**

| Name | Value | Description |
|---|---|---|
| [LeaseToken](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.power.system/system.fidl;l=59) | `zx/Handle` | Added: 26 |