Re: apmd: fix autoaction timeout

2020-02-17 Thread Jeremie Courreges-Anglas
On Sat, Feb 15 2020, Jeremie Courreges-Anglas wrote: > On Fri, Feb 14 2020, Scott Cheloha wrote: >> On Thu, Feb 13, 2020 at 02:08:32PM +0100, Jeremie Courreges-Anglas wrote: >>> On Wed, Feb 12 2020, Scott Cheloha wrote: >>> > On Wed, Feb 12, 2020 at 01:35:22PM +0100, Jeremie Courreges-Anglas

Re: apmd: fix autoaction timeout

2020-02-14 Thread Jeremie Courreges-Anglas
On Fri, Feb 14 2020, Scott Cheloha wrote: > On Thu, Feb 13, 2020 at 02:08:32PM +0100, Jeremie Courreges-Anglas wrote: >> On Wed, Feb 12 2020, Scott Cheloha wrote: >> > On Wed, Feb 12, 2020 at 01:35:22PM +0100, Jeremie Courreges-Anglas wrote: >> >> On Wed, Feb 12 2020, Jeremie Courreges-Anglas

Re: apmd: fix autoaction timeout

2020-02-14 Thread Scott Cheloha
On Thu, Feb 13, 2020 at 02:08:32PM +0100, Jeremie Courreges-Anglas wrote: > On Wed, Feb 12 2020, Scott Cheloha wrote: > > On Wed, Feb 12, 2020 at 01:35:22PM +0100, Jeremie Courreges-Anglas wrote: > >> On Wed, Feb 12 2020, Jeremie Courreges-Anglas wrote: > >> > On Sat, Jan 25 2020, Jeremie

Re: apmd: fix autoaction timeout

2020-02-13 Thread Jeremie Courreges-Anglas
On Thu, Feb 13 2020, Jeremie Courreges-Anglas wrote: [...] > - documents the 60 seconds grace period in the manpage That part was not accurate. Updated wording: "After a resume, the effect of those options is inhibited for 60 seconds." Index: apmd.c

Re: apmd: fix autoaction timeout

2020-02-13 Thread Jeremie Courreges-Anglas
On Wed, Feb 12 2020, Scott Cheloha wrote: > On Wed, Feb 12, 2020 at 01:35:22PM +0100, Jeremie Courreges-Anglas wrote: >> On Wed, Feb 12 2020, Jeremie Courreges-Anglas wrote: >> > On Sat, Jan 25 2020, Jeremie Courreges-Anglas wrote: >> >> The diff below improves the way apmd -z/-Z may trigger.

Re: apmd: fix autoaction timeout

2020-02-12 Thread Scott Cheloha
On Wed, Feb 12, 2020 at 01:35:22PM +0100, Jeremie Courreges-Anglas wrote: > On Wed, Feb 12 2020, Jeremie Courreges-Anglas wrote: > > On Sat, Jan 25 2020, Jeremie Courreges-Anglas wrote: > >> The diff below improves the way apmd -z/-Z may trigger. > >> > >> I think the current behavior is bogus,

Re: apmd: fix autoaction timeout

2020-02-12 Thread Jeremie Courreges-Anglas
On Wed, Feb 12 2020, Jeremie Courreges-Anglas wrote: > On Sat, Jan 25 2020, Jeremie Courreges-Anglas wrote: >> The diff below improves the way apmd -z/-Z may trigger. >> >> I think the current behavior is bogus, incrementing and checking >> apmtimeout like this doesn't make much sense. >> >>

Re: apmd: fix autoaction timeout

2020-02-12 Thread Jeremie Courreges-Anglas
On Sat, Jan 25 2020, Jeremie Courreges-Anglas wrote: > The diff below improves the way apmd -z/-Z may trigger. > > I think the current behavior is bogus, incrementing and checking > apmtimeout like this doesn't make much sense. > > Here's a proposal: > - on APM_POWER_CHANGE events, check the

Re: apmd: fix autoaction timeout

2020-01-25 Thread Ted Unangst
Jeremie Courreges-Anglas wrote: > > The diff below improves the way apmd -z/-Z may trigger. > > I think the current behavior is bogus, incrementing and checking > apmtimeout like this doesn't make much sense. this all seems reasonable to me. > - I think we want some throttling mechanism, like

apmd: fix autoaction timeout

2020-01-25 Thread Jeremie Courreges-Anglas
The diff below improves the way apmd -z/-Z may trigger. I think the current behavior is bogus, incrementing and checking apmtimeout like this doesn't make much sense. Here's a proposal: - on APM_POWER_CHANGE events, check the battery level and trigger autoaction if needed. This should be