[Gta04-owner] various powermanagement issues

xdrudis at tinet.cat xdrudis at tinet.cat
Sun Oct 18 13:04:50 CEST 2015

On Sun, Oct 18, 2015 at 08:20:13AM +0200, H. Nikolaus Schaller wrote:
> Yes, that is indeed a known problem for a long time. It could be solved by
> modifying the MLO so that it turns on 500mA charging within the first 1-2 seconds.
> Currently, Linux must boot up to a point to enable 500 mA charging. This takes
> 30-60 seconds.
> Now a discharged battery is charged by ~50mA (trickle charge) until the device
> turns on as soon as the battery voltage reaches 3.3V. At that point it may be
> charged for just 1%.
> If this is not enough for booting to Linux (30-60 seconds @ 400 mA) full
> charging will fail.

I haven't refreshed my memory, but I assume the reason is linux has a
complete enough USB stack to negotiate 500mA but MLO has a very more
basic USB stack (or none).
Could MLO implement some simple means to detect the battery is
unlikely to last until linux can negotiate 500mA and in that case
simply let the phone charge at 50 mA with as low as possible
consumption, and wait until there's enough charge to boot ?. My
impression is that the multiple failed attempts to boot drain the
battery too much, so simply refusing to boot would be faster (slower
than getting 500mA early, but faster than retrying booting too much
while charging only at 50mA).

If this is undetectable, could MLO simply have some manual option to
let the phone charge without spending energy (a manual option not to
boot, just wait idle while charging) ?

Sorry if this is too basic or obvious, I haven't really thought about it.

For instance, 400mA during 60 seconds would require 7mAh.  If MLO
starts with less than 7mAh in the battery it could try to turn
everything off and just let the battery charge at 50 mA.  It would
take aprox 9 minutes or less to get 7mAh and then it could boot
normally hoping linux has a chance to activate 500mA charging.  In my
experience when it fails to boot with a flat battery it takes much
more than 9 minutes to boot because each attempt drains the battery.
So this would improve the situation without a USB negotiation. But I
don't know how easy it is to let the phone charge with everything
turned off. It may be more difficult than implementing USB negotiation

More information about the Gta04-owner mailing list