Battery life is a showstopper for me

I see what you’re getting at, but that’s implying it’s OK for a company to accept people’s money under false pretenses because there’s a higher goal at stake. I find that a very dangerous line of reasoning.

[EDIT] That said though, I don’t think this is what they had envisioned either. Maybe this is just me projecting my expectations when I backed, but I think the idea was to ship a phone that would have all the basic functionality working pretty decently, but with a rather limited selection of phone-friendly applications.

Ooh, that’s great news! I’d be interested in more info on that. Which distro do I need to run to get those runtimes out of mine? Because last I checked, it was still around 8h idle, screen off, Wifi on (but turns itself off after a while, after which you have to manually disable and re-enable it for it to come back on), and no SIM inserted. Haven’t seen any system (e.g. kernel) updates on that UBPorts it came preinstalled with for quite a while now.

[EDIT] Apparently, I want to be on Manjaro + Posh then, correct?

Idea for someone: Break out a Arduino, add a power transistor as a switch, male and female USB connectors, and write some simple timer control software to get the phone ready for you when you wake up. You’d have an aftermarket product and I would buy one.

USB power --> switch controlled by Arduino timer software --> PHONE

Sure, here’s the datasheet of the charger: https://www.ti.com/lit/ds/symlink/bq25895.pdf

The most useful section is 8.4 Register Maps. You can talk to the chip with i2cset/i2cget. Be careful though, this is a low level tool so it will happily let you shoot yourself in a foot!

You can check the current value of a register with:

sudo i2cget -f -y 3 0x6a <REG>

and set a new value with:

sudo i2cset -f -y 3 0x6a <REG> <VALUE>

If you want to disable charging and let the phone operate out of USB power, you’re interested in register 0x03 (page 35) and its CHG_CONFIG bit.

purism@librem5:~$ sudo i2cget -f -y 3 0x6a 0x03 
0x1e
purism@librem5:~$ sudo i2cset -f -y 3 0x6a 0x03 0x0e 
purism@librem5:~$

This disables charging, but will discharge the battery in case USB doesn’t provide enough power. You can check USB input current limit with:

purism@librem5:~$ cat /sys/class/power_supply/bq25890-charger/input_current_limit 
900000

This shows that the current limit is set to 900mA. You can set it in register 0x00 (IINLIM, page 32). For instance, this sets the input current limit to 2.5A:

purism@librem5:~$ sudo i2cset -f -y 3 0x6a 0x00 0x30
purism@librem5:~$ cat /sys/class/power_supply/bq25890-charger/input_current_limit
2500000
purism@librem5:~$ 

Make sure that your charger is able to provide the current you set there!

You can also completely cut the battery from the power path, so it doesn’t charge or discharge at all and the phone operates solely on USB power (in which case it turns off if it tries to use more power than provided via USB) - see the BATFET_DIS bit in register 0x09 (page 41).

No worries, not that long ago I also didn’t know how to do it :wink:

11 Likes

thanks ! I will try to exploit what you tell me.
Thank you again.
regards

People commenting on the PINE64 forum say that they are able to get 2 days of battery life with recent Arch/Phosh, but I couldn’t find commits in the Crust code that are doing this, so maybe it isn’t Crust, but something else which is allowing this. At any rate sleep and wakeup are now more reliable.

FWIW, I can ssh into my phone (LineageOS) while it’s “sleeping”. It usually takes a while before it answers the request, but it shows conclusively that it’s not just “suspend-to-ram”. I don’t actually know if it’s “suspend-to-ram with regular wake-ups” or if it’s running at a super-low clock rate with the wifi put into a form of “sleep and check for packets every few minutes” or what.