You are not logged in.
So I have this thinkpad x200s and when the battery runs out it dies.. hard. I would like it to hibernate instead. I have followed the wiki which tells me to add an udev rule.
/etc/udev/rules.d/99-lowbat.rules
# Suspend the system when battery level drops to 5% or lower
SUBSYSTEM=="power_supply", ATTR{status}=="Discharging", ATTR{capacity}=="[0-5]", RUN+="/usr/bin/systemctl hibernate"It is now addet but I do not know if I need to do anything else. Do I need to activate it or add it to systemctl?
Thank you for reading my question ![]()
Last edited by re-mind (2017-05-07 21:06:30)
Mein.conf
Offline
There's a link right below that instructions on the wiki page which tells you how to test rules before loading them.
Follow that and read the next ten lines...
Offline
Thank you for the answer seth ![]()
I'm just gonna write up the solution if anyone else needs the same answers. Setting the udev rule is "obviously" not enough. The udev-rule worked fine but Arch did not know where to write to and where to resume from. Therefore I edited the line in grub containing "GRUB_CMDLINE_LINUX_DEFAULT=" and replaced "quiet" with "resume=/dev/sda3" where sda3 is where my swap is located.
sudo nano /etc/default/grub Then edited /etc/mkinitcpio.conf and added "resume" under hooks AFTER udev.
sudo nano /etc/mkinitcpio.confThen rebuilt kernel and grub
mkinitcpio -p linuxgrub-mkconfig -o /boot/grub/grub.cfgThen it worked for me ![]()
Last edited by re-mind (2017-05-07 21:04:59)
Mein.conf
Offline
That's a different problem and actually covered by https://wiki.archlinux.org/index.php/Po … ibernation :-P
Offline
That's a different problem and actually covered by https://wiki.archlinux.org/index.php/Po … ibernation :-P
I had already read that page (and the page that it refers to about kernel parameters) but it did not tell me where to put in the kernel parameters (noob) so I had to go through a whole lot of digging and ended up with a combination of the three. Moreover the page about the udev here does not explain that I need to do the other steps ![]()
Mein.conf
Offline