Created
April 4, 2014 16:12
-
-
Save gngdb/9977911 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Hibernating | |
Want to hibernate at low battery automatically. First getting hibernate to work. Created swap partition larger than RAM (8Gb) and set it up with mkswap and swapon as in [Arch Wiki](https://wiki.archlinux.org/index.php/Swap). Added kernel parameters to grub. **Problem**: didn't read the article properly and forgot to add to fstab so swap didn't stay on reboot. | |
Next should use udev rule to get the system to auto-hiberate at 5% or similar. [Forum post](https://bbs.archlinux.org/viewtopic.php?pid=1164408) appears to cover how to do this, but doesn't. It's in the [Laptop page](https://wiki.archlinux.org/index.php/laptop#Udev_events) of the arch wiki. | |
``` | |
# Suspend the system when battery level drops to 2% | |
SUBSYSTEM=="power_supply", ATTR{status}=="Discharging", ATTR{capacity}=="2", RUN+="/usr/bin/systemctl suspend" | |
``` | |
Modified the above to this: | |
``` | |
SUBSYSTEM=="power_supply", ATTR{status}=="Discharging", ATTR{capacity}=="2", RUN+="/usr/bin/systemctl hibernate" | |
``` | |
However, does not appear to be working yet. Could be a problem with detecting battery state. i3status can detect it so it might be possible to fix this by looking at that. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
exercept from laptop setup notebook