Closed Bug 1721053 Opened 3 years ago Closed 3 years ago

WebRenderer cannot support renderonly GPUs

Categories

(Core :: Graphics: WebRender, defect)

Firefox 89
defect

Tracking

()

RESOLVED DUPLICATE of bug 1730936

People

(Reporter: uwu, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

User Agent: Mozilla/5.0 (X11; AOSC OS; Linux aarch64; rv:89.0) Gecko/20100101 Firefox/89.0

Steps to reproduce:

Force enable WebRenderer on Pinebook Pro with Mesa 21.1.4(panfrost renderonly on rockchip-drm)

Actual results:

In console log there is:
Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: DRM device has no render node (t=1.84378) [GFX1-]: glxtest: DRM device has no render node
Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: DRM device has no render node (t=1.84378) |[1][GFX1-]: glxtest: Can't find render node name for DRM device (t=1.84397) [GFX1-]: glxtest: Can't find render node name for DRM device
Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: DRM device has no render node (t=1.84378) |[1][GFX1-]: glxtest: Can't find render node name for DRM device (t=1.84397) |[2][GFX1-]: No GPUs detected via PCI (t=1.84417) [GFX1-]: No GPUs detected via PCI
Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: DRM device has no render node (t=1.84378) |[1][GFX1-]: glxtest: Can't find render node name for DRM device (t=1.84397) |[2][GFX1-]: No GPUs detected via PCI (t=1.84417) |[3][GFX1-]: Failed GL context creation for WebRender: 0 (t=9.92532) [GFX1-]: Failed GL context creation for WebRender: 0
Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: DRM device has no render node (t=1.84378) |[1][GFX1-]: glxtest: Can't find render node name for DRM device (t=1.84397) |[2][GFX1-]: No GPUs detected via PCI (t=1.84417) |[3][GFX1-]: Failed GL context creation for WebRender: 0 (t=9.92532) |[4][GFX1-]: FEATURE_FAILURE_WEBRENDER_INITIALIZE_UNSPECIFIED (t=9.92551) [GFX1-]: FEATURE_FAILURE_WEBRENDER_INITIALIZE_UNSPECIFIED
Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: DRM device has no render node (t=1.84378) |[1][GFX1-]: glxtest: Can't find render node name for DRM device (t=1.84397) |[2][GFX1-]: No GPUs detected via PCI (t=1.84417) |[3][GFX1-]: Failed GL context creation for WebRender: 0 (t=9.92532) |[4][GFX1-]: FEATURE_FAILURE_WEBRENDER_INITIALIZE_UNSPECIFIED (t=9.92551) |[5][GFX1-]: Failed to connect WebRenderBridgeChild. (t=9.9261) [GFX1-]: Failed to connect WebRenderBridgeChild.
Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: DRM device has no render node (t=1.84378) |[1][GFX1-]: glxtest: Can't find render node name for DRM device (t=1.84397) |[2][GFX1-]: No GPUs detected via PCI (t=1.84417) |[3][GFX1-]: Failed GL context creation for WebRender: 0 (t=9.92532) |[4][GFX1-]: FEATURE_FAILURE_WEBRENDER_INITIALIZE_UNSPECIFIED (t=9.92551) |[5][GFX1-]: Failed to connect WebRenderBridgeChild. (t=9.9261) |[6][GFX1-]: Fallback (SW-)WR to Basic (t=9.92702) [GFX1-]: Fallback (SW-)WR to Basic

Expected results:

Webrenderer should be enabled, the render node is /dev/dri/renderD128

The Bugbug bot thinks this bug should belong to the 'Core::Graphics: WebRender' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Graphics: WebRender
Product: Firefox → Core

Thank you for filing!
What do you mean by "renderonly GPUs" ?
Could you please attach the "about:support" output?

I suppose the next steps would be to see what the DRM devices look like, and then determine why we aren't able to find one capable of rendering. Relevant code that iterates them is https://searchfox.org/mozilla-central/rev/77256682a1fe0e73c5ad34c593b1ecacfefdf4e1/toolkit/xre/glxtest.cpp#405

Blocks: wr-linux
Severity: -- → S3

Thanks for the report! Can you try latest nightly (92) and post what output you get there? Thanks!

Flags: needinfo?(icenowy)

(In reply to Dzmitry Malyshau [:kvark] from comment #2)

Thank you for filing!
What do you mean by "renderonly GPUs" ?
Could you please attach the "about:support" output?

I suppose the next steps would be to see what the DRM devices look like, and then determine why we aren't able to find one capable of rendering. Relevant code that iterates them is https://searchfox.org/mozilla-central/rev/77256682a1fe0e73c5ad34c593b1ecacfefdf4e1/toolkit/xre/glxtest.cpp#405

It's a GPU w/o display capability, and use DRM PRIME to output to another display-only DRM device.

In this case, there is /dev/dri/card[01], card0 being the display-only device and card1 being the renderonly device; renderD128 is bound to card1, but when doing DRI it's still using /dev/dri/card0 (Mesa will notice that it's a display-only device and try to probe renderonly device, and thus open renderD128)

The name renderonly is from https://gitlab.freedesktop.org/mesa/mesa/-/tree/main/src/gallium/auxiliary/renderonly .

Hm, looks to me like there are at least three issues here:

The first two are probably more or less expected on such hardware, but the last one is pretty weird - we're just asking mesa to give us a context. So something fishy is going on - your about:support (from nightly) would probably help ;)

I just tried to enable WebRender (via gfx.webrender.all) on Libre Computer ROC-RK3399-PC with Ubuntu 21.10 and Mesa 21.1.4 - it works, at least about:support state that WebRender is in use. Kernel is Linux 5.12 from Armbian repository; Gnome Shell Wayland session, Firefox own Wayland support is enabled (I never tested X11 on RK3399).

It's interesting that Pinebook Pro is somehow different while it supposed to be behave in exactly same way.

glxinfo -B and es2_info does not fail for you?

(In reply to russianneuromancer from comment #6)

I just tried to enable WebRender (via gfx.webrender.all) on Libre Computer ROC-RK3399-PC with Ubuntu 21.10 and Mesa 21.1.4 - it works, at least about:support state that WebRender is in use. Kernel is Linux 5.12 from Armbian repository; Gnome Shell Wayland session, Firefox own Wayland support is enabled (I never tested X11 on RK3399).

It's interesting that Pinebook Pro is somehow different while it supposed to be behave in exactly same way.

glxinfo -B and es2_info does not fail for you?

oops, I stick to X11.

Blocks: raspi
No longer blocks: wr-linux

Icenowy, is this still an issue for you? And do glxinfo -B and es2_info work for you?

Attached file stdout of es2_info
This issue does still affect me, or at least I think it does. This is all Firefox logs to the console for me: ``` $ firefox Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: DRM device has no render node (t=1.40106) [GFX1-]: glxtest: DRM device has no render node Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: DRM device has no render node (t=1.40106) |[1][GFX1-]: No GPUs detected via PCI (t=1.40442) [GFX1-]: No GPUs detected via PCI Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: DRM device has no render node (t=1.40106) |[1][GFX1-]: No GPUs detected via PCI (t=1.40442) |[2][GFX1-]: Failed to create EGLContext!: 0x3009 (t=1.58515) [GFX1-]: Failed to create EGLContext!: 0x3009 ``` In `about:support`, `WEBRENDER_COMPOSITOR` is "unavailable by runtime: Hardware Webrender requires DMAbuf support", and `DMABUF` in turn says "failed by runtime: Failed to configure". Here's my `glxinfo -B`: ``` name of display: :0 display: :0 screen: 0 direct rendering: Yes Extended renderer info (GLX_MESA_query_renderer): Vendor: Panfrost (0xffffffff) Device: Mali-T760 (Panfrost) (0xffffffff) Version: 22.0.4 Accelerated: yes Video memory: 2004MB Unified memory: yes Preferred profile: core (0x1) Max core profile version: 3.1 Max compat profile version: 3.1 Max GLES1 profile version: 1.1 Max GLES[23] profile version: 3.1 OpenGL vendor string: Panfrost OpenGL renderer string: Mali-T760 (Panfrost) OpenGL core profile version string: 3.1 Mesa 22.0.4 OpenGL core profile shading language version string: 1.40 OpenGL core profile context flags: (none) OpenGL version string: 3.1 Mesa 22.0.4 OpenGL shading language version string: 1.40 OpenGL context flags: (none) OpenGL ES profile version string: OpenGL ES 3.1 Mesa 22.0.4 OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10 ``` And here's my `es2_info`: ``` ```
Attached file output of "es2_info"
This issue does still affect me, or at least I think it does. This is all Firefox logs to the console for me: ``` $ firefox Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: DRM device has no render node (t=1.40106) [GFX1-]: glxtest: DRM device has no render node Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: DRM device has no render node (t=1.40106) |[1][GFX1-]: No GPUs detected via PCI (t=1.40442) [GFX1-]: No GPUs detected via PCI Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: DRM device has no render node (t=1.40106) |[1][GFX1-]: No GPUs detected via PCI (t=1.40442) |[2][GFX1-]: Failed to create EGLContext!: 0x3009 (t=1.58515) [GFX1-]: Failed to create EGLContext!: 0x3009 ``` In `about:support`, `WEBRENDER_COMPOSITOR` is "unavailable by runtime: Hardware Webrender requires DMAbuf support", and `DMABUF` in turn says "failed by runtime: Failed to configure". Here's my `glxinfo -B`: ``` name of display: :0 display: :0 screen: 0 direct rendering: Yes Extended renderer info (GLX_MESA_query_renderer): Vendor: Panfrost (0xffffffff) Device: Mali-T760 (Panfrost) (0xffffffff) Version: 22.0.4 Accelerated: yes Video memory: 2004MB Unified memory: yes Preferred profile: core (0x1) Max core profile version: 3.1 Max compat profile version: 3.1 Max GLES1 profile version: 1.1 Max GLES[23] profile version: 3.1 OpenGL vendor string: Panfrost OpenGL renderer string: Mali-T760 (Panfrost) OpenGL core profile version string: 3.1 Mesa 22.0.4 OpenGL core profile shading language version string: 1.40 OpenGL core profile context flags: (none) OpenGL version string: 3.1 Mesa 22.0.4 OpenGL shading language version string: 1.40 OpenGL context flags: (none) OpenGL ES profile version string: OpenGL ES 3.1 Mesa 22.0.4 OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10 ``` And here's my `es2_info`: ``` ```

Oh, whoops, I'm sorry for double posting two incomplete comments! Bugzilla prompted me to upload an attachment when I tried to paste the es2_info output, and I clicked "OK," but it told me it failed, so I tried again without realizing it had invisibly posted a comment.

Here's the output from Firefox when I enable dmabuf logging:

$ firefox --MOZ_LOG=Dmabuf:5
Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: DRM device has no render node (t=1.13067) [GFX1-]: glxtest: DRM device has no render node
Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: DRM device has no render node (t=1.13067) |[1][GFX1-]: No GPUs detected via PCI (t=1.13079) [GFX1-]: No GPUs detected via PCI
[Parent 10351: Main Thread]: D/Dmabuf wl_drm is available.
[Parent 10351: Main Thread]: D/Dmabuf zwp_linux_dmabuf_v1 is available.
[Parent 10351: Main Thread]: D/Dmabuf We're missing DRM render device!
[Parent 10351: Main Thread]: D/Dmabuf nsDMABufDevice::Configure()
[Parent 10351: Main Thread]: D/Dmabuf Loading DMABuf system library libgbm.so.1 ...
[Parent 10351: Main Thread]: D/Dmabuf Failed to create drm render device
Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: DRM device has no render node (t=1.13067) |[1][GFX1-]: No GPUs detected via PCI (t=1.13079) |[2][GFX1-]: Failed to create EGLContext!: 0x3009 (t=1.31137) [GFX1-]: Failed to create EGLContext!: 0x3009

It seems like Mesa still doesn't support EGL_EXT_device_drm_render_node on platforms with split display and render nodes. I can see if I can implement it there if that would help.

Thanks for the details!

The DMABUF / "DRM device has no render node" part is unfortunately expected and a duplicate of bug 1730936, which again is blocked by https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12796. I hope to get a Mali/Panfrost device soon to have a direct look. Changing the meta bug, as this bug is about pinebooks, not raspberry pis.

The "Failed to create EGLContext!" part is not expected though, thus not closing this bug as duplicate.

Blocks: wr-linux-pine64
No longer blocks: raspi
See Also: → 1730936

So there's already a Mesa MR! It looks like it's more difficult than it sounds.

I'll attach my about:support JSON to help diagnose the EGLContext message (which only shows up when gfx.webrender.all is set to true in about:config and hasn't had a noticeable effect for me). My device is a hacked Chromebook, not a Pinebook, but the two are very similar. :)

Attached file raw about:support data

My device is a hacked Chromebook, not a Pinebook, but the two are very similar. :)

Yep, that's what I'll likely get as well.

I'll attach my about:support JSON to help diagnose the EGLContext message

Thanks! From what I can see, you do get hardware webrender (see windowLayerManagerType) and the Failed to create EGLContext!: 0x3009 message is just a cryptic "Creating a context for GL 3.2 failed but creating a GLES 3.0 context succeeded". So in your case everything will be fine once the MR above is merged (and one less error message once Panfrost supports GL 3.2).

Since the original author is unresponsive and we don't know if the additional errors in comment 0 persist, I'll close this as duplicate for now.

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
See Also: 1730936
Flags: needinfo?(icenowy)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: