Closed Bug 587857 Opened 14 years ago Closed 14 years ago

Create an easy way to toggle the state of hardware acceleration

Categories

(Firefox :: Settings UI, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
blocking2.0 --- beta5+

People

(Reporter: jrmuizel, Assigned: joe)

References

Details

(Keywords: user-doc-needed, Whiteboard: [strings][has reviewed patch])

Attachments

(1 file, 2 obsolete files)

While it would be great to always do the right thing, using hardware acceleration when it is appropriate. However, there is concern that we won't always be able to provide a good experience to everyone out of the box.

We should probably provide an easy way for people to toggle whether they're using hardware acceleration or not.

One precedent for this kind of solution is the use a compositing window manager under Windows. Windows makes it pretty easy to turn off compositing (disabling aero glass) and people certainly seem to take this option.
Keywords: uiwanted
Beltzner/Limi - do you or one of your team have input on this?
Yes, we do. :)

I did discuss this with Damon and others in a meeting, but I'll capture it here:

The best way would be to launch in safe mode when we crash repeatedly, and offer the option to turn off hardware acceleration on a page/notification when this happens, and restart.

Outside of that case, the setting should probably be relegated to about:config. I know that there's a differing opinion that says that games ship with hardware acceleration controls in their main menu, but I believe the audiences are quite different. Most people don't have the necessary understanding to make a decision here, so we should do it for them if Firefox detects that it's crashing because of it.
Windows 7 ships with hardware acceleration controls, but they call it something different.  We could easily call it "Enable Accelerated Compositing", which sounds a lot friendlier than "Enable Hardware Acceleration" or similar.  Don't think that would look too out of place in Advanced->General.
Daring to disagree with my UX lead, here:

 - the option should be somewhere suitably hard to turn-off-by accident, but I think somewhere better than about:config. I suggest Advanced > General > Browsing, right below "Use smooth scrolling"

 - agree that we should disable D2D when launching in Safe Mode (note: we don't launch in safe mode when we crash repeatedly)

 - we should also disable D2D if we detect that the user has disabled hardware acceleration on their Windows 7 machine (I suspect there's a system value we can interrogate for that, perhaps the one Vlad mentions!)

 - we should add a line to about:sessionrestore (which we do show after repeated crashes) which indicates that turning off D2D can solve stability problems; this should only be shown on systems that support D2D

I'm more concerned about "it might cause Firefox to be sluggish." The ideal would be to detect if this is the case, and adjust the value of the preference ourselves, or indicate (through an infobar) that we've turned D2D off due to performance issues.

Other than that, I think it's up to SUMO
(In reply to comment #4)
> Daring to disagree with my UX lead, here:

The nerve! ;)

>  - the option should be somewhere suitably hard to turn-off-by accident, but I
> think somewhere better than about:config. I suggest Advanced > General >
> Browsing, right below "Use smooth scrolling"

Right, I'm not super opinionated with where we put that control as long as it isn't on Prefs -> General. The main thing I wanted to have was a graceful Safe Mode recovery flow if we can detect crashes.

Do we have the capability to launch in Safe Mode if we crash repeatedly? I know we don't do it right now, but could we?
(In reply to comment #5)
> Do we have the capability to launch in Safe Mode if we crash repeatedly? I know
> we don't do it right now, but could we?

Sure; but right now the Safe Mode experience isn't really the greatest. I'd be happy to integrate Safe Mode, Session Restore, etc, into a "Jeepers, something's wrong" all along with diagnostic help. Totally off topic for this bug, though. Let's not lose track of it. I'll file and cc you.
Very interestingly, I just got this dialogue box on my Windows Vista VM:

http://grab.by/5YPu
(In reply to comment #7)
> http://grab.by/5YPu

Nice. We can let them do that work for us. I'm pretty sure that users won't map "Vista Basic" to "Hardware Acceleration is Off", but I'm also pretty sure that those users aren't the ones who will be counting fish in demos.
(In reply to comment #8)
> (In reply to comment #7)
> > http://grab.by/5YPu
> 
> Nice. We can let them do that work for us. I'm pretty sure that users won't map
> "Vista Basic" to "Hardware Acceleration is Off", but I'm also pretty sure that
> those users aren't the ones who will be counting fish in demos.

We've also seen people that use Vista Basic but were eager to get hardware acceleration in FF though. We should have an accessible option for them to switch it on anyway.
Should this depend on bug 590335?
blocking2.0: --- → ?
Whiteboard: [strings]
So is the current plan to default to no acceleration when Glass is turned off? This doesn't sound right. It makes perfect sense for Windows to not be accelerated when it needs to do less work, but I wouldn't think that Aero Basic or Classic make rendering web content substantially cheaper.
It'd be nice when users turn hardware acceleration off for them to have an option to send driver/debug information to Mozilla, perhaps with a note as to why they have turned it off. It could help us identify problematic driver versions to blacklist or versions for QA to test/investigate a lot quicker...
(In reply to comment #11)
> So is the current plan to default to no acceleration when Glass is turned off?

It's a proposal, yes, if we think that's a decent proxy. Obviously you don't! My feeling was that if there was an OS-level "turn off HW acceleration", we should observe it. Are you saying other Windows applications don't do that?

I think the initial phase here should be:
 - add the user-visible pref to Prefs > Advanced > General under the smooth scrolling preference
 - make it "Use Hardware Graphics Acceleration"
 - force the pref off when in Safe Mode
 - disable the pref when the user doesn't have the appropriate graphics h/w

(In reply to comment #12)
> It'd be nice when users turn hardware acceleration off for them to have an
> option to send driver/debug information to Mozilla, perhaps with a note as to

That sort of automatic service won't be containable, but we could add a "More..." link beside the pref which launches a SUMO webpage that talks about Hardware Acceleration.
blocking2.0: ? → beta5+
Keywords: user-doc-needed
(In reply to comment #13)
> My feeling was that if there was an OS-level "turn off HW acceleration", we
> should observe it. Are you saying other Windows applications don't do that?

Beyond games, I don't know. But why would they? Glass needs hardware support, Basic doesn't. There doesn't seem to be a link to what applications need.

The only reason I can think of would be energy efficiency, i.e. turning on the graphics hardware only for Firefox could be a net loss. Some users will care about this (e.g. those disabling glass to save energy), others won't. Anyway, I didn't have the impression that this was a concern in this bug so far.
This builds on the pref in bug 590335 and makes it visible in the Advanced section of the preferences dialog.
Assignee: nobody → joe
Attachment #469650 - Flags: ui-review?(beltzner)
Attachment #469650 - Flags: review?
Depends on: 590335
Attachment #469650 - Flags: review? → review?(gavin.sharp)
Attachment #469650 - Flags: review?(gavin.sharp) → review+
Comment on attachment 469650 [details] [diff] [review]
add "Disable hardware acceleration" pref to Advanced > General

I'd recommend changing the label to be "Enable hardware acceleration" and checking the box by default instead.

Having double negatives ("disable disable hardware acceleration") always ends up being weird.
The problem is that it doesn't actually enable hardware acceleration. It could be "Allow hardware acceleration," though!
Yup, or "Use hardware acceleration when available".
Attachment #469650 - Attachment is obsolete: true
Attachment #469727 - Flags: ui-review?(limi)
Attachment #469727 - Flags: review?(gavin.sharp)
Attachment #469650 - Flags: ui-review?(beltzner)
Attachment #469727 - Flags: review?(gavin.sharp) → review+
Comment on attachment 469727 [details] [diff] [review]
Change "disable hardware acceleration" to "allow hardware acceleration"

Can't wait to see this in German!
Attachment #469727 - Flags: ui-review?(limi) → ui-review+
Doesn't D3D9 layers qualify as HW acceleration as well? Should the string be more specific or do we not care?
Component: Graphics → Preferences
Product: Core → Firefox
QA Contact: thebes → preferences
Version: unspecified → Trunk
We don't care, I think.

FWIW, if we're looking to save space, I think we can safely shave "when available" off this string. I understand why it's there, but don't think it's really necessary.
At some later date, we will make this control D3D9 (and OpenGL!) accelerated layers too.
Realized last night that this should only be on Windows, because in beta 5 we don't support hardware acceleration on other platforms, and this pref as-is only affects d2d anyways.
Attachment #469727 - Attachment is obsolete: true
Attachment #469977 - Flags: review?(gavin.sharp)
Attachment #469977 - Flags: review?(gavin.sharp) → review+
Whiteboard: [strings] → [strings][has reviewed patch]
http://hg.mozilla.org/mozilla-central/rev/28408b39ee0c
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
> I know that there's a differing opinion that says that games ship with hardware
acceleration controls in their main menu

Many Windows games have an extra configuration app that automatically runs the first time or every time the game starts and/or is accessible through the start menu.


>  - disable the pref when the user doesn't have the appropriate graphics h/w

That's certainly a good idea! I believe some users would prefer this over a setting that only works "if [something is] available".
(In reply to comment #20)
> Comment on attachment 469727 [details] [diff] [review]
> Change "disable hardware acceleration" to "allow hardware acceleration"
> 
> Can't wait to see this in German!

"Hardwarebeschleunigung erlauben"

That wasn't too bad, was it? ;)
Flags: in-litmus?
Sorry to (ab)use this bug, but there’s still a duplicate access key for this pref in today’s en-US version. Could anyone fix it prior to release?

(Ever since ‘Help’ got a key, I’d be careful when choosing ‘h’ elsewhere.)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: