---
title: ChangePowerState
framework: driverkit
role: symbol
role_heading: Instance Method
path: driverkit/ioservice/changepowerstate
---

# ChangePowerState

Changes the device’s power state to the specified level.

## Declaration

```occ
virtual kern_return_t ChangePowerState(uint32_t powerFlags);
```

## Parameters

- `powerFlags`: The new power state for the device. Typically, you specify only doc://com.apple.driverkit/documentation/DriverKit/kIOServicePowerCapabilityLow for this parameter. For a list of all possible values, see doc://com.apple.driverkit/documentation/DriverKit/3325571-service_power_capabilities.

## Return Value

Return Value kIOReturnSuccess on success, or another value if an error occurs. For a list of error codes, see Error Codes.

## Discussion

Discussion If the new state is different than the device’s current state, this method places an asynchronous request to change the state to the new value. If the change is successful, the system subsequently calls the SetPowerState method of your service.

## See Also

### Responding to Power-Level Changes

- [SetPowerState](driverkit/ioservice/setpowerstate.md)
- [Service Power Capabilities](driverkit/3325571-service_power_capabilities.md)
