Firefox prevents switching back to integrated gpu after running flash

NEW
Unassigned

Status

()

9 years ago
4 years ago

People

(Reporter: jrmuizel, Unassigned)

Tracking

Trunk
x86
Mac OS X
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(blocking2.0 -)

Details

(Whiteboard: rdar://8224873)

(Reporter)

Description

9 years ago
Safari doesn't have this problem and I expect that this problem will have a negative impact on battery life.
(Reporter)

Updated

9 years ago
blocking2.0: --- → ?
We need to know why this happens - specifically, why Safari doesn't trigger the discrete GPU while we do. (Apps that use Core Animation reportedly trigger the discrete GPU, but Safari uses Core Animation...)
Running Chromium with Core Animation for flash also triggers the discrete GPU.

Josh, can you bring this up with Apple directly?
Josh said we should open an Apple bug: http://bugreporter.apple.com/
We will need to mention in the bug report that the cause is likely the implementation of CARenderer. 

We need clear STR before filling a bug. Perhaps we could try to reproduce the issue with the CARenderer sample and use that as STR. Does the gfx switch not happen until the application is closed or until the system is rebooted?
Has that bug been opened with Apple?
Not yet, I had requested feedback by e-mail about this issue but I'll just file the bug with the information I have now.

Comment 6

9 years ago
Does this happen with OOP Flash, or only IPP Flash? Blocking for now.
Assignee: nobody → b56girard
blocking2.0: ? → betaN+
This will happen for both OOP and IP since this is related to our implementation of CoreAnimation, using the CARenderer class.
This has been reported as Apple Bug 8224873, I couldn't find a public URL.
(In reply to comment #8)
> This has been reported as Apple Bug 8224873, I couldn't find a public URL.

We just whiteboard the rdar:// URI and rely on the reporter of the rdar:// to keep us updated ;)
Whiteboard: rdar://8224873
We got another response asking for the sample to be modified to properly release the context and pixel format. We do that in firefox but we don't do that in the testcase that reproduces the problem.

Can we find a new owner, I don't have enough time to properly handle this :(?
Assignee: b56girard → nobody
We're going to be using the GPU actively all the time on OS X 10.6, so this isn't actually an issue in real world use.
blocking2.0: betaN+ → -
Duplicate of this bug: 642132

Comment 13

8 years ago
This bug is still present in the release version of FF4. This results in a 75% reduction (yes, I really mean it's cutting me down from 8 hours to 2 hours) in on-battery runtime. This really is a deal breaker for mobile users.

Comment 14

8 years ago
(In reply to comment #0)
> Safari doesn't have this problem and I expect that this problem will have a
> negative impact on battery life.

-even firefox 3 does not have this problem

Comment 15

8 years ago
(In reply to comment #4)
> Has that bug been opened with Apple?

-Yes, apple knows this bug
-it is trying to solve it
-all apple products are fine
-the culprits are flash and its components

Comment 16

8 years ago
(In reply to comment #11)
> We're going to be using the GPU actively all the time on OS X 10.6, so this
> isn't actually an issue in real world use.

-dude,what about the battery life and the heat it generates??

Comment 17

8 years ago
Yes guys, a friend "Robert Longson(longsonr@gmail.com)" has found the solution
Uncheck “Use hardware acceleration when available” in the Advanced section of
the Preferences/Options dialog box in firefox 4.
and voila the gpu switches back to intel on restarting ff

Comment 18

8 years ago
(In reply to comment #17)
> Yes guys, a friend "Robert Longson(longsonr@gmail.com)" has found the solution
> Uncheck “Use hardware acceleration when available” in the Advanced section of
> the Preferences/Options dialog box in firefox 4.
> and voila the gpu switches back to intel on restarting ff

This doesn't work. It'll keep the GPU from lighting off as soon as you launch FF. However, the moment you view page content with any additional features beyond HTML, it lights up the GPU and then doesn't release it when you close the window.

So it's not a fix.

Comment 19

8 years ago
(In reply to comment #18)
> (In reply to comment #17)
> > Yes guys, a friend "Robert Longson(longsonr@gmail.com)" has found the solution
> > Uncheck “Use hardware acceleration when available” in the Advanced section of
> > the Preferences/Options dialog box in firefox 4.
> > and voila the gpu switches back to intel on restarting ff
> 
> This doesn't work. It'll keep the GPU from lighting off as soon as you launch
> FF. However, the moment you view page content with any additional features
> beyond HTML, it lights up the GPU and then doesn't release it when you close
> the window.
> 
> So it's not a fix.

williams, this is the fix
for instance if had observed ff3 this was the case
this thread was started to bring it to that level again
and about gpu switchin on loading flash or maps or ads
it is apples issue
they have been banging their heads over how to stop open gcl and others from unnecessarily starting
hope they find a fix soon
(Reporter)

Updated

8 years ago
Assignee: nobody → joe

Comment 20

8 years ago
(In reply to comment #19)
> williams, this is the fix
> for instance if had observed ff3 this was the case
> this thread was started to bring it to that level again
> and about gpu switchin on loading flash or maps or ads
> it is apples issue
> they have been banging their heads over how to stop open gcl and others from
> unnecessarily starting
> hope they find a fix soon

It doesn't work the way you think it does, though.

In FF3, the NVidia GPU NEVER lit up unless you had flash content go to full screen. The moment you took the flash content to something less than full screen, the NVidia GPU went dark.

In FF4, with hardware acceleration selected, the NVidia GPU is lit up the moment you start firefox and never turns off until you quit FF4.

In FF4, with hardware acceleration de-selected, the NVidia GPU is initially off when FF4 starts. However, anything beyond basic HTML content causes the NVidia GPU to light up. Once the NVidia GPU lights up, it NEVER turns back off until you quit FF4.

So there's really two parts of this problem:

1) FF4 inappropriately turns on the NVidia GPU at times when other browsers (FF3, Safari, Chrome, Opera) don't.

2) FF4 is incapable of releasing the NVidia GPU to allow it to turn off once it's been turned on.


It's the combination of those two problems that leads to de-selecting "Use Hardware Acceleration" not actually helping a mobile user. Once you start FF4 and actually do some browsing, your battery is trashed, regardless of what pref you have set.
(Reporter)

Updated

8 years ago
Depends on: 646043

Comment 21

7 years ago
Has there been any progress on this bug?

Please understand that this is a dealbreaker for laptop/mobile users. You can't upgrade past Firefox 3.6 if you have a MacBook with integrated and discrete graphics. The reduction by 75% (~8hrs to ~2hrs) in battery life, the fact that the laptop is too hot to touch, etc, are all dealbreakers. No other browser causes this to happen. This is unique to firefox. Safari, Chrome, and Opera all properly release the graphics card. This is going to force mobile users to pick a browser other than Firefox.
Depends on: 687864

Comment 22

7 years ago
I see this is marked fixed. What is the timeline for releasing this fix?
This is not marked as fixed.

Comment 24

7 years ago
Weird, I just got a whole spate of emails from bugzilla claiming a bunch of different things I'm subscribed to are now marked fixed.
You got emails that looked like:

Bug 568327 depends on bug 687864, which changed state.

Bug 687864 Summary: Add offline renderer awareness for Mac OGL
https://bugzilla.mozilla.org/show_bug.cgi?id=687864

           What    |Old Value                   |New Value
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


Note that it says that bug 687846 was marked fixed, not this bug.
(Reporter)

Comment 26

7 years ago
This should be fixed on 10.7 right now. We're still working on making it work on 10.6. Can anyone on 10.7 confirm that it now works properly?
(In reply to Jeff Muizelaar [:jrmuizel] from comment #26)
> Can anyone on 10.7 confirm that it now works properly?

I still get GPU switches when seeing WebGL/Flash content.

For reproducing, watch a HD video on Youtube with the Flash player or use the Tilt extension on any page: https://blog.mozilla.com/tilt/
(In reply to Reuben Morais [:reuben] from comment #27)
Correction, this is partially fixed. Opening Firefox doesn't trigger the GPU switch, but after some content (WebGL) triggers it, you have to close Firefox to switch back to the integrated GPU.
(In reply to Reuben Morais [:reuben] from comment #28)
> (In reply to Reuben Morais [:reuben] from comment #27)
> Correction, this is partially fixed. Opening Firefox doesn't trigger the GPU
> switch, but after some content (WebGL) triggers it, you have to close
> Firefox to switch back to the integrated GPU.

I just tried to reproduce this on 10.7 with today's nightly. Can you give exact STR to reproduce this and preferably file a new bug blocking this one?

Comment 30

7 years ago
(In reply to Reuben Morais [:reuben] from comment #28)
> (In reply to Reuben Morais [:reuben] from comment #27)
> Correction, this is partially fixed. Opening Firefox doesn't trigger the GPU
> switch, but after some content (WebGL) triggers it, you have to close
> Firefox to switch back to the integrated GPU.

That's how the behavior has been since FireFox 4.0 if you have the graphics acceleration preference set to off.
Assignee: joe → nobody
You need to log in before you can comment on or make changes to this bug.