Battery mot charging past 54%
#11
It's hardcoded in kernel so the answer is no... Unless you rebuild it
  Reply
#12
(05-16-2021, 10:25 PM)nightranger73 Wrote: It's hardcoded in kernel so the answer is no... Unless you rebuild it
Ok, thanks !
  Reply
#13
Actually, the battery charging limit (i.e. the charging target) is rather easily configurable, if the PinePhone runs Ondrej's patched kernel.  Using the command below will allow the battery to be charged to 100% of its capacity, which I've already tested and verified on my PinePhone:

Code:
echo 4350000 > /sys/class/power_supply/axp20x-battery/voltage_max_design   # microVolts (uV)

Here's a more detailed explanation, based on the source code of the AXP803 driver in the Linux kernel, Ondrej's kernel patches, and the relevant sections of the AXP803 datasheet (the PMIC that charges the battery):
  • Mainline Linux kernel disallows the battery charging voltage limit to be set over 4.2 V, but the lithium-ion polymer battery that ships with the PinePhone can be charged to about 4.37 V, according to page 4 of the battery datasheet.
  • Ondrej has written a patch for the AXP803 driver that allows 4.35 (or 4.36 V, doesn't matter) to be set as the AXP803's battery charging voltage target.
  • The default value of the bits 6-5 in the AXP803's register 33h is 10b, as visible on page 62 of the AXP803 datasheet, which means that the default battery charging voltage target is 4.2 V.  Expectedly, 4200000 (in uV) is the default value for the above-specified /sys parameter, which effectively prevents the battery from charging over 4.2 V, or over about 87-90% of its capacity.
  • It can be safely concluded that the AXP803, in the default state of its battery calibration, expects the battery voltage to reach about 4.33 V in order to report the battery as charged to 100% of its capacity, which is visible in the table on page 44 of the AXP803 datasheet.
  • Adjusting the battery charging voltage target to 4.35 V, using the command above, caused the AXP803 to charge the battery to its full capacity, or to about 4.32 V as measured by the AXP803 in my PinePhone, and to report the battery as charged to 100% of its capacity.  This also confirms the assumption about the default battery calibration that was made in the previous point in the list.

However, I wouldn't recommend charging the battery to 100% of its capacity, or to about 4.35 V, because it would surely reduce the battery lifetime, and may also cause the battery to overheat while charging under certain circumstances.  See also a couple of very good comments made by Ondrej here and here.

The right approach would be to instruct the AXP803 to perform the battery calibration, as described on pages 43 and 44 of the AXP803 datasheet, and to alter the resulting OCV percentage table so a battery charged to about 4.2 V (which equals to about 87-90% of the battery capacity) is reported by the AXP803 as being charged to 100%.  Of course, the final table needs to be stored in the phone and loaded into the AXP803 upon each boot.  All that would bring the best of both worlds: longer battery lifetime, no risk of overheating, and no confusion among the end users. Cool

I'll probably get to performing the above-described battery calibration at some point in time.  By the way, charging the battery to 100% may be safe in combination with a userspace daemon that monitors the phone thermals and keeps them within the safe temperature ranges, which I'm already working on.  With some additional "trickery", the userspace daemon should also be able stop the battery charging at 95%, for example, which might strike the right balance.
  Reply
#14
Made Sticky
  Reply
#15
(05-15-2021, 05:16 PM)StickyPine Wrote: Hello,

I juste got the PinePhone but the battery does not seem to be charging past 54%.

I saw on the wiki that some OS' limit the maximum charging percentage in order to improve the longevity of the battery. Because I'm having this issue on different OS' it got me thinking that it is a hardware problem, but it might not be.

Is it a known issue ? What can I do about it ?

Many thanks !
 I had the same issue, both with the Mobian and Beta versions, but I solved it by placing the charger directly to an outlat and let it charge for 10+ hours or until it showed 90+% charge. I also interchanged the batteries between both pinephone versions and charged as above. No more batteries issues.
  Reply
#16
The battery calibrates by going to full charge and then letting it discharge until it shuts down.
I had to do this on my N900 once I started using the FOSS charge control driver.
It is better than having it never get above 80% after a few years of use.
  Reply
#17
(06-29-2021, 09:42 AM)Xzska-collab Wrote: I had the same issue, both with the Mobian and Beta versions, but I solved it by placing the charger directly to an outlat and let it charge for 10+ hours or until it showed 90+% charge. I also interchanged the batteries between both pinephone versions and charged as above. No more batteries issues.

Quite frankly, this is rather confusing.  None of the actions you've described would lead to achieving a battery charge level higher than the default.  Please, read my post above for a detailed background explanation.

(06-30-2021, 05:59 AM)biketool Wrote: The battery calibrates by going to full charge and then letting it discharge until it shuts down. I had to do this on my N900 once I started using the FOSS charge control driver.

What I referred to in my post above was the battery calibration procedure mentioned in the AXP803 datasheet.  Of course, the procedure must involve charging the battery fully and letting it discharge completely, but the datasheet also briefly describes the use of a few AXP803 registers; see pages 43, 44, 79 and 83–85 of the datasheet for more details.
  Reply
#18
(05-17-2021, 09:34 AM)dsimic Wrote: Actually, the battery charging limit (i.e. the charging target) is rather easily configurable, if the PinePhone runs Ondrej's patched kernel.  Using the command below will allow the battery to be charged to 100% of its capacity, which I've already tested and verified on my PinePhone:

Code:
echo 4350000 > /sys/class/power_supply/axp20x-battery/voltage_max_design   # microVolts (uV)

Here's a more detailed explanation, based on the source code of the AXP803 driver in the Linux kernel, Ondrej's kernel patches, and the relevant sections of the AXP803 datasheet (the PMIC that charges the battery):
  • Mainline Linux kernel disallows the battery charging voltage limit to be set over 4.2 V, but the lithium-ion polymer battery that ships with the PinePhone can be charged to about 4.37 V, according to page 4 of the battery datasheet.
  • Ondrej has written a patch for the AXP803 driver that allows 4.35 (or 4.36 V, doesn't matter) to be set as the AXP803's battery charging voltage target.
  • The default value of the bits 6-5 in the AXP803's register 33h is 10b, as visible on page 62 of the AXP803 datasheet, which means that the default battery charging voltage target is 4.2 V.  Expectedly, 4200000 (in uV) is the default value for the above-specified /sys parameter, which effectively prevents the battery from charging over 4.2 V, or over about 87-90% of its capacity.
  • It can be safely concluded that the AXP803, in the default state of its battery calibration, expects the battery voltage to reach about 4.33 V in order to report the battery as charged to 100% of its capacity, which is visible in the table on page 44 of the AXP803 datasheet.
  • Adjusting the battery charging voltage target to 4.35 V, using the command above, caused the AXP803 to charge the battery to its full capacity, or to about 4.32 V as measured by the AXP803 in my PinePhone, and to report the battery as charged to 100% of its capacity.  This also confirms the assumption about the default battery calibration that was made in the previous point in the list.

However, I wouldn't recommend charging the battery to 100% of its capacity, or to about 4.35 V, because it would surely reduce the battery lifetime, and may also cause the battery to overheat while charging under certain circumstances.  See also a couple of very good comments made by Ondrej here and here.

The right approach would be to instruct the AXP803 to perform the battery calibration, as described on pages 43 and 44 of the AXP803 datasheet, and to alter the resulting OCV percentage table so a battery charged to about 4.2 V (which equals to about 87-90% of the battery capacity) is reported by the AXP803 as being charged to 100%.  Of course, the final table needs to be stored in the phone and loaded into the AXP803 upon each boot.  All that would bring the best of both worlds: longer battery lifetime, no risk of overheating, and no confusion among the end users. Cool

I'll probably get to performing the above-described battery calibration at some point in time.  By the way, charging the battery to 100% may be safe in combination with a userspace daemon that monitors the phone thermals and keeps them within the safe temperature ranges, which I'm already working on.  With some additional "trickery", the userspace daemon should also be able stop the battery charging at 95%, for example, which might strike the right balance.
Thank you for the info...how do I find out if the Mbian or KDE Pinephones use the Ondrej's patched kernel?
  Reply
#19
I have a 'Post Market Edition' Pine phone, running a 'recent Mobian nightly release'.
It charges to 100%, then it discharges to 93 - 95%... then charges again to 100% ... repeat...
I think the developers are still fine tuning the charging software.

Just curious, have you tried different chargers ?
I do see slight differences when I use different chargers.

Note : I have several Pine phones, one has Arch installed and it charges about the same as the ones with Mobian installed.
      LINUX = CHOICES
         **BCnAZ**
               Idea
   Donate to $upport
your favorite OS Team
  Reply
#20
in my case it was charging cable issue, and after replacement, it is OK. however the overheating issue is still continuing.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Battery replacement alternative sax1960 8 1,091 08-29-2021, 07:03 AM
Last Post: bcnaz
  Battery Capacity and Software Interaction food 2 310 08-15-2021, 07:19 AM
Last Post: bcnaz
  Battery phone case expected? Cpm 1 232 08-10-2021, 03:29 PM
Last Post: 33YN2
  Pine Phone Battery Issue vslash 23 4,127 08-09-2021, 07:35 AM
Last Post: mouffa
  Convergence: battery is constantly discharging/charging arjan1995 5 953 06-04-2021, 02:38 AM
Last Post: dsimic
  battery problem Rainer 4 831 04-30-2021, 08:06 PM
Last Post: Rainer
  Pinephone charging issues after fully depleting battery. plainenough 13 6,037 04-07-2021, 09:44 AM
Last Post: wibble
  Not charging, not detected when booting jumpdrive acohl 1 594 03-05-2021, 10:38 PM
Last Post: desca
  Updated board, still have USB C charging problem xonq 7 1,476 01-31-2021, 10:47 AM
Last Post: xonq
  Battery won't charge. Liveandkicking 18 5,537 01-27-2021, 11:02 AM
Last Post: Twig

Forum Jump:


Users browsing this thread: 1 Guest(s)