1 (edited by auanta 2022-09-08 03:46:34)

Topic: Hibernation in Hyperbola (and a battery script for you!)

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
for general troubleshooting: I'm running Hyperbola on a GPD MicroPC, my deblobbed firmwares are iwlwifi (I use a USB wifi adapter instead) and Bluetooth (which I don't miss because it is a security hazard) as well as i915 DMC firmware (which I can safely ignore) and the r8169 but my ethernet works perfectly (maybe even improved)

2

Re: Hibernation in Hyperbola (and a battery script for you!)

Yes: You can use uswsusp for this. Here more information about that kernel-module also: https://wiki.archlinux.org/title/Uswsusp

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!