Open Bug 1755204 Opened 2 years ago Updated 2 years ago

WebRender is running in software mode when using Nvidia prime offloading

Categories

(Core :: Graphics: WebRender, defect)

Firefox 97
x86_64
Linux
defect

Tracking

()

UNCONFIRMED

People

(Reporter: sha265k, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: QA-not-reproducible)

Attachments

(4 files)

I'm running FF on a laptop running Ubuntu 20.04 with an Intel integrated GPU, and a dedicated NVIDIA GPU (driver version 510). Nvidia drivers have the option to offloading processing with NVIDIA PRIME On-Demand profile.

But when I'm trying to run FF with PRIME offloading, I see WebRender is running in software mode, which is not good.

I'm running FF like this: __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia firefox

If I'm running FF regulary, FF uses the integrated intel GPU, which is much slower, and much more heavyon the CPU.

Thanks for the report! Please open about:support, click on "Copy text to clipboard" and paste it here.

Please add the about:supports for both cases, running on the integrated GPU and on the discrete one. Thanks!

Blocks: wr-nv-linux
```

```

If I'm running FF regulary, FF uses the integrated intel GPU, which is much slower, and much more heavyon the CPU.

It's unrelated to the bug itself but I'm a bit surprised about this claim. I'd expect the Intel GPU to be easily fast enough for browsing[1], having a similar performance for WebGL (because on Mesa we can use the dmabuf fast paths) and not really be heavier on the CPU. But good to know, assuming you measured this / are certain about it, at least on your setup.

1: edit: given that this is on FullHD, not 8K or something.

assuming you measured this / are certain about it, at least on your setup

It's hard to say I did real measurements, but I did see pretty high CPU utilization when playing (some?) 1080p videos.

(In reply to sha-265 from comment #6)

It's hard to say I did real measurements, but I did see pretty high CPU utilization when playing (some?) 1080p videos.

In that case the claim does not make much sense. By default, Firefox is still using software decoding. There's is experimental support for hardware decoding via VAAPI (hopefully to get enabled by default soon), but it will only work on the Intel GPU (if you don't install the extremely experimental nvidia-vaapi-driver).

By default, Firefox is still using software decoding.

Oh, that explains a lot. For some reason I thought FF already support hardware decoding by default.

The failure log in comment 3 indicates that we failed to create an OpenGL context, but it's unfortunate that we don't capture any more logging than that.

sha-265, could you please attach the output of glxinfo under that setup? Does starting firefox from a terminal give any more useful output? Do other opengl applications work correctly?

Severity: -- → S3
Flags: needinfo?(sha265k)
This is the output when running `glxinfo` with prime offloading

I can't see anything useful in terminal except when launching FF:

[GFX1-]: Failed GL context creation for WebRender: 0
[GFX1-]: FEATURE_FAILURE_WEBRENDER_INITIALIZE_UNSPECIFIED
[GFX1-]: Failed to connect WebRenderBridgeChild.
[GFX1-]: Fallback WR to SW-WR

And I think I'm running some games that are using opengl, and they are running as expected using the dedicated GPU.

Flags: needinfo?(sha265k)

Thanks!

Any idea why the context creation might be failing here, Robert? Do we need to add more logging to that code path?

Flags: needinfo?(robert.mader)

(In reply to Jamie Nicol [:jnicol] from comment #12)

Thanks!

Any idea why the context creation might be failing here, Robert? Do we need to add more logging to that code path?

Not really. My intuition points to something being wrong in libglvnd, but that's a shot into the dark (and I also don't have a system to reproduce yet). More logging would certainly be helpful :)

Flags: needinfo?(robert.mader)
See Also: → 1739259
See Also: → 1755424
Attached image va-info.png

Hello! I have tried to install the nvidia-vaapi-driver and I get the following error after installation on Ubuntu 20.04.
Adding the QA-not-reproducible tag.
If there is any solution and someone can point me in the right direction I will gladly try to reproduce it again.
Thank you!

Whiteboard: QA-not-reproducible
Blocks: 1782834
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: