Bug 1733424 - Does not handle /sys battery status provided by pinebook
Summary: Does not handle /sys battery status provided by pinebook
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: lxpanel
Version: 32
Hardware: aarch64
OS: Unspecified
Target Milestone: ---
Assignee: Christoph Wickert
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2019-07-26 04:33 UTC by Stuart D Gathman
Modified: 2020-04-30 22:20 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed:
Type: Bug

Attachments (Terms of Use)
patch to make battery monitor work on pinebook (1.17 KB, text/plain)
2019-07-26 04:33 UTC, Stuart D Gathman
no flags Details

Description Stuart D Gathman 2019-07-26 04:33:22 UTC
Created attachment 1593555 [details]
patch to make battery monitor work on pinebook

Description of problem:
Battery percentage and time remaining are computed as 0 on pinebook

Version-Release number of selected component (if applicable):

How reproducible:
Always on pinebook

Steps to Reproduce:
1. Add Battery Monitor plugin to lxpanel

Actual results:
Battery percentage and time remaining are computed as 0 on pinebook

Expected results:
Show correct percentage and estimated time remaining

Additional info:
Patch attached has been tested on pinebook.  It only kicks in when percentage cannot be computed and falls back to 0 - so it *shouldn't* break any working cases.  

An obvious improvement is to make the charge_full configurable, as later models may have a different battery, and the full charge reduces with age.  While tracking history so as to auto-adjust an estimated full charge may be too heavy weight for LXDE, it isn't too hard to occasionally make a manual estimate - if only someone adds the config field.

This only affect users of this ARM device, but when it affects you it is somewhat serious.  The work around without this patch is to 

$ cat /sys/class/power_supply/axp20x-battery/capacity

in a terminal to track battery level.

Comment 1 Stuart D Gathman 2019-07-30 17:59:28 UTC
With I as the reported current in mA, P as reported percentage of total energy, t as elapsed time, stepwise integration of I dt / dP comes out to 10000 mAh within 2 significant digits.  The remaining time calculation is thus as accurate as the percentage it is based on.

Comment 2 Mamoru TASAKA 2019-08-11 14:48:30 UTC
Would you try posting your patches on the upstream? Thank you in advance.

Comment 3 Stuart D Gathman 2019-08-12 23:39:34 UTC
I added a pull request to the github mirror.  I am not sure that they monitor that.  Do you know a better place?

Comment 4 Ben Cotton 2020-04-30 21:22:08 UTC
This message is a reminder that Fedora 30 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 30 on 2020-05-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '30'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 30 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 5 Stuart D Gathman 2020-04-30 22:20:54 UTC
Patches still work on F32.

Note You need to log in before you can comment on or make changes to this bug.