Open Bug 1777514 Opened 3 years ago Updated 1 year ago

Firefox becomes significantly slower when an external monitor is connected to a Dual GPU device

Categories

(Core :: Graphics, defect)

Desktop
Windows
defect

Tracking

()

People

(Reporter: bas.schouten, Unassigned, NeedInfo)

References

Details

Currently when an external monitor is connected to a laptop with multiple GPUs, most devices will switch the desktop to use the discrete GPU. If firefox is already open at this point, it will continue to use the integrated GPU, however the performance of using the integrated GPU device is now severely degraded. This creates a very poor experience from a performance perspective.

See Also: → 1777515

The severity field is not set for this bug.
:bhood, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(bhood)

Kelsey, I know you've been doing some issue testing lately involving multiple monitors. Is this something you can reproduce?

Severity: -- → S3
Flags: needinfo?(bhood) → needinfo?(jgilbert)

We kinda know this to be true architecturally.
We should really be watching for a change in the default adapter, and faking device loss when that happens to switch to the most-default adapter.
I think there's even an event or callback we can listen to for this case?

It looks like we should check IDXGIFactory1::IsCurrent():
https://docs.microsoft.com/en-us/windows/win32/api/dxgi/nf-dxgi-idxgifactory1-iscurrent
Docs basically say "if this returns false, app should re-enumerate adapters", so we should treat this as device-loss and rebuild everything in response.

Flags: needinfo?(jgilbert)

@gw How tricky is it to trigger/fake device-loss for WR?

Flags: needinfo?(gwatson)

I'm not sure - WR doesn't manage anything related to device, it just expects a current GL context to be bound during the update/render call. I assume (but haven't checked) that when device is lost, Gecko probably creates a new WR instance. Perhaps Jeff or Sotaro know more about how that is handled in Gecko?

Flags: needinfo?(sotaro.ikeda.g)
Flags: needinfo?(jmuizelaar)
Flags: needinfo?(gwatson)

Just triggering fake device-loss is easy. But on current gecko, the device reset handling is very heavy task.
It triggers re-creating all WebRenderLayerMangers under all BrowserChilds.
https://searchfox.org/mozilla-central/rev/a352cc827575823676717d53766c39710b54201a/dom/ipc/BrowserChild.cpp#3199

And we might need to update ID3D11Device usages of hw VideoDecoder, WebGL, and remote canvas.

Flags: needinfo?(sotaro.ikeda.g)
You need to log in before you can comment on or make changes to this bug.