Subject: powerd: ACPI battery event support
To: tech-userlevel <tech-userlevel@netbsd.org>
From: Martin Moeller <marm.mm@t-online.de>
List: tech-userlevel
Date: 12/27/2006 02:52:46
Hello tech-userlevel-list,

currently, powerd doesn't support events for defined battery conditions.
Maybe it would be interesting for the most Notebook users to have a possibility to take an action when their battery has an defined state.
To make this possible the acpibat(4) module need to be changed to send an event
when user-defined (maybe through sysctl-tunables) levels of battery-capacity is reached.

A Example Scenario:

% sysctl -w hw.acpi.battery.0.triggers.low=7	# trigger low battery ev. at 7%
% sysctl -w hw.acpi.battery.0.triggers.high=90	# trigger high battery ev. @ 90%
% sysctl -w hw.acpi.battery.0.triggers.user=50	# user-defined trigger @ 50%
% powerd
	--> powerd gets PSWITCH_TYPE_BATTERY_LOW event
		--> powerd runs /etc/powerd/scripts/battery-low
			(inform the user)
% sysctl -w hw.acpi.battery.0.triggers.low_enabled=0  # disable low batt. events

What are you thinking about this (already discussed) feature ?


With Greetings,
Martin