<!--
{
  "availability" : [
    "DriverKit: 19.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "USBDriverKit",
  "identifier" : "/documentation/USBDriverKit/IOUSBHostInterface/SetIdlePolicy",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "USBDriverKit"
    ],
    "preciseIdentifier" : "c:@S@IOUSBHostInterface@F@SetIdlePolicy#i#"
  },
  "title" : "SetIdlePolicy"
}
-->

# SetIdlePolicy

Sets the desired idle suspend timeout for the interface.

```
virtual kern_return_t SetIdlePolicy(uint32_t deviceIdleTimeout);
```

## Parameters

`deviceIdleTimeout`

The amount of time, in milliseconds, to wait after all pipes are idle before suspending the device. It is recommended that you choose an idle timeout value of 50 milliseconds or larger.

## Return Value

<doc://com.apple.documentation/documentation/DriverKit/kIOReturnSuccess> on success, or another value if an error occurs. See <doc://com.apple.documentation/documentation/DriverKit/error-codes>.

## Discussion

An idle device defers electrical suspension for the specified duration. By default, [`IOUSBHostInterface`](/documentation/USBDriverKit/IOUSBHostInterface) doesn’t enable an idle policy, letting the device remain in the active state as long as the host machine is awake. Call this method to enable an idle policy for your device.

When you enable an idle policy and no I/O requests are pending, the system waits for the specified amount of time before electrically suspending the device. For a device with multiple interfaces, the system uses the largest timeout value from among all the open interfaces. A new I/O request during the wait period, or after suspension occurs, cancels the suspension and resumes I/O operations.

If the parent [`IOUSBHostDevice`](/documentation/USBDriverKit/IOUSBHostDevice) object does not allow low-power mode for the device, the system disables idle suspension altogether.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)