Open Bug 1839130 Opened 1 year ago Updated 6 months ago

[Flatpak] Nvidia+AMD dual GPU: WebGL not working on flatpaked firefox

Categories

(Firefox Build System :: Third Party Packaging, defect, P3)

Unspecified
Linux
defect

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: jjcasmar, Unassigned)

References

(Blocks 3 open bugs, )

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/114.0

Steps to reproduce:

I have a system with two GPUs, a nVidia one and a AMD one. In that system, I can run firefox normally with WebGL. However, if instead of using the "native" version of firefox, I use the flatpaked one, WebGL doesn't work.

Actual results:

When I run flatpak run org.mozilla.firefox, I get the following error

flatpak run org.mozilla.firefox                                                                            
[GFX1-]: glxtest: libEGL no display
[GFX1-]: glxtest: EGL test failed
[GFX1-]: More than 1 GPU vendor detected via PCI, cannot deduce vendor

[GFX1-]: PCI candidate 0x10de/0x1e84

[GFX1-]: PCI candidate 0x1002/0x743f

I have read several bug reports that says that the error itself is not a real issue and its harmless. However, I have no WebGL.

Expected results:

WebGL should work

Attached file about:support report
about:support reports the following

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

Component: Untriaged → Graphics: WebRender
Product: Firefox → Core
Component: Graphics: WebRender → Graphics
OS: Unspecified → Linux
Summary: WebGL not working on flatpaked firefox → Nvidia+AMD dual GPU: WebGL not working on flatpaked firefox

Kelsey, any ideas who would be the right person to ask about this?

Severity: -- → S2
Flags: needinfo?(jgilbert)

Any update on this?

Given that this only happens with Flatpak, let's reduce severity to S3.

Severity: S2 → S3

I think Flatpak issues are generally related to sandboxing, but whether our fault or theirs is TBD.

Severity: S3 → --
Component: Graphics → Security: Process Sandboxing
Flags: needinfo?(jgilbert)
Component: Security: Process Sandboxing → Third Party Packaging
Product: Core → Firefox Build System
Version: Firefox 114 → unspecified

Martin, is this something you can help with?

Flags: needinfo?(stransky)

(In reply to Kelsey Gilbert [:jgilbert] from comment #7)

I think Flatpak issues are generally related to sandboxing, but whether our fault or theirs is TBD.

In this case it's affecting glxtest, so it's not our sandbox.

It may help that glxtest is a separate executable now, so it's possible to do flatpak run --command=/app/lib/firefox/glxtest org.mozilla.firefox to run it in the Flatpak sandbox. This would need a little more work to run it under a debugging tool like strace or gdbserver, but there might be less invasive ways of troubleshooting this, like Mesa's environment variables (I'm not a graphics expert so I don't know exactly which ones might help).

Reporter, first of all please test latest version and then run Firefox/flatpak from terminal as:

flatpak run --env=MOZ_GFX_DEBUG=1 org.mozilla.firefox

and attach the output here.
Thanks.

Flags: needinfo?(stransky) → needinfo?(jjcasmar)
Blocks: flatpak
Summary: Nvidia+AMD dual GPU: WebGL not working on flatpaked firefox → [Flatpak] Nvidia+AMD dual GPU: WebGL not working on flatpaked firefox

Hi,

apparently the issue has nothing to do with firefox. Its an issue in flatpak. Since I have 2 GPUs, I have defined several environment variables on the host system, __GLX_VENDOR_LIBRARY_NAME, __EGL_VENDOR_LIBRARY_FILENAMES and VK_ICD_FILENAMES. Flatpak picks this variables for the container, and inside the container the libraries are in other locations, so it doesn't find them.

https://github.com/flatpak/flatpak/issues/5543

Flags: needinfo?(jjcasmar)

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

For more information, please visit BugBot documentation.

Flags: needinfo?(lissyx+mozillians)
Severity: -- → S3
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: