# Suspend/Hibernate on low battery

## drinstant

Hi everybody!

I'm desperately trying to figure out how to make my t410s suspend to ram or maybe to disk when battery is low. And yes, I've read the powermanagement guide. I've got ACPI and thus hibernate working perfectly and I've got an additional runlevel "battery". The solution should be as elegant as possible, so bonus points for not having to write a custom script. Who should send the notification? Hal?

Thanks for any help and/or links

----------

## drinstant

Replying to myself: cpufreqd works just fine for this and similar stuff.

The relevant part of my /etc/cpufreqd.conf looks like this:

[Rule]

name=battery_low

ac=off

battery_interval=3-25

exec_post=echo 1 > /proc/acpi/video/VID/LCD0/brightness

profile=powersave

[/Rule]

[Rule]

name=battery_critical

ac=off

battery_interval=0-3

profile=powersave

exec_post=hibernate

[/Rule]

Hope that helps somebody with  the same issue.

----------

## mikegpitt

Doing this in cpufreqd is an interesting idea.  I've always been too lazy to implement suspend on low battery, which in my case has caused my batteries to not charge fully after accidentally letting them go into deep discharge a couple of times.

In my experience letting power drain below 20% starts to be dangerous, since it might all of a sudden drop to 5%...  when this happens you might loose 10% of full power on your next charge.  Then again, maybe all my laptops have had awful batteries.

----------

## Bircoph

acpid is supposed to handle all power events, including low battery condition. Just add an appropriate script for low battery event on your laptop.

----------

## tomk

Moved from Documentation, Tips & Tricks to Kernel & Hardware, support requests don't belong in DT&T.

----------

## Rexilion

laptop-mode-tools also has this feature combined with many others to save battery power.

----------

## xiaweitang

 *Bircoph wrote:*   

> acpid is supposed to handle all power events, including low battery condition. Just add an appropriate script for low battery event on your laptop.

 

I'm also interested in this. What's the event name for low battery condition?

----------

