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 Life- hardware abstraction layer-GPU VS optomizing app for GPU-openGL biketool 1 284 09-20-2024, 04:04 AM
Last Post: Kevin Kofler
  power circuit can't charge battery and can't supply enough power for modem or wifi vortex 2 1,180 02-17-2024, 04:15 PM
Last Post: vortex
  Battery life improvement freelectro 10 5,008 06-01-2023, 08:27 PM
Last Post: KC9UDX
Thumbs Down Battery Issue or Power Management IC? bcoyle 2 2,118 03-20-2023, 12:54 AM
Last Post: bcoyle
  Charging Indicator On - Not Charging SJSEng 0 1,003 08-30-2022, 07:33 AM
Last Post: SJSEng
  Power supply vs battery albafrati 11 6,131 06-22-2022, 06:04 PM
Last Post: albafrati
  PPKB with phone; phone dies while charging SwordfishII 1 1,746 06-08-2022, 04:14 AM
Last Post: SwordfishII
  What PD charger/dock combo results in PP battery not draining while using convergence james8880 0 1,899 04-28-2022, 12:45 PM
Last Post: james8880
  Screen has pixel-thin horizontal stripes that are black or get stuck in the past yasmi 5 4,959 03-08-2022, 12:25 PM
Last Post: jopple
  Battery replacement alternative sax1960 7 7,469 08-29-2021, 07:03 AM
Last Post: bcnaz

Forum Jump:


Users browsing this thread: 6 Guest(s)