Increasing max voltage to use a bigger battery
#4
(05-30-2021, 12:55 PM)SocialNetworkingWasAMistake Wrote: In https://wiki.pine64.org/wiki/PinePhone_FAQ#Battery it says I can use this to allow my phone to charge more:
Code:
echo 4350000 > /sys/class/power_supply/axp20x-battery/voltage_max_design
When I do that however I get a write error, what's going on?
I want to install this battery but it's not going to be able to use the full capacity if I can't set the max voltage, right?
https://www.ebay.co.uk/itm/333992044176

Your initial error is most likely because either you're not executing the command as root, or because the /sys node in question is read-only. I think battery voltage needs to be set very early on, AFAIR it's done in the pinephone version of u-boot. You may need to compile a custom boot loader to actually change that value.

I have no idea why people are suggesting that you use tee, and I wouldn't expect it to work like that. Without any other arguments, tee will (AFAIR) attempt delete the existing node and then create a regular file to output to. I would expect this to fail, as you generally aren't aren't allowed to delete nodes or create regular files in sysfs.

You might be able to get tee to work with tee in append mode, but a far simpler solution is just to execute your original command as root, e.g. with
Code:
sudo echo 4350000 > /sys/class/power_supply/axp20x-battery/voltage_max_design
If sudo works, but the write attempt fails, it probably implies that the node isn't writable at all.
  Reply


Messages In This Thread
RE: Increasing max voltage to use a bigger battery - by cnww - 06-08-2021, 10:41 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Battery problem with a Pinephone keyboard and Mobian elode 2 2,229 12-22-2022, 07:10 PM
Last Post: acid andy
  Possible solutions to the battery draining issue? 3x5co 5 2,457 11-28-2022, 10:58 AM
Last Post: 3x5co
  Will this battery-saving script cause problems? rp3 1 1,240 08-28-2022, 02:00 PM
Last Post: biketool
  Battery Management jsch 4 2,087 07-27-2022, 11:17 AM
Last Post: jsch
  Limiting battery charging to some percentage TRS-80 3 3,252 08-22-2021, 01:02 AM
Last Post: bcnaz
  Possible fix for lousy standby battery life? bitnick 5 5,220 02-04-2021, 04:05 PM
Last Post: dcinoz
Sad battery usage HLing 3 4,617 08-29-2020, 06:04 AM
Last Post: User 18618
  SMS after dead battery antiX-Dave 4 6,076 06-05-2020, 08:11 PM
Last Post: antiX-Dave

Forum Jump:


Users browsing this thread: 1 Guest(s)