![]() |
APMD-List: |
to APMD Home
|
Index:
[thread]
[date]
[subject]
[author]
From: David Brownell <david-b@pacbell.net> To : <craigm@milkyway.gsfc.nasa.gov> Date: Fri, 25 Jun 1999 16:37:02 -0700 Re: apmd-3.0beta5-8Craig Markwardt wrote: > > Avery Pennarun writes: > > The apmd warning level is completely separate from the BIOS-generated > > message. Perhaps we should disregard the BIOS message entirely. > > > > Craig, is there any reason why we aren't passing "synthetic battery low" > > messages on to the apmd_proxy? > > Heh heh. In the patch I submitted, apmd_proxy was called for all > kinds of low battery messages. David Brownell suggested that he was > getting too many notifications It wasn't a suggestion ! ... not when over 50% of my /var/log/messages were coming from "apmd", and it would have been more if syslog wasn't smart about saying "last message repeated 5 times"! I had the updates for this going before Beta7 came out, so I don't think your stuff caused those problems. :-) > and rearranged that bit of code. I don't have versions (or even any diffs) between Beta4 and Beta8 any more, but wasn't that the spot where I merged two very similar "switch" blocks? Only the first one did the proxy calls ... while only the second one ever saw a synthetic notification? That is, unless memory fails, I didn't change that behavior at all; synthetic low battery events _never_ caused outcalls before. (Beta4 had the low_battery script, and didn't cause an outcall there.) (I did however fix the logging so it no longer misreports synthetic notifications as coming from the APM BIOS. Different chunk of code; and the misreported notifications were in Beta4.) > I agree with you, we should treat the two similarly; apmd_proxy should > be called. Here's a patch snippet. I thought about changing that (inevitable when you notice the location of the line your patch moved!) but didn't. Basically, only the BIOS notification has value (IMHO) -- a "synthetic low battery" alert that comes when there's over 2.5 hours of battery left (Nino's case; I usually see it with less, always at least 1.5 hours) is crying wolf needlessly. Getting proxy calls based on how much battery _time_ remains (not based on percentages) might be more generally useful though. (I noticed a bug in the patch below, by the way: it shouldn't pass "event", but the constant APM_LOW_BATTERY. Otherwise when a low battery event gets "synthesized" it'll be reported as some other event, which perhaps shouldn't have caused a proxy call.) - Dave > diff -ur apmd-3.0beta8/apmd.c apmd-3.0beta8cm1/apmd.c > --- apmd-3.0beta8/apmd.c Tue Jun 15 20:59:19 1999 > +++ apmd-3.0beta8cm1/apmd.c Fri Jun 25 12:02:35 1999 > @@ -631,8 +631,8 @@ > } > break; > case APM_LOW_BATTERY: > - apmd_call_proxy(event, apmi); > synthetic_low_battery: > + apmd_call_proxy(event, apmi); > last_battery_status = 1; > apmd_low_battery(event, apmi); > break; > > Will you be putting out a new version soon? I know I've submitted a > few patches to you for this and other install bugs. apmd_proxy should > be updated to better reflect our understanding of what needs to be > done. David Brownell also suggested we add more documentation for > BIOS workarounds and how to use apmd_proxy (cardctl suspend, > soundoff/on, chvt). > > Craig Index: [thread] [date] [subject] [author] |