nofearl Posted March 19, 2010 Share Posted March 19, 2010 a quick script that checks the battery level every 2mins and shutdowns the computer if its less than 3% copy batterysave to /bin copy plist file to /System/Library/LaunchDaemons/ run sudo su - chmod +x /bin/batterysave chown root:wheel /System/Library/LaunchDaemons/com.nofearl.batterysave.plist and restart... it uses "shutdown -h now" and its not graceful (you will loose unsaved document) but since the sleep is not working for me, better than depleting and possibly damaging the battery.. batterysave.zip 1 Link to comment Share on other sites More sharing options...
booger_sniffer5000 Posted March 19, 2010 Share Posted March 19, 2010 Very nice script. Link to comment Share on other sites More sharing options...
chewanik Posted March 20, 2010 Share Posted March 20, 2010 Thanks buddy, keep up the good work! Link to comment Share on other sites More sharing options...
ehunt123 Posted April 2, 2010 Share Posted April 2, 2010 http://www.jinx.de/SmartSleep.html Link to comment Share on other sites More sharing options...
manmal Posted July 2, 2010 Share Posted July 2, 2010 http://www.jinx.de/SmartSleep.html hi guyz, thanks for the script and for the link! I have 2 questions about this topic: 1) is it possible to change the batterysave script to force it to go to "sleep" instead of shutdown? How could it be done? I can't find any hibernate or sleep command like shutdown... I ask because in my system, although sleep works, it doesn't go automatically in sleep when battery is low (i don't know where is the preference to control/adjust that ... if anyone knows it, please let me know because it's what i am looking for now... thanks ) 2) I know there is smartsleep that should do that, but in my system it doesn't work. The question is : Is it possible to "force" SmartSleep to use hibernatemode 5 instead of 1 for hibernating ? it uses hibernatemode 1 by default and with this mode hibernatemode here doesn't work (also unchecking secure virtual memory under preferences-security). Here mode5 works, mode1 not and that's the reason why i am asking... the smartmode is the option i am looking for, if i just can replace hibernatemode=5,instead of hibernatemode=1 set by default by smartmode in smartsleep. Thanks in advance! Mal Link to comment Share on other sites More sharing options...
valv Posted July 4, 2010 Share Posted July 4, 2010 is it possible to change the batterysave script to force it to go to "sleep" instead of shutdown? How could it be done? I can't find any hibernate or sleep command like shutdown... I ask because in my system, although sleep works, it doesn't go automatically in sleep when battery is low (i don't know where is the preference to control/adjust that ... if anyone knows it, please let me know because it's what i am looking for now... thanks ) Sure it could be done. Here is an effort to make it sleep instead of shutdown. It is untested though. batterysleep.zipAlso, use this next one if u 'd like to make your machine go to hibernate instead, while preserving on-demand sleep mode. batteryhibernate.zip Greetz 1 Link to comment Share on other sites More sharing options...
mightycrown Posted October 25, 2010 Share Posted October 25, 2010 Sure it could be done. Here is an effort to make it sleep instead of shutdown. It is untested though.batterysleep.zipAlso, use this next one if u 'd like to make your machine go to hibernate instead, while preserving on-demand sleep mode. batteryhibernate.zip Greetz hello i am about to try ur script. But i got a question which you set hibernation mode to 1 in the beginning and return to mode 3 when executing the script. Is it necessary to change mode from 1 to 3? since my hibernation mode is 3. Edit: I v tried the Script for Hibernation. The script executed well however it did not send machine to Hibernation but to Sleep. Finally i got the last thing that my laptop should work like mac. My Laptop hibernate when battery is low. sleeps like usual. I achieved via Ur script and App Smartsleep Thanks Link to comment Share on other sites More sharing options...
TiGuy82 Posted October 27, 2010 Share Posted October 27, 2010 Sure it could be done. Here is an effort to make it sleep instead of shutdown. It is untested though.batterysleep.zipAlso, use this next one if u 'd like to make your machine go to hibernate instead, while preserving on-demand sleep mode. batteryhibernate.zip Greetz The sleep mode works pretty well on mine ASUS 1201n, thank you very much!! Link to comment Share on other sites More sharing options...
sefsesas Posted November 2, 2010 Share Posted November 2, 2010 Thanks for your scripts,now some laptop already can auto turn to sleep when battery is low Link to comment Share on other sites More sharing options...
mightycrown Posted November 4, 2010 Share Posted November 4, 2010 Auto deepsleep when bat low. The script and the utility are attached. How to is in Readme. Please report the result. Note: I m assuming that you have already got Deepsleep to work:) AutoDeepsleep.zip 1 Link to comment Share on other sites More sharing options...
BuXb Posted August 9, 2018 Share Posted August 9, 2018 (edited) Very cool. Is any of the sleep or hibernate scripts still known to work in macOS High Sierra 10.13.6? On 11/4/2010 at 5:38 PM, mightycrown said: Auto deepsleep when bat low. The script and the utility are attached. How to is in Readme. Please report the result. Note: I m assuming that you have already got Deepsleep to work:) AutoDeepsleep.zip /Applications/Utilities/deepsleep ; exit; dyld: lazy symbol binding failed: Symbol not found: _IOPMCopyActivePowerProfiles Referenced from: /Applications/Utilities/deepsleep Expected in: /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit dyld: Symbol not found: _IOPMCopyActivePowerProfiles Referenced from: /Applications/Utilities/deepsleep Expected in: /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit Abort trap: 6 logout Edited August 9, 2018 by BugsB Link to comment Share on other sites More sharing options...
Tapash Datta Posted September 16, 2018 Share Posted September 16, 2018 Hi, This script seems to be not working on my High Sierra!! Any one tried? thanks Link to comment Share on other sites More sharing options...
BuXb Posted November 10, 2018 Share Posted November 10, 2018 (edited) Have a look at It's open source and you can adapt anything to your liking Edited January 2, 2019 by BugsB Link to comment Share on other sites More sharing options...
Recommended Posts