Compare commits

...

4 Commits

Author SHA1 Message Date
David Heinemeier Hansson
ecf48a3b4c Use ACPI alarm for RTC wakeup on s2idle systems for hibernation 2026-02-08 11:27:49 +01:00
David Heinemeier Hansson
74eea9e716 The AC Power detection is buggy on several laptops
Just commit to always going from suspend to hibernate on the specified
delay
2026-02-08 10:22:39 +01:00
David Heinemeier Hansson
66cb888a2e Don't try to hibernate based on battery level checks
We just rely on the fixed hibernate delay
2026-02-08 09:09:16 +01:00
David Heinemeier Hansson
0a5755e51f Pick something that doesn't conflict with existing command 2026-02-08 08:42:14 +01:00
3 changed files with 12 additions and 2 deletions

View File

@@ -66,6 +66,16 @@ sudo cp "$OMARCHY_PATH/default/systemd/lid.conf" /etc/systemd/logind.conf.d/
sudo cp "$OMARCHY_PATH/default/systemd/hibernate.conf" /etc/systemd/sleep.conf.d/
sudo cp -p "$OMARCHY_PATH/default/systemd/system-sleep/keyboard-backlight" /usr/lib/systemd/system-sleep/
# Use ACPI alarm for RTC wakeup on s2idle systems (needed for suspend-then-hibernate)
if grep -q "\[s2idle\]" /sys/power/mem_sleep 2>/dev/null; then
LIMINE_DROP_IN="/etc/limine-entry-tool.d/rtc-alarm.conf"
if [[ ! -f "$LIMINE_DROP_IN" ]]; then
echo "Enabling ACPI RTC alarm for s2idle suspend"
sudo mkdir -p /etc/limine-entry-tool.d
echo 'KERNEL_CMDLINE[default]+="rtc_cmos.use_acpi_alarm=1"' | sudo tee "$LIMINE_DROP_IN" >/dev/null
fi
fi
# Regenerate initramfs
echo "Regenerating initramfs..."
sudo limine-mkinitcpio

View File

@@ -9,4 +9,4 @@ source ~/.local/share/omarchy/default/bash/rc
#
# Make an alias for invoking commands you use constantly
# alias p='python'
# alias cc="claude --permission-mode=plan --allow-dangerously-skip-permissions"
# alias cx="claude --permission-mode=plan --allow-dangerously-skip-permissions"

View File

@@ -1,3 +1,3 @@
[Sleep]
HibernateDelaySec=90min
HibernateOnACPower=no
SuspendEstimationSec=0