I am not sure how inaccurate it is though. Battery estimates are what,
+/- 100%? (minus really!)
But nonetheless it appears like a bug.
On Sun, Jun 13, 2010 at 02:52:12PM +0000, Jona Joachim wrote:
quoted text > Let's compare the outputs of apm and sysctl:
>
> spaceman% apm && sysctl hw.sensors.acpibat0
> Battery state: high, 89% remaining, 74 minutes life estimate
> A/C adapter state: not connected
> Performance adjustment mode: cool running (1000 MHz)
> hw.sensors.acpibat0.volt0=10.80 VDC (voltage)
> hw.sensors.acpibat0.volt1=11.99 VDC (current voltage)
> hw.sensors.acpibat0.watthour0=19.53 Wh (last full capacity)
> hw.sensors.acpibat0.watthour1=0.98 Wh (warning capacity)
> hw.sensors.acpibat0.watthour2=0.20 Wh (low capacity)
> hw.sensors.acpibat0.watthour3=17.56 Wh (remaining capacity), OK
> hw.sensors.acpibat0.raw0=1 (battery discharging), OK
> hw.sensors.acpibat0.raw1=23460 (rate)
>
> The unit of the discharge rate (hw.sensors.acpibat0.raw1) is not
> mentioned so I guess it's mW.
> If we calculate 17.56 Wh * 1000 / 23460 mW we get 0.74 hours. However
> apm reports 74 minutes remaining. I tried this several times and it
> always looks like apm assumes 1 h = 100 min.
> I was browsing a bit through the apmd source code but I couldn't find
> the exact place where apmd queries the battery.
>
> Can anybody comment on this?
>
>
> Best regards,
> Jona
>
> --
> Worse is better
> Richard P. Gabriel