Topic: [solved] Hibernation in Hyperbola (and a battery script for you!)
Update: Please view the final post in this thread for a solution on how to hibernate your computer and have comprehensive battery alerts without need of a taskbar or status bar, so you can save on screen space and mental distraction; more importantly, you save your precious files from corruption.
Hello all,
I left my computer suspended for DAYS and I came back to see it was still at 81%! I love that for me! It required no configuration at all!
However, I have yet to figure out hibernate. Does anyone happen to know how to make hibernation work in Hyperbola?
I'm using syslinux, so the grub solutions don't work.
It appears there is a custom ACPI script . I would edit it, but that's beyond my skill. It's located at /etc/acpi/handler.sh
Bonus, I have a battery script you can use. It needs acpid and herbe as dependencies. You can, if you wish, use espeak too.
#!/bin/bash
# Modified from: https://gist.github.com/bandaangosta/0a0fdbd03215b925576c4b234fc4d4f1
# Credits to user BlackVeils and bandaangosta
# Steps:
# 1. Save this script to battery_notify.sh
# 2. Edit the 'alarm' variable to point to your sound file of choice
# 3. Give execution permission: chmod +x battery_notify.sh
# 4. Run the script to test it. If happy, add to your startup applications.
# Set the alert tone for battery, or leave it as empty quotes.
# choose an audio file
alarm=""
# Notify when below this percentage
low_warning=21
#Notify when above this percentage
high_warning=79
# How often to check battery status, in minutes
check_interval=5
while true; do
battery_level=$(acpi -b \
| cut -d, -f2 | cut --characters=2,3,4 \
| sed 's/%//g')
charging=$(acpi -b | grep -c "Charging")
# When battery is low, and not already charging
if [ $battery_level -lt $low_warning ] &&
[ $charging -eq 0 ]
then
# play -q -v 0.40 "$alarm" &
# espeak "Atencion, la bateria ya tiene 20%, por favor conecte el cargador" -s 140
herbe " Low battery: ${battery_level}% " \
" Bateria tiene 20%, ve a recargarlo! "
fi
# When battery is high, and charging
if [ $battery_level -gt $high_warning ] &&
[ $charging -eq 1 ]
then
# play -q -v 0.40 "$alarm" &
# espeak "Atencion, la bateria ya tiene 80%, por favor quite el cargador" - s 140
herbe " High battery: ${battery_level}% " \
" Bateria tiene 80%, disconecte el cargador ahora "
fi
sleep ${check_interval}m
done