ACPI/PMU procfs HAL test program. Version 002.
Paul Ionescu
i_p_a_u_l at yahoo.com
Mon Jan 24 02:30:54 PST 2005
Hi,
On Mon, 24 Jan 2005 11:05:03 +0100, Danny Kukawka wrote:
> I think this isn't a really good idea to poll
> /proc/acpi/battery/BAT0/state. Polling /proc/acpi/battery/BAT0/state
> produce significantly systemload, because the kernel must poll the battery
> and this can need much time. Above all, if it happens regularly (every
> second or more frequently) or if the laptop is on battery.
>
> I think it's maybe better to use a deamon to send the informations about
> the battery states to HAL. I planed to do this for the powersave daemon
> [1] and kpowersave [2] in the next time. (powersave poll the battery only
> each minute, the values do not change also faster.) It's better to send
> the needed values from powersave to HAL (So we need only send messages if
> something changed.) or to poll the info from powersave.
>
> Powersave could send this battery related informations to HAL:
>
> acadapter.online
> acadapter.offline
>
> battery.normal
> battery.warning
> battery.low
> battery.critical
>
> battery.charge_level.unit
> battery.charge_level.current
> battery.charge_level.maximum.real
>
> (estimated values if 'present rate' unknown: )
>
> battery.charge.remainig.time
> battery.charge.remainig.percent
> battery.discharge.remainig.time
> battery.discharge.remainig.percent
>
> What do you think? Comments please.
I think we can at least use this to pool at hald startup to populate the
database, and for further updates we maybe think more about them.
But IMHO powersave should listen for info from hald and not viceversa.
_______________________________________________
hal mailing list
hal at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/hal
More information about the Hal
mailing list