Dear lazyweb,
Having used a powerbook as my primary machine for about four years, I'm not very up-to-date on Intel-specific hardware, such as ACPI, these days.
When at conferences or similar, I often see people who've configured their laptops so that acpid would start an alarm when the battery's almost flat. Now that I have an HP laptop again, which does ACPI, I'd like to do the same; but I can't seem to figure out how this is configured.
That is to say, when my laptop's battery is flat, it just switches off. No alarm. Needless to say, this is is rather annoying, and searching through the 56 files in /etc/acpi hasn't resulted in success so far.
Any hints would be greatly appreciated.
I have had nothing but trouble with this myself.
Using Gnome Power Manager proved problematic (alternate between suspend and hibernate, when unplugging it would suspend if the battery was fully charged). After I switched to xfce, and their newish power-manager plugin, I got that to work no worries, basically because it just runs scripts at configurable power levels.
If you look in the acpi scripts some of them won't run if they find gnome-power-manager or the KDE equiv.
This whole area is a bit messy, as I believe someone said on the debian planet not so long ago.
I don't suppose using GNOME Power Manager would be a solution for you?
I don't think there's an ACPI event for "battery low". I know that the BIOS in Thinkpads can emit a beep when the battery is low, but I don't know how you can configure the battery level. (Thinkpads in general are pretty nice: the yellow blinking battery LED is sufficient to attract my attention without any audible alarms.)
I suppose there's always an option of setting up a shell script to run acpi (the command-line tool), parse its output, display a warning if the battery is low, and then sleep for five minutes.
If you're using a desktop environment, there should be a way to set actions and alarms triggered from acpi events and battery levels. KDE4's PowerDevil (for example) does this, and I'm sure Gnome has power management features as well.
There are also other utilities, such as conky scripts and Gkrellm plugns that watch your battery level. If you need to roll your own, the raw data should be in /proc/acpi/battery.