Closed Bug 604135 Opened 14 years ago Closed 11 years ago

OpenGL/layers forces use of NVidia graphics on notebooks with integrated Intel graphics

Categories

(Core :: Graphics, defect)

x86
macOS
defect
Not set
major

Tracking

()

RESOLVED FIXED

People

(Reporter: jk, Assigned: joe)

References

Details

(Whiteboard: [battery][dealbreaker])

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0b8pre) Gecko/20101013 Firefox/4.0b8pre
Build Identifier: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0b8pre) Gecko/20101013 Firefox/4.0b8pre

The current generation of MacBook Pro's (i5/i7-based) have two graphic chipsets (integrated Intel HD and NVIDIA GeForce GT 330M) and support dynamic switching between them.

Firefox seems to force the use of the external NVIDIA chipset which reduces the time the notebook can operate on battery.
gfxCardStatus (http://codykrieger.com/gfxCardStatus/) lists both firefox-bin and plugin-container as causes for this.

Neither Safari 5 nor Google Chrome 8 show this behavior.

Reproducible: Always




Cf. http://support.apple.com/kb/HT4152 (MacBook Pro (15-inch, Mid 2010) and MacBook Pro (17-inch, Mid 2010): How to determine which graphics card is in use)
Component: General → Graphics
Product: Firefox → Core
QA Contact: general → thebes
There isn't really anything we can do about this; OS X automatically selects the video card for us when we start using OpenGL.

You can disable hardware acceleration in the preferences dialog (Preferences > Advanced > General) if you want to conserve battery power, though.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Josh, can you file a bug with Apple to ask how we can resolve this? We think it's possible because Safari doesn't seem to trigger the discrete GPU when it's using OpenGL via Core Animation; my worry is that OS X has special-cased Safari.
Assignee: nobody → joshmoz
Actually, I didn't mention hardware acceleration on purpose: Even with layers.accelerate-none=true Firefox causes a switch to NVidia.

(Also, forcing the use of the integrated Intel chipset result in a rather choppy scrolling experience on sites that work fine in Safari and Chrome.)
Jürgen, you're most likely seeing bug 568327 with layers.accelerate-none=true. At least, I hope so!
Right, you must be seeing this happen with Plug-in content (Flash/Quicktime) only? The problem persist even after the plug-in are closed.

Have we investigated specifying RendererID:
http://developer.apple.com/library/mac/DOCUMENTATION/GraphicsImaging/Reference/CGL_OpenGL/Reference/reference.html#//apple_ref/c/econst/kCGLPFARendererID

I'm not sure if this does exactly what I think it does but it does look promising. Joe had ran some test for me with this in the past but I didn't get very far without proper hardware to test on. Perhaps it's worth investigating more?
Actually the switch to NVidia already happens when I just open the profile manager, i.e. before any profile or plugin is loaded.
The profile manager has OpenGL turned on by default, because it uses the "default" preferences (since obviously it doesn't have a profile to load the preferences from). That should go away once Firefox starts, though.
Ah, I didn't know firefox is already initialized when the profile manager comes up.

Anyway, I created a new profile, turned off acceleration and set the home page to about:blank.  Firefox still makes the system switch to discrete graphics.  (Not caused by Flash, there isn't even plugin-container process at that point).
I don't know much about this code, best bet is to file a bug with Apple and then we can ping them if we don't get any action on that. When a bug has been filed please put the radar number in this bug.
Assignee: joshmoz → joe
Summary: Forces use of NVidia graphics on notebooks with integrated Intel graphics → OpenGL/layers forces use of NVidia graphics on notebooks with integrated Intel graphics
I just wanted to add to this discussion because I experienced the same problems with Firefox 4 beta's (all up to Beta 9). 

This problem does not exist on Firefox 3.6.13, as it only switches to the discrete graphics when the following two conditions are met:

(1) Flash/Other videos are in full screen
(2) The content is above 480p.

If only the first condition is met, Firefox 3.6.13 switches to the discrete graphics when the video is made full screen at first, and then immediately switches back to the Intel graphics when it determines that the content is not greater than 480p.

Since graphics switching works incredibly well in OS X 10.6.6 on FF 3.6.13, I would like to believe that FF 4.0 could be made to work just as well.

As other poster's have mentioned, setting layers.accelerate-all to false & layers.accelerate-none to true  in the FF 4.0 betasdoes not fix the problem.
This bug is still present in the release version of FF4. This one problem reduces my run-time on battery by 75% if I leave Firefox open. Is there any way to go back to the 3.6-era rendering where this problem doesn't exist?

For mobile users, this is a deal-breaker.
Whiteboard: dealbreaker
Severity: normal → major
I just ran across this in Firefox 6. I was wondering why my mid-2010 15" MacBook Pro was getting such horrid battery life.
See also bug 568327 - Firefox prevents switching back to integrated gpu after running flash
Has there been any progress with this? This bug is so severe it prevents laptop users from being able to upgrade past Firefox 3
A little progress has been made on this topic in the Chromium browser with details posted here: http://crbug.com/88788 . However, a complete solution has not yet been found.
Depends on: 687864
I see this is marked fixed. What is the timeline for releasing this fix?
(In reply to Ty Williams from comment #16)
> I see this is marked fixed. What is the timeline for releasing this fix?

Bug 687864 is marked as target milestone version 9
I'm running version 9.0.1 now. The graphics card still comes on and gets stuck on and incorrect times.
Just running Firefox doesn't force discrete graphics for me.  Only WebGL sites such as http://cubicvr.org/CubicVR.js/bd3/BeatDetektor3HD.html and (new) Google Maps force it.  And after I close the tab and GC, it goes back to integrated graphics.

WFM?

(Using Firefox Nightly 24 on Mac OS X 10.8.3, with gfxCardStatus informing me.  My Early 2011 15" MacBook Pro has [Intel] integrated and [AMD Radeon] discrete cards.)
Whiteboard: dealbreaker → [battery][dealbreaker]
(In reply to Jesse Ruderman from comment #19)
> Just running Firefox doesn't force discrete graphics for me.  Only WebGL
> sites such as http://cubicvr.org/CubicVR.js/bd3/BeatDetektor3HD.html and
> (new) Google Maps force it.  And after I close the tab and GC, it goes back
> to integrated graphics.
> 
> WFM?
> 
> (Using Firefox Nightly 24 on Mac OS X 10.8.3, with gfxCardStatus informing
> me.  My Early 2011 15" MacBook Pro has [Intel] integrated and [AMD Radeon]
> discrete cards.)

That is indeed the behavior that we implemented in bug 713305 for WebGL) and some time even before (for GL layers not forcing discrete GPU). I didn't know about the present bug but it sounds like something that has long not been the case.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Ahh yes. This got fixed in Fall 2012 IIRC.
Attached file nvidia fails x3
this switch to the integrated graphics is forced by the new nvidia graphics driver! they implemented this to prevent high energy usage and counts for several webbrowsers and plugin-container.exe

its even impossible to change that behaviour in the nvidia controls. I downloaded nvidia inspector (found somewhere on the nvidia website), changed CPL_HIDDEN_PROFILE_DISABLED in CPL_HIDDEN_PROFILE_ENABLED for firefox.exe and plugin-container.exe and now it was possible at last to change that behaviour of choosing the integrated or the gpu normally in the nvidia controls.

i attached the nvidia inspector.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: