upowerd spamming syslog - value "120.000000" out of range for percentage

Arnaud Quette aquette.dev at gmail.com
Fri Feb 17 02:06:38 PST 2012


2012/2/17 johnm <s2 at forceway.com>:
> On 02/16/2012 01:16 PM, Richard Hughes wrote:
>> On 12 February 2012 22:01, johnm <s2 at forceway.com> wrote:
>>> shows. It seems upowerd doesn't like this value though. As you can see
>>> below, upower -d reports 0%. Any fix for this?
>>
>> What's upower meant to do if the hardware reports 120%? Clip it to 100%?

this is a known bug in some CPS units.
we, in NUT, have a workaround for this, clamping any value higher than 100 %:
http://anonscm.debian.org/viewvc/nut/trunk/drivers/cps-hid.c?view=markup

see cps_battcharge_fun() function.

cheers,
Arnaud
-- 
Linux / Unix Expert R&D - Eaton - http://powerquality.eaton.com
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.free.fr/


More information about the devkit-devel mailing list