Closed
Bug 1212466
Opened 9 years ago
Closed 9 years ago
Firefox for Android uses too much energy when pages are open while the app is backgrounded
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(fennec-)
RESOLVED
DUPLICATE
of bug 1026669
Tracking | Status | |
---|---|---|
fennec | - | --- |
People
(Reporter: micmon, Unassigned)
References
Details
(Keywords: power)
Attachments
(1 file)
(deleted),
image/png
|
Details |
Firefox for Android often drains the battery of my Nexus 5 in no time. See the attached screenshot for example. Starting with 100% charge my battery was at 22% when I noticed it about 2 hours later. There was only one page open [1] but the screen was off and I think Firefox was running in the background.
Firefox should really suspend web pages while the screen is off.
[1] https://groupees.com/bmle
Reporter | ||
Comment 1•9 years ago
|
||
I should mention that this was not the only time I ran into a problem like this. Closing pages before turning the screen of seems to work around the problem but this is not how I would like to use Firefox.
Updated•9 years ago
|
Comment 2•9 years ago
|
||
Firefox does slow down some parts of webpages when backgrounded. Intervals for timers are changed and animations should be paused.
We recently landed a fix for pausing service discovery while backgrounded in bug 1026669. This might be causing the problem you see. You can try disabling the "video casting" service and see if that helps:
* about:config
* find: "browser.casting.enabled"
* toggle to false
* press Android Home button, just to be sure the preference is saved
* restart Firefox
I can look at uplifting bug 1026669 as well.
Reporter | ||
Comment 3•9 years ago
|
||
Thanks, I will give this a try.
Reporter | ||
Comment 4•9 years ago
|
||
Well right now going to that page I linked as a test case triggers a device reboot after about 2minutes :(
Comment 5•9 years ago
|
||
I connected to the page remotely using a Nexus 4 and Firefox Desktop. Doing some profiling while the device was "sleeping" and didn't see the page doing any networking. I also didn't see much, if any JS code happening. While the page is in the foreground, there are almost constant setTimeouts and setIntervals.
We need to keep looking.
Comment 6•9 years ago
|
||
Michael, can you consistently reproduce this?
I wonder if Finkle was unable to reproduce because of some race condition.
Comment 7•9 years ago
|
||
(In reply to Michael Comella (:mcomella) from comment #6)
> Michael, can you consistently reproduce this?
>
> I wonder if Finkle was unable to reproduce because of some race condition.
I fully charged my Nexus 4, opened the webpage in Nightly, put the phone to sleep and left it alone over night.
In the morning, I see the Nightly is using 23% of the power. Something is going on, but I don't know a good way to find out what that is.
Reporter | ||
Comment 8•9 years ago
|
||
(In reply to Michael Comella (:mcomella) from comment #6)
> Michael, can you consistently reproduce this?
At the moment I can reproduce the phone reboot nach time I visit that page. However this is after updating to Android 6...
Comment 9•9 years ago
|
||
I tried a variant of the experiment in comment 7. I fully charge the Nexus 4, disabled plugins in Nightly, visited the page and put the phone to sleep. In the morning, Nightly used 11% of the power and the phone still had ~78% charge.
This leads me to believe that Flash plugin uses are affecting power usage when in the background. I wonder if we can add support for throttling Flash when in the background, like we do for other features?
Reporter | ||
Comment 10•9 years ago
|
||
FYI I do not have flash installed
Updated•9 years ago
|
tracking-fennec: --- → ?
Comment 11•9 years ago
|
||
I did the experiment in comment 9 again, with an updated Nightly. I wanted to be sure I had bug 1026669 in the test. After letting the Nexus 4 sleep on battery overnight, Nightly is using 9% of the battery and the browser did not crash.
Comment 12•9 years ago
|
||
As far as the power usage, I think this fixed by bug 1026669. For crashes, I'd suggest opening a new bug.
Status: NEW → RESOLVED
tracking-fennec: ? → -
Closed: 9 years ago
Resolution: --- → DUPLICATE
Assignee | ||
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•