Contribute
Register

Workaround for energy saver sleep and critical battery sleep.

Joined
Oct 18, 2011
Messages
194
Motherboard
ProBook 4530s
CPU
i3 2310M
Graphics
HD3k & Radeon 6450M
Mac
Classic Mac
Mobile Phone
iOS
This app gets the settings from System Preferences so it does not need any more setup. Just enter System Prefs and select when You want Your laptop to sleep (works for battery and AC separately). Place the app wherever You like and put it into login items, the only output it gives to the user is in the console.

Thanks to that You can finally fall asleep in front of Your computer and You won't wake up with it drained (happend to me all the time) :)

More in github readme file. http://github.com/riodoro1/Bed-Time

Here is the app (updated), please report any bugs!

Merry Christmas! :)
 

Attachments

Joined
Sep 2, 2012
Messages
273
Motherboard
4530s
CPU
i3
Graphics
Intel 3000 512MB
Mac
Classic Mac
Mobile Phone
Android
thanks! nice, but one thing: i think its to early with the hibernate at 10%
you should set it to 3% also you can implementate a function that, if you power it up, after it has hibernate it let you drain the battery full out..
i mean, i have 10% it hibernates.. but i turn it on again, and it forces to hibernate again, get it?

Thanks for your work though
 
Joined
Oct 18, 2011
Messages
194
Motherboard
ProBook 4530s
CPU
i3 2310M
Graphics
HD3k & Radeon 6450M
Mac
Classic Mac
Mobile Phone
iOS
Thanks! On GitHub page in readme file i've put a way to setup different hibernation battery level, it is 10% as some probooks (mine at least) won't go to sleep when battery is >10%. Nice idea with letting user drain the battery after manual wake up, check with the new version in the first post ;)
 
Joined
Jul 19, 2013
Messages
12
Motherboard
HP Probook 4540s
CPU
Intel Core i5 3210M 2.50GHz
Graphics
Intel HD Graphics 4000
Mac
iMac, MacBook Pro
Classic Mac
Mobile Phone
Android
I'm using this workaround but it's been useless. I mean, it goes to sleep automatically but wakes up immediatly. How come?!
 
Joined
Oct 22, 2012
Messages
3,476
Motherboard
HP Elitebook 8470p
CPU
Intel Core i5 3320M
Graphics
Intel HD 4000, 1600x900
Mobile Phone
iOS
I'm using this workaround but it's been useless. I mean, it goes to sleep automatically but wakes up immediatly. How come?!
Try boot with darkwake=10
 
Joined
Feb 13, 2011
Messages
329
Motherboard
Asus Vivobook S15 / x510UAR
CPU
i5-8250U
Graphics
UHD 620
Mobile Phone
Android
Thank you @riodoro1 . Latest commit on Dec 18, 2012, hmm.. Does this still work in High Sierra? Or is there a working alternative for 10.13.x?

[EDIT]: testing SmartSleep by jinx.de (Patrick Stein) now. Not sure though if it actually auto-powers down or auto-sleeps at x% battery level.. I'll see

[EDIT2]: syscl's IOPowerManagement is even tailored for hackintoshes: https://github.com/syscl/IOPowerManagement
I'll see if it still works on 10.13.6
 
Last edited:
Joined
Feb 25, 2012
Messages
312
Motherboard
GA-Z370N-WIFI
CPU
i5-8600K
Graphics
RX 460
Mac
MacBook Pro, Mac mini
Mobile Phone
Android, iOS
Thank you @riodoro1 . Latest commit on Dec 18, 2012, hmm.. Does this still work in High Sierra? Or is there a working alternative for 10.13.x?

[EDIT]: testing SmartSleep by jinx.de (Patrick Stein) now. Not sure though if it actually auto-powers down or auto-sleeps at x% battery level.. I'll see

[EDIT2]: syscl's IOPowerManagement is even tailored for hackintoshes: https://github.com/syscl/IOPowerManagement
I'll see if it still works on 10.13.6
So what are you using and how is it working for you?
 
Joined
Feb 25, 2012
Messages
312
Motherboard
GA-Z370N-WIFI
CPU
i5-8600K
Graphics
RX 460
Mac
MacBook Pro, Mac mini
Mobile Phone
Android, iOS
I've tested IOPowerManagement's IOPowerDeploy.kext and it didn't work at all.
I'm not sure using apps to solve this is a good idea, since they only work when proper user is logged in.
So I wrote a perl script and added it to cron (using lingon X) for every minute running
Code:
#!/usr/bin/perl
$output=`ioreg -w0 -l | grep Capacity`;
$output =~ /Capacity"=(\d+),"Current"=(\d+)/;
$percent = $2/$1*100;
if ($percent < 5) {
    system ('pmset sleepnow');
} else {
    #print "Battary is good\n";
}
I'm using SmartSleep to avoid storing hibernate image on sleep when battery level is above 20%
Those who don't want to purchase it, can use altered version of the script
Code:
#!/usr/bin/perl
$output=`ioreg -w0 -l | grep Capacity`;
$output =~ /Capacity"=(\d+),"Current"=(\d+)/;
$percent = $2/$1*100;
if ($percent < 5) {
    system ('pmset hibernatemode 3');
    system ('pmset sleepnow');
} else {
    #print "Battary is good\n";
    system ('pmset hibernatemode 0');
}
If your system doesn't support sleep at all (like Skylake/Kabylake on iGPU) you can just set pmset hibernatemode 25 manual and use first version of the script
 
Joined
Feb 13, 2011
Messages
329
Motherboard
Asus Vivobook S15 / x510UAR
CPU
i5-8250U
Graphics
UHD 620
Mobile Phone
Android
I've been using a script I adapted - it's been working 100% sweet and reliable. I'm in the process of fine-tuning two last tidbits incl. two installer scripts, one for with sound alert and one for silent. I'll release in a dedicated thread in a bit once the ReadMe is complete and will post the link here. You'll like it :)
 
Joined
Feb 13, 2011
Messages
329
Motherboard
Asus Vivobook S15 / x510UAR
CPU
i5-8250U
Graphics
UHD 620
Mobile Phone
Android
Last edited:
Top