Closed Bug 649274 Opened 13 years ago Closed 13 years ago

MeeGo Display turns off after 60 seconds without touch

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
MeeGo
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 7

People

(Reporter: jbos, Unassigned)

References

Details

(Whiteboard: QA-)

Attachments

(2 files, 3 obsolete files)

As a user I want to see a website without touching the display all the time.

i.e.: While watching a movie or reading a text.

MeeGo provides for this the qmsystem2 API. This allows us to set a Time (seconds) to tell the system when to DIM and finally turn of the display.
you need to have libqmsystem2-dev installed. to use this feature. Ensure you also have sensor framework dependency installed when you face linker issues.
Attachment #525658 - Flags: review?(romaxa)
Adding preferences to control screen doesn't seem the way to fix it. See bug 616664 and try to add support for MeeGo.
thanks this looks pretty cool. Didn't know there are such interfaces. :) Indeed we need to support this for MeeGo. 

This here is more a general thing since the default dim time is actually not 60 but 30 seconds on meego. So increasing it by default is really one part of the puzzle.

Of course disable turning of in case of video is not solved by the code above and should be handled with the interface you show in 616664.

I would take action there tomorrow and implement those interfaces. 

It would be an option to think about a general Display Manager in qt widgets which is taking care not only about blanking / dimming, but also giving the hint and bridge in case user force to blank screen (i.e. reacting by not making screenupdates anymore and start saving power / cpu / gpu time)

What do you think?
(In reply to comment #3)

> This here is more a general thing since the default dim time is actually not 60
> but 30 seconds on meego. So increasing it by default is really one part of the
> puzzle.

I don't think we want to change the default, do we? If the OS uses 30 sec, we should let the user use the OS controls to change it.

> It would be an option to think about a general Display Manager in qt widgets
> which is taking care not only about blanking / dimming, but also giving the
> hint and bridge in case user force to blank screen (i.e. reacting by not making
> screenupdates anymore and start saving power / cpu / gpu time)

Maybe. I just don't want to add more than we need to add. Adding support for power consumption is a good thing and we should have general code for all platforms to handle power consumption better.
The longer i think about it,... mhm yes  a) fix issue with dimming correctly by using interfaces makes much sense esp since you are able to react to the state/option the browser is currently in.

b) fixing powerconsumption /usetime in another bug and more general makes also lot of sense and would just create 'another monster bug :)' 

Next Action: Create Patch that impl. interfaces from 616664 for meego. 

:) can someone with more rights then myself obsolete the patch from above?
Attachment #525658 - Attachment is obsolete: true
Attachment #525658 - Flags: review?(romaxa)
Attached patch Using the Intefaces (obsolete) — Splinter Review
Its sad that there is no api interface to just keep display on. Also nothing to reset to old (system) values since you do overwrite them!

Only way to reset to system is to delete the object. I tested first with 1 day timeout, which resulted in non working. So I reduced to 3 hours which seems enough. And which does work.
Attachment #526045 - Flags: review?(romaxa)
Attached patch Fixed Chat Comments (obsolete) — Splinter Review
Attachment #526045 - Attachment is obsolete: true
Attachment #526045 - Flags: review?(romaxa)
Attachment #526056 - Flags: review?(romaxa)
Comment on attachment 526056 [details] [diff] [review]
Fixed Chat Comments


> nsScreenQt::nsScreenQt(int aScreen)
>     : mScreen(aScreen)
>+    , mDisplayState(nsnull)

I guess this should be inside ifdef

> {
>     // nothing else to do. I guess we could cache a bunch of information
>     // here, but we want to ask the device at runtime in case anything
>@@ -61,11 +71,16 @@
> 
> nsScreenQt::~nsScreenQt()
> {
>-    // nothing to see here.
>+    delete mDisplayState;
>+    mDisplayState = nsnull;
> }
> 
also this one

Because this one is inside:
>+#ifdef MOZ_ENABLE_QMSYSTEM2
>+  void ApplyMinimumBrightness(PRUint32 aType);
>+private:
>+  MeeGo::QmDisplayState* mDisplayState;
>+#endif
> private:
>   int mScreen;
> };

