Is there a way to disable the screen saver and the display sleep with cocoa?
To change these preferences, choose Apple menu > System Preferences, click Desktop & Screen Saver , then click Screen Saver. Choose how long your Mac can be inactive before the screen saver starts. If you don't want to use a screen saver, deselect the checkbox.
It sounds like your Mac will indeed never go to sleep, but the Screen Saver is set to activate after 15 minutes. You can disable the screen saver by opening the Desktop & Screen Saver preference pane in System Preferences then selecting Never in the drop down box in the bottom left corner of the window.
From the Apple menu, choose System Preferences. Click Desktop & Screen Saver. Click Screen Saver, and then use the slider to choose 15 minutes (or less).
The use of UpdateSystemActivity(OverallAct) has been deprecated in OSX 10.8.
The recommended approach is now to block it with the following call:
IOPMAssertionCreateWithName(kIOPMAssertionTypePreventUserIdleDisplaySleep,
kIOPMAssertionLevelOn, reasonForActivity, &assertionID);
See this Apple Q&A for further details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With