On Fri, Jan 24 2020, "Ted Unangst" <[email protected]> wrote:
> Sometimes (particuarly if you are using apmd -z) the default polling interval
> of 10 minutes is a bit lazy and we fail to respond to low battery situations
> before they become no battery situations.
>
> Perhaps something smarter could be done, but the simplest change is to reduce
> the default polling interval to one minute. This is still rather slow, so as
> to not introduce unnecessary load on the system, but should make it more
> responsive to changing conditions.

Hah, I'm poking at this since yesterday.

Your change is only useful if you have a battery driver that doesn't
notify you often enough.  acpibat(4) uses ACPIDEV_POLL and sends apmd
a message every 10 seconds.  That's way more than enough for apmd to
act.

If you use acpisbs(4) or another battery driver that doesn't send any
event to userland, you might find the apmd poll timeout a tad long.  But
I'm not sure this is the way to solve it.

apmd -z/-Z is mostly broken if you don't use -t and a very short poll
timeout, but this can easily be improved.  Diffs are coming.

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to