archlinux: Custom suspend scripting?
I was reading about suspending to RAM and Disk here: https://wiki.archlinux.org/index.php/Suspending_to_Disk_with_hibernate-script
I was wondering if its possible to automatically "wake up" from suspending to RAM and just shut off after four hours (and save battery life)?
Alternatively, could I just have it suspend to RAM first, and then after 4 hours (if uninterrupted), wake up and suspend to disk? I have it setup like this in Windows, but I'm not sure what the best way to do this in arch.
About this post
- Posted
- Archived
- Score
- 7 · 100% up
- Kind
- Text
- ID
- kblu3
9 comments
Deleted before we saved it.
cron and rtcwake
Okay, I got a working script:
I saved it as /etc/acpi/actions/customsleep.sh
I also set /etc/acpi/events/lid to use that script, but it doesn't seem to actually use it. When I close the lid, it uses some other script. Any thoughts?
EDIT: I edited /etc/acpi/handler.sh to point to this script on lid close. Still getting a problem where if it turns on while suspended, it will try to resuspend and crash. Not sure how to prevent that...
Deleted before we saved it.
I use this suspend/wakeup script I found somewhere, maybe it's of some help. Need rtcwake and pm-utils (I think)