Patch submission for incorrect battery %

mark ellis m at rkellis.com
Sun Feb 10 16:38:14 PST 2013


Sorry that patch was a total hack, I'd just copied and pasted a bit from
above to below, not very nice, also wouldn't have worked for people who
don't have charge_full and charge_full_design.

I've made a new patch that works just the same, but instead of copy and
pasting i've just moved the block that works out energy-full and
energy-full-design out of the coldplug if.

Mark


On Sun, Feb 10, 2013 at 7:58 PM, mark ellis <m at rkellis.com> wrote:

>
> Hello,
>
> First off I'm sorry if this is not clear, but it's a little hard to
> explain!
>
> I have a very dodgy batter in my laptop that sometimes likes to lie about
> how much energy it's currently containing, or what it's charge_full and
> charge_full_design are. It only does this briefly, for a split second or
> so, but it's enough to mess up upower, which will start reporting 3% charge
> remaining, 5 hours left on a full battery (energy-full ends up really high
> for no reason, e.g. instead of 48Wh, it'll be 780Wh). The way to correct
> this is for me to kill upowerd and restart it, which is a pain.
>
> So I've patched the upowerd source to reread charge_full and
> charge_full_design each time the battery status is refreshed. I'm not sure
> what the implications of this are, but I imagine it's not that big of a
> deal, and it fixes my issue!
>
> Anyway I thought I'd do the honourable thing and send the patch on to
> yourselves, just because. I hope it's useful, if not it fixes my little
> problem!
>
> Thanks,
> Mark
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/devkit-devel/attachments/20130211/d60b5210/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: upower.better.patch
Type: application/octet-stream
Size: 3417 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/devkit-devel/attachments/20130211/d60b5210/attachment.obj>


More information about the devkit-devel mailing list