Increasing max voltage to use a bigger battery - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120) +--- Forum: PinePhone Software (https://forum.pine64.org/forumdisplay.php?fid=121) +---- Forum: Mobian on PinePhone (https://forum.pine64.org/forumdisplay.php?fid=139) +---- Thread: Increasing max voltage to use a bigger battery (/showthread.php?tid=14033) |
Increasing max voltage to use a bigger battery - SocialNetworkingWasAMistake - 05-30-2021 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 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 RE: Increasing max voltage to use a bigger battery - Merc - 05-30-2021 You have to enter it like this: Code: echo 4350000 | sudo tee /sys/class/power_supply/axp20x-battery/voltage_max_design RE: Increasing max voltage to use a bigger battery - SocialNetworkingWasAMistake - 05-30-2021 (05-30-2021, 01:34 PM)Merc Wrote: You have to enter it like this: Same issue Code: tee: /sys/class/power_supply/axp20x-battery/voltage_max_design: Invalid argument RE: Increasing max voltage to use a bigger battery - cnww - 06-08-2021 (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: 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 RE: Increasing max voltage to use a bigger battery - wibble - 06-09-2021 The privs granted by sudo stop at the redirect, so you can't redirect into files your user doesn't have write access to. Piping into sudo tee is a common workaround for this limitation, and often used with things in sysfs. |