You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

what's the difference between kIOPMAssertionTypePreventUserIdleSystemSleep and kIOPMAssertionTypeNoIdleSleep?

I'm develop an app for prevent sleep in Mac, trying to use the api IOPMAssertionCreateWithName, but I'm confused for whether I should use kIOPMAssertionTypePreventUserIdleSystemSleep or kIOPMAssertionTypeNoIdleSleep. In other words, I want to know what's the difference between kIOPMAssertionTypePreventUserIdleSystemSleep and kIOPMAssertionTypeNoIdleSleep?

MacBook Pro 13″, macOS 13.4

Posted on Apr 23, 2024 12:04 AM

Reply

Similar questions

1 reply

May 28, 2024 4:29 AM in response to Jason_guocy

kIOPMAssertionTypePreventUserIdleSystemSleep prevents the system from sleeping due to user inactivity, meaning the system will stay awake even if there is no user activity like mouse movements or keyboard inputs. However, this does not prevent the system from going to sleep if it is idle, meaning there is no significant CPU or disk activity. The display might still go to sleep, but the system itself will remain awake. This is useful for applications that need to keep the system awake while the user is inactive, such as during downloads or background tasks. On the other hand, kIOPMAssertionTypeNoIdleSleep prevents the system from sleeping due to both user inactivity and overall system idleness. This means the system will stay awake regardless of whether there is user activity or system activity, ensuring the system remains operational at all times. This is ideal for scenarios where constant uptime is required, such as servers or media players.






what's the difference between kIOPMAssertionTypePreventUserIdleSystemSleep and kIOPMAssertionTypeNoIdleSleep?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.