Problem: battery drains when un-powered charger is connected

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem: battery drains when un-powered charger is connected

Helge Hafting
Yesterday, I charged the phone from my laptop. Before going to sleep, I
turned the laptop off.

The freerunner don't usually have problems with a "powerless night",
because suspend works so well.

But I forgot to unplug the freerunner, and the battery was empty in the
morning!

Seems it erroneously believes that "when there is a connector, there is
power?"

Could this be changed to invoking the suspend timer as usual when there
is no power coming in? Battery monitoring software can see that there is
not enough voltage for charging, at least.

Helge Hafting


_______________________________________________
Shr-devel mailing list
[hidden email]
http://lists.projects.openmoko.org/mailman/listinfo/shr-devel
Reply | Threaded
Open this post in threaded view
|

Re: Problem: battery drains when un-powered charger is connected

Tilman Baumann
If your laptop can not provide full power in suspend, it ought to tell
it's devices so.

It would be interesting to reproduce this. Maybe you can put your laptop
to sleep and then check the logs on your freerunner and check the power
status in the settings app.

Helge Hafting schrieb:

> Seems it erroneously believes that "when there is a connector, there is
> power?"
>
> Could this be changed to invoking the suspend timer as usual when there
> is no power coming in? Battery monitoring software can see that there is
> not enough voltage for charging, at least.

Oh, looks like frameworkd just does it wrong.
We should tell the FSO guys...


--
MFG
 Tilman Baumann


_______________________________________________
Shr-devel mailing list
[hidden email]
http://lists.projects.openmoko.org/mailman/listinfo/shr-devel
Reply | Threaded
Open this post in threaded view
|

Re: Problem: battery drains when un-powered charger is connected

Helge Hafting
Tilman Baumann wrote:
> If your laptop can not provide full power in suspend, it ought to tell
> it's devices so.
>
I did not suspend it - I shut it down completely. Linux simply can't
suspend this kind of dell laptop, because there is no open info on how
to wake the proprietary display up again. So I did a "shutdown -h now"
to save some power & wear overnight.

This has happened several times, leaving the phone connected to the dead
laptop always resulted in battery drain. There is always enough power to
boot the phone, but with zero "bars" of power. So I guess the phone
eventually does an emergency low-power shutdown.

I guess the phone checks now and then to see if power is critically low
when it isn't suspended/off. If so, it could also check if charging is
working as expected and synthesize a "unplug" event if it isn't.

> It would be interesting to reproduce this. Maybe you can put your laptop
> to sleep and then check the logs on your freerunner and check the power
> status in the settings app.

I will.

Helge Hafting

_______________________________________________
Shr-devel mailing list
[hidden email]
http://lists.projects.openmoko.org/mailman/listinfo/shr-devel
Reply | Threaded
Open this post in threaded view
|

Re: Problem: battery drains when un-powered charger is connected

Tilman Baumann

Helge Hafting schrieb:
> Tilman Baumann wrote:
>> If your laptop can not provide full power in suspend, it ought to tell
>> it's devices so.
>>
> I guess the phone checks now and then to see if power is critically low
> when it isn't suspended/off. If so, it could also check if charging is
> working as expected and synthesize a "unplug" event if it isn't.

A shutdown should be a 'unplug' (logic wise not power wise). The fact that
it can still dribble out some mA out of the port shold not indicate that
the phone has sufficient power.
Because the dribble-charge mode which is engaged on dumb chargers (or dead
hosts) is known to be not necessarily enough to sustain the load to keep
the device on line.
So auto suspend should definitely engage. If not, this is a bug.
framework should definitely care for the available power levels (100mA
(dumb dribble charge), 500mA (enumerated usb device mode), 1A (fast
charger mode). Not for the fact that there is some voltage on the port.

>> It would be interesting to reproduce this. Maybe you can put your laptop
>> to sleep and then check the logs on your freerunner and check the power
>> status in the settings app.
>
> I will.

I would be really interested in the results.
Because I believe I had similar issues once in a while. I have the
suspicion that frameworkd on some occasions does not recognizes a change
in carge mode.
For example if I bootup the system with usb plugged in, it sometimes only
seems to go in charge mode after I plug it out and in again. Which
probably creates a event that notifies frameworkd about the new stat. And
if this notification does not happen it will not engage charging mode.
But this is only a untested theory and maybe GTA01 specific.

--
MFG
 Tilman Baumann


_______________________________________________
Shr-devel mailing list
[hidden email]
http://lists.projects.openmoko.org/mailman/listinfo/shr-devel
Reply | Threaded
Open this post in threaded view
|

Re: Problem: battery drains when un-powered charger is connected

Flemming Richter Mikkelsen
On 2009-04-20, Tilman Baumann <[hidden email]> wrote:
--snip--
> For example if I bootup the system with usb plugged in, it sometimes only
> seems to go in charge mode after I plug it out and in again. Which
> probably creates a event that notifies frameworkd about the new stat. And
> if this notification does not happen it will not engage charging mode.
> But this is only a untested theory and maybe GTA01 specific.

This was a kernel bug which should be fixed a long time ago.  Maybe
the fix was GTA02 specific.

_______________________________________________
Shr-devel mailing list
[hidden email]
http://lists.projects.openmoko.org/mailman/listinfo/shr-devel
Reply | Threaded
Open this post in threaded view
|

Re: Problem: battery drains when un-powered charger is connected

Tilman Baumann

Flemming Richter Mikkelsen wrote:

> On 2009-04-20, Tilman Baumann <[hidden email]> wrote:
> --snip--
>> For example if I bootup the system with usb plugged in, it sometimes
>> only
>> seems to go in charge mode after I plug it out and in again. Which
>> probably creates a event that notifies frameworkd about the new stat.
>> And
>> if this notification does not happen it will not engage charging mode.
>> But this is only a untested theory and maybe GTA01 specific.
>
> This was a kernel bug which should be fixed a long time ago.  Maybe
> the fix was GTA02 specific.

I'm not sure if the problem even still exists.
I have not experienced it for a log time. But I tend to be careful to re
plug the phone if I need to be certain that it loads.
And the latest shr- kernel (that is working for me) seems to stay
constantly in charge mode anyway.
So, take it all as a side note. I'm not certain.

--
MFG
 Tilman Baumann


_______________________________________________
Shr-devel mailing list
[hidden email]
http://lists.projects.openmoko.org/mailman/listinfo/shr-devel
Reply | Threaded
Open this post in threaded view
|

Re: Problem: battery drains when un-powered charger is connected

Helge Hafting
In reply to this post by Tilman Baumann
Tilman Baumann wrote:

> Helge Hafting schrieb:
>> Tilman Baumann wrote:
>>> If your laptop can not provide full power in suspend, it ought to tell
>>> it's devices so.
>>>
>> I guess the phone checks now and then to see if power is critically low
>> when it isn't suspended/off. If so, it could also check if charging is
>> working as expected and synthesize a "unplug" event if it isn't.
>
> A shutdown should be a 'unplug' (logic wise not power wise). The fact that
> it can still dribble out some mA out of the port shold not indicate that
> the phone has sufficient power.
> Because the dribble-charge mode which is engaged on dumb chargers (or dead
> hosts) is known to be not necessarily enough to sustain the load to keep
> the device on line.
> So auto suspend should definitely engage. If not, this is a bug.
> framework should definitely care for the available power levels (100mA
> (dumb dribble charge), 500mA (enumerated usb device mode), 1A (fast
> charger mode). Not for the fact that there is some voltage on the port.
>
>>> It would be interesting to reproduce this. Maybe you can put your laptop
>>> to sleep and then check the logs on your freerunner and check the power
>>> status in the settings app.
>> I will.
>
> I would be really interested in the results.

Good news - this is fixed in SHR testing of april 22.
That's what I run now, and this time it survived a night connected to
the dead laptop - the battery was still full in the morning.

There were another problem though - when I turned the phone off, the
backilght timeout did not engage. The display was still on after a few
minutes. So I believe there was not timeout, although it cannot be ruled
completely out that the cat may have stepped on the display. :-)

This was easily fixed - I went into the settings. The backlight timeout
was active, so I turned it off and back on again. 20s later the display
shut off as it should.

Helge Hafting

_______________________________________________
Shr-devel mailing list
[hidden email]
http://lists.projects.openmoko.org/mailman/listinfo/shr-devel