send patch to try and make sure that it is not breaking default builds and qt builds.
Attachment #526056 - Flags: review?(romaxa) → review-
Attached patch Fixed CommentsSplinter Review
Thanks,

i pushed to try: http://tbpl.mozilla.org/?tree=MozillaTry&rev=3c8283280dcb
Attachment #526056 - Attachment is obsolete: true
Attachment #526201 - Flags: review?(romaxa)
Comment on attachment 526201 [details] [diff] [review]
Fixed Comments

>+      MOZ_QT_LIBS="$MOZ_QT_LIBS $_QMSYSTEM2_LIBS"
>+      AC_DEFINE(MOZ_ENABLE_QMSYSTEM2)
please make it 4 spaces indent (rest of Qt configure stuff need to be restyled later)


>+
>+const int DISPLAY_BLANK_TIMEOUT = 10800; /*3 * 60 * 60 seconds*/
>+const int DISPLAY_DIM_TIMEOUT = 10620; /*3 * 59 * 60 seconds*/
                                          spaces              spaces
>+
>+#endif
>+
>+
>+    if( aType == BRIGHTNESS_FULL) {
      spaces
>+        mDisplayState = new MeeGo::QmDisplayState();
>+
>+        // no way to keep display from blanking than setting a huge timeout
>+        // parameter is seconds. setting timeout to huge time this should work for 99.9% of our usecases
>+        mDisplayState->setDisplayBlankTimeout( DISPLAY_BLANK_TIMEOUT /*in seconds*/ );
>+        mDisplayState->setDisplayDimTimeout( DISPLAY_DIM_TIMEOUT /*in seconds*/ );
                                                                         spaces
>+        mDisplayState->setDisplayBrightnessValue( mDisplayState->getMaxDisplayBrightnessValue() );
                                           no spaces
>+        mDisplayState->set(MeeGo::QmDisplayState::On);
>+     }

>@@ -53,7 +65,12 @@
> 
>   NS_DECL_ISUPPORTS
>   NS_DECL_NSISCREEN
>-
>+  
here and in other places don't add whitespaces

>+#ifdef MOZ_ENABLE_QMSYSTEM2
>+  void ApplyMinimumBrightness(PRUint32 aType);
>+private:
Attachment #526201 - Flags: review?(romaxa)
Comment on attachment 526201 [details] [diff] [review]
Fixed Comments

ok, this is looks good except style nits,
Attachment #526201 - Flags: review+
Comment on attachment 526201 [details] [diff] [review]
Fixed Comments

need add review for configure part
Attachment #526201 - Flags: review?(mh+mozilla)
Comment on attachment 526201 [details] [diff] [review]
Fixed Comments

Review of attachment 526201 [details] [diff] [review]:
-----------------------------------------------------------------

The build config part looks good.
Attachment #526201 - Flags: review?(mh+mozilla) → review+
Comment on attachment 526201 [details] [diff] [review]
Fixed Comments

># HG changeset patch
># Parent d6bf54d13be214b0b005cf2abb0c19a22447c19c
># User Jeremias Bosch <jeremias.bosch@gmai.com>
                                           ^
That looks like a typo ____________________|

Would you mind posting a version with that fixed, and with a checkin comment added, per 
http://blog.bonardo.net/2010/06/22/so-youre-about-to-use-checkin-needed
?
Attachment #534439 - Attachment description: Fixed headers, and removed whitespaces → Fixed headers, and removed white spaces, PUSHME
http://hg.mozilla.org/projects/cedar/rev/17ecc803b4bd
Flags: in-testsuite?
Keywords: checkin-needed
Whiteboard: fixed-in-cedar
Target Milestone: --- → Firefox 7
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: fixed-in-cedar
can someone having a MeeGo phone verify this, please?
Blocks: 672166
Whiteboard: QA?
MeeGo work QA-
Whiteboard: QA? → QA-
Blocks: 708152
No longer blocks: 708152
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: