Hi,

There are two reasons for this issue we found until now.

1. Bug 904544 - hold wakelock to make sure input devices event can be handle 
before suspend

2. 
https://docs.google.com/a/mozilla.com/drawings/d/1nT0WOW-Xgxp0oNzgRx7BOdxMBrDKf0cxDVfLXMeziA8/edit
    a. The power key handling from Gecko/Gaia didn't do wakelock protection 
well. (The pink and purple arrows didn't be protected by wakeloc,.)
    b. So if kernel didn't help to hold a wakelock with constant timeout during 
resuming state then power key handling may not be done before re-entering to 
suspend.

Thanks,
Sincerely yours.

----- 原始郵件 -----
寄件者: "an" <novac.a...@gmail.com>
收件者: dev-b2g@lists.mozilla.org
寄件備份: 2013 9 月 4 星期三 上午 11:46:12
主旨: Re: [b2g] Wake-up phone

If it's of any help, I just figured out that the phone wakes every time if I 
press the volume button immediately after the power button.

On Wednesday, September 4, 2013 5:21:57 AM UTC+3, Marco Chen wrote:
> ----- 原始郵件 -----
> 

> 
> Any news on this issue?
> 
> 
> 
> On Monday, August 5, 2013 10:18:20 PM UTC+3, an wrote:
> 
> > On Monday, August 5, 2013 5:25:17 AM UTC+3, Marco Chen wrote:
> 
> > 
> 
> > > Hi,
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > We are trying to look this bug on Helix project now.
> 
> > 
> 
> > > 
> 
> > 
> 
> > > And the initial idea is that FxOS didn't have sufficient time for 
> > > changing the power state from 3 to 0 within 0.5 seconds.
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > The suspect flow is
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > >   a. Apps processor got a RPC message for power key event.
> 
> > 
> 
> > > 
> 
> > 
> 
> > >   b. Linux kernel is woken up and processed the early resuming process. 
> 
> > 
> 
> > > 
> 
> > 
> 
> > >   c. During step b kernel hold a wake lock for 0.5 seconds and expect any 
> > > one to decide whether system should be woken up from power state 3 to 0.
> 
> > 
> 
> > > 
> 
> > 
> 
> > >   d. Gecko's input widget received a power key event from input device 
> > > then throw a runnable event to main thread for following works.
> 
> > 
> 
> > > 
> 
> > 
> 
> > >   e. Before main thread got this power key event ( then sending to 
> > > shell.js -> chrome event -> system app -> power Web API -> Gecko -> 
> > > Changing power state ),
> 
> > 
> 
> > > 
> 
> > 
> 
> > >        the 0.5 seconds is time out and system go into suspend again.
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > So what we saw will be
> 
> > 
> 
> > > 
> 
> > 
> 
> > >   1. pressing power key multi-times then device can be woken up.
> 
> > 
> 
> > > 
> 
> > 
> 
> > >   2. Pluggin USB then device can be woken up.
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > We tried to prove this and figure out the solution.
> 
> > 
> 
> > 
> 
> > 
> 
> > That's the behavior I'm seeing and that's what I imagined it might happen 
> > as you describe it. Not being a developer the whole chain of events was a 
> > more abstract one ;) to me but when I press the power key the soft buttons 
> > light up for a second as if the phone wants to wake up but it somehow 
> > looses steam.
> 
> > 
> 
> > Please keep me posted with your findings and eventual solutions.
> 
> > 
> 
> > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > Sincerely yours.
> 
> 
> 
_______________________________________________
dev-b2g mailing list
dev-b2g@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g
_______________________________________________
dev-b2g mailing list
dev-b2g@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to