Battery Management on PinePhonePro:
#1
I’ve been experimenting with ways to tweak this. I’ve managed to set up a system where the battery cuts off from charging when it hits a certain point but remains available for discharge down to a lower threshold if the phone needs it.

Here’s how the scripts work under various conditions:
  • Standard Charging: The phone charges to a predetermined upper limit (like 90%) and then stops to prevent battery strain.

  • Continuous Power Supply: If it remains plugged in post-charge, the phone priorities drawing power directly off the charger, sparing the battery , and only use the battery if the power supply is not producing enough juice.

  • Reconnection Nuances: Unplugging and replugging doesn’t immediately resume charging. It waits until the battery drops below a set lower threshold (say, 60%), which helps in maintaining battery health by avoiding short, unnecessary charge cycles.

  • Handling Power Fluctuations: For those times when the power source is unstable or you’re frequently plugging and unplugging, the script ensures that repetitive charging doesn’t kick in unless truly needed.

  • Customization: The thresholds for both the upper and lower limits can be adjusted to fit personal usage patterns and battery longevity goals.


Project Repositories:

    For PinePhonePro: https://github.com/alivellani/manage_pinephone_bat_temp
    Librem 5: https://github.com/alivellani/manage_librem_battery

On the PinePhonePro, managing this is pretty straightforward because the driver includes a ‘charge behavior’ driver that you can manipulate directly. For the PinePhonePro, you can find the charge behaviour control at this path:

/sys/class/power_supply/{battery_type}/charge_behaviour

The Librem 5, however, threw a curveball my way. It doesn’t support modifying charge behavior through the usual driver settings. The workaround I found on the wiki, using the charge LED as a control point. Here’s how I control it:

/sys/class/leds/chg_en/brightness

This lets me toggle the charging on and off

I have attached a Anker Zolo power bank to the back of the phone which keep providing power to the pinephonepro with a velcro tape. And I just charge the power bank.

Heads-up: This setup is still very much DIY. Make sure you really dig into the scripts before deploying them. If your phone turns into Charmander that is all on you!

Cheers!
  Reply
#2
The PinePhone and the PinePhone Pro have completely different battery control hardware. (The battery itself is the same, but that does not matter here. What does is the power management chip.)

The original PinePhone uses an X-Powers AXP803 chip for power management. The PinePhone Pro uses a Rockchip RK818 chip for power management. (I believe that the reason for the different choice is that the AXP803 is designed to work with Allwinner SoCs, the RK818 with Rockchip SoCs.) They are not compatible.

Your program supports only the RK818, and as such, labeling it with just "PinePhone" is misleading, as it will not work on an actual (original) PinePhone, only on a PinePhone Pro.
  Reply
#3
(03-01-2025, 06:57 PM)Kevin Kofler Wrote: The PinePhone and the PinePhone Pro have completely different battery control hardware. (The battery itself is the same, but that does not matter here. What does is the power management chip.)

The original PinePhone uses an X-Powers AXP803 chip for power management. The PinePhone Pro uses a Rockchip RK818 chip for power management. (I believe that the reason for the different choice is that the AXP803 is designed to work with Allwinner SoCs, the RK818 with Rockchip SoCs.) They are not compatible.

Your program supports only the RK818, and as such, labeling it with just "PinePhone" is misleading, as it will not work on an actual (original) PinePhone, only on a PinePhone Pro.

Its posted in pinephonepro software section you can maybe go up and look again

PINE64   ›   PinePhone Pro   ›   PinePhone Pro Software   ›   Battery Management on PinePhonePro
  Reply
#4
Well yes, but your link was prefixed with "For PinePhone:" before you edited it today, and the GitHub page you linked to does not contain the word "Pro" at all. Neither in the project name, nor in README.md, nor anywhere else in the repository, really.
  Reply
#5
(03-02-2025, 08:04 AM)Kevin Kofler Wrote: Well yes, but your link was prefixed with "For PinePhone:" before you edited it today, and the GitHub page you linked to does not contain the word "Pro" at all. Neither in the project name, nor in README.md, nor anywhere else in the repository, really.

it is what it is ¯\_(ツ)_/¯
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Battery life thread: discussion, support and tips apink 12 5,234 03-01-2025, 10:39 AM
Last Post: d50zesl0g@mozmail.com
  Reseting the Battery Fuel Gauge franzthiemann 8 875 01-24-2025, 08:19 AM
Last Post: teekay
  "failed to start simple desktop display manager" PinePhonePro / Plasma Beta15 RC4 OhMeadhbh 1 1,271 11-09-2023, 07:39 AM
Last Post: mburns
  [Mobian] : Battery consumption and OS compatibility freelectro 2 1,781 06-02-2023, 06:55 AM
Last Post: Fred Zyphal
  Phosh Updating - Battery Charge Indicator - Jittery Settings - Display Usability ArchiMark 4 2,551 05-28-2023, 07:00 AM
Last Post: ArchiMark
  Battery meter slowly reducing under keyboard charger robocone 1 1,885 12-26-2022, 09:37 AM
Last Post: robocone
Exclamation PPP Battery drain + hot CPU GPU Piotr 2 2,226 12-09-2022, 12:45 PM
Last Post: Piotr
  Keyboard Case Power Management Daemon estokes 11 8,734 04-19-2022, 07:41 AM
Last Post: PineFLOWn
  Battery status always "Charging" dabigjhall 2 2,484 03-16-2022, 03:14 PM
Last Post: maltee
  PSA: Do _not_ flash OG PinePhone OS images to the PinePhonePro Ulfnic 1 1,798 01-27-2022, 09:29 PM
Last Post: bcnaz

Forum Jump:


Users browsing this thread: 2 Guest(s)