Last Comment Bug 819431 - Seems impossible to prevent pandaboard (or at least its HDMI output) from going back to sleep
: Seems impossible to prevent pandaboard (or at least its HDMI output) from goi...
Status: RESOLVED WONTFIX
:
Product: Core
Classification: Components
Component: Widget: Gonk (show other bugs)
: unspecified
: x86_64 Linux
: P1 normal (vote)
: B2G C3 (12dec-1jan)
Assigned To: William Lachance (:wlach)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-07 10:10 PST by William Lachance (:wlach)
Modified: 2016-03-21 08:46 PDT (History)
10 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
-
+


Attachments
Turn on screen if timeout gets disabled (1.08 KB, patch)
2012-12-13 07:47 PST, Thomas Zimmermann [:tzimmermann] [:tdz]
no flags Details | Diff | Splinter Review

Description William Lachance (:wlach) 2012-12-07 10:10:17 PST
You can reproduce this problem by running an eideticker test, which attempts to run this script. The screen should stay on after the test completes, but instead it dies just a few minutes later.

To set up / run eideticker see the instructions in: 

http://github.com/mozilla/eideticker

To run the actual test that reproduces the problem:

./bin/runtest.py --no-capture --device-type b2g src/tests/b2g/appswitching/appswitching.py
Comment 1 Jonathan Griffin (:jgriffin) 2012-12-07 10:11:20 PST
We should note that the script sets the screen timeout to 0 programmatically, so it isn't the normal screen timeout which is occurring.
Comment 2 William Lachance (:wlach) 2012-12-07 10:17:26 PST
Here's the code which is supposed to perma-unlock the screen:

https://github.com/mozilla/mozbase/blob/master/mozb2g/mozb2g/b2gmixin.py#L169
Comment 3 Jonathan Griffin (:jgriffin) 2012-12-07 17:29:38 PST
I've seen this as well.  It seems quite random, and does not resolve by turning the screen on programatically ala https://github.com/mozilla/gaia-ui-tests/blob/master/gaiatest/atoms/gaia_lock_screen.js#L13.  Once it happens, the only resolution is to restart B2G.
Comment 4 Alex Keybl [:akeybl] 2012-12-10 08:38:56 PST
William - please make this a top priority today, and ping me in IRC if you need any dev help. I'll find the right people.
Comment 5 Alex Keybl [:akeybl] 2012-12-10 11:58:05 PST
Faramarz/Andrew - William suggested he's not in the best position to perform this engineering investigation. Who could look at this early this week?
Comment 6 William Lachance (:wlach) 2012-12-10 13:55:34 PST
(In reply to Alex Keybl [:akeybl] from comment #5)
> Faramarz/Andrew - William suggested he's not in the best position to perform
> this engineering investigation. Who could look at this early this week?

I guess I'd add that although I don't feel I have the background to do this in a timely manner (or at least guarantee anything), I'd be quite happy to assist with this bug in any way I can -- hopefully learning more about how the Panda/Android/B2G video out subsystem works in the process so I can start looking at stuff like this in the future. :)
Comment 7 Andrew Overholt [:overholt] 2012-12-11 14:17:31 PST
(In reply to Alex Keybl [:akeybl] from comment #5)
> Faramarz/Andrew - William suggested he's not in the best position to perform
> this engineering investigation. Who could look at this early this week?

mwu or tzimmerman?
Comment 8 Thomas Zimmermann [:tzimmermann] [:tdz] 2012-12-12 01:45:52 PST
I'm quite busy ATM, sorry.
Comment 9 Thomas Zimmermann [:tzimmermann] [:tdz] 2012-12-12 02:05:25 PST
If you just want something one the screen, you can apply the workaround in bug 818506 and push the board's GPIO button whenever the display turns black.
Comment 10 Thomas Zimmermann [:tzimmermann] [:tdz] 2012-12-12 02:05:56 PST
s/one/on
Comment 11 William Lachance (:wlach) 2012-12-12 11:18:07 PST
The patch in https://bugzilla.mozilla.org/show_bug.cgi?id=817730#c47 may be useful here. Investigating.
Comment 12 Thomas Zimmermann [:tzimmermann] [:tdz] 2012-12-12 11:31:58 PST
dhylands told me that the screen timeout (in seconds) can be configured by setting screen.timeout in gaia/build/settings.py. What happens if you set it to a high value (e.g., hours)?
Comment 13 Jonathan Griffin (:jgriffin) 2012-12-12 13:23:51 PST
(In reply to Thomas Zimmermann from comment #12)
> dhylands told me that the screen timeout (in seconds) can be configured by
> setting screen.timeout in gaia/build/settings.py. What happens if you set it
> to a high value (e.g., hours)?

FWIW, I've seen this HDMI problem during gaia smoke tests too, on the panda.  We have code already that sets screen.timeout to 0 (which disables the screen timeout), and I still see this HDMI issue.  I do not see it on an unagi, just the panda.
Comment 14 William Lachance (:wlach) 2012-12-12 16:02:53 PST
(In reply to Thomas Zimmermann from comment #12)
> dhylands told me that the screen timeout (in seconds) can be configured by
> setting screen.timeout in gaia/build/settings.py. What happens if you set it
> to a high value (e.g., hours)?

Yeah, as :jgriffin hinted, changing this setting seems to have no effect.
Comment 15 Michael Wu [:mwu] 2012-12-12 16:09:20 PST
(In reply to Andrew Overholt [:overholt] from comment #7)
> (In reply to Alex Keybl [:akeybl] from comment #5)
> > Faramarz/Andrew - William suggested he's not in the best position to perform
> > this engineering investigation. Who could look at this early this week?
> 
> mwu or tzimmerman?

I am traveling Thursday and Friday. There might be a little bit of time for me to look at this on Thursday but it may not be enough. I'll post an update here if I find anything interesting.
Comment 16 Thomas Zimmermann [:tzimmermann] [:tdz] 2012-12-13 01:41:19 PST
(In reply to Andrew Overholt [:overholt] from comment #7)
> (In reply to Alex Keybl [:akeybl] from comment #5)
> > Faramarz/Andrew - William suggested he's not in the best position to perform
> > this engineering investigation. Who could look at this early this week?
> 
> mwu or tzimmerman?

Bug 817730 isn't reproducible any longer; I'll look at this problem today.
Comment 17 Thomas Zimmermann [:tzimmermann] [:tdz] 2012-12-13 07:47:51 PST
Created attachment 691825 [details] [diff] [review]
Turn on screen if timeout gets disabled

This patch explicitly turns on the screen when the screen timeout gets cleared. William, could you test it?
Comment 18 Thomas Zimmermann [:tzimmermann] [:tdz] 2012-12-13 08:52:27 PST
I further looked into the problem. I think what happens is that the screen was turned off by the screen timeout before the test sets the timeout to zero. Setting the timeout to zero will only remove the timeout itself, it will not turn on the blanked screen.

IMHO, the correct solution here is to not modify the timeout at all, but to acquire and hold a screen wake lock while the test is running. This will keep the screen turned on during the test. See gaia/shared/js/media/video_player.js for an example on how to use wake locks.

Some feedback from a Gaia dev is appreciated.
Comment 19 William Lachance (:wlach) 2012-12-13 17:00:31 PST
Comment on attachment 691825 [details] [diff] [review]
Turn on screen if timeout gets disabled

As discussed on irc, this fixes the problem for me. Of course it's not something we actually want to apply.
Comment 20 Jonathan Griffin (:jgriffin) 2012-12-13 17:08:13 PST
We should be able to call ScreenManager.turnScreenOn(true) from within a Marionette script.
Comment 21 Thomas Zimmermann [:tzimmermann] [:tdz] 2012-12-14 01:49:46 PST
(In reply to Jonathan Griffin (:jgriffin) from comment #20)
> We should be able to call ScreenManager.turnScreenOn(true) from within a
> Marionette script.

Sure. I just thought that the wake lock would be the safest option. Don't know what happens if you turn on the screen and some other program modifies the screen state as well.
Comment 22 Thomas Zimmermann [:tzimmermann] [:tdz] 2012-12-14 01:51:38 PST
William, can I give this bug to you? You're in a much better position to fix the issue.
Comment 23 William Lachance (:wlach) 2012-12-14 07:14:06 PST
(In reply to Thomas Zimmermann [:tzimmermann] from comment #22)
> William, can I give this bug to you? You're in a much better position to fix
> the issue.

Yup, no problem. I'll try and figure things out on this end, and get in touch with people in the know about this stuff if I can't.
Comment 24 Andrew Overholt [:overholt] 2012-12-21 08:00:22 PST
How are you doing on this one, William?
Comment 25 William Lachance (:wlach) 2012-12-21 11:00:00 PST
I haven't really had time to look into this yet, but yes, I don't mind doing a bit more digging into this when I get the chance (next week or the week after).
Comment 26 Lawrence Mandel [:lmandel] (use needinfo) 2012-12-21 11:27:18 PST
Changing this bug to basecamp-, b2g18+. The sentiment in triage today is that we really do want to have this test infrastructure in place but we will ship without it. The guidance is that we should work to get Eideticker tests running as soon as we can.
Comment 27 Justin Wood (:Callek) 2016-03-21 08:46:49 PDT
No longer using pandas at mozilla

Note You need to log in before you can comment on or make changes to this bug.