Closed Bug 1703142 Opened 8 months ago Closed 5 months ago

(Snap) WebRender disable by default in FF87 in Ubuntu 20.10

Categories

(Core :: Graphics: WebRender, defect, P3)

Firefox 87
Desktop
Linux
defect

Tracking

()

RESOLVED FIXED
91 Branch
Tracking Status
firefox90 --- fixed
firefox91 --- fixed

People

(Reporter: eduardo.rojasr, Assigned: olivier)

References

(Blocks 2 open bugs)

Details

Attachments

(3 files)

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

Steps to reproduce:

Update FireFox Ubuntu Snap to FF87 in Ubuntu 20.10

Actual results:

WebRender gets disable by default

Expected results:

WebRender remain enable by default since FF86 Snap webrender in the snap version is enable by default and works with Ubuntu 20.10.
I did a "revert" in the snap to go from 87 to 86 version and in FF86 snap the webrender is enable by default, update again to FF 87 and its get disable by default

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

Component: Untriaged → Graphics
Product: Firefox → Core

Can you provide your about:support from FF87? (when webrender is disabled)

Flags: needinfo?(eduardo.rojasr)
Component: Graphics → Graphics: WebRender
Flags: needinfo?(eduardo.rojasr)

This is the about:support out put

(In reply to Timothy Nikkel (:tnikkel) from comment #2)

Can you provide your about:support from FF87? (when webrender is disabled)

Sure, here is the text of about:support

thanks for looking at it

Do you know what we changed for this configuration?

Flags: needinfo?(aosmond)

We switched to using EGL for the glxtest configuration which has limitations on determining the device ID:

GPU #1
Active: Yes
Description: Mesa DRI Intel(R) HD Graphics 520 (SKL GT2)
Vendor ID: 0x8086
Device ID: Mesa DRI Intel(R) HD Graphics 520 (SKL GT2)
Driver Vendor: mesa/i965
Driver Version: 20.0.8.0
RAM: 0

Yep, the device ID isn't detected properly (it is a description rather than a hex number). The critical log says:

(#0) Error: glxtest: libpci missing

So it wasn't able to fallback to libpci to figure out the device ID. So right now this is expected behaviour.

Flags: needinfo?(aosmond)
Severity: -- → S4
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Unspecified → Linux
Priority: -- → P3
Hardware: Unspecified → Desktop

Just in case is helpful, I tested the apt package of FF87 in Ubuntu 20.10 and there WebRender was enable by default too

I can confirm the observations in comment #7.
I rebuilt the snap with the addition of libpci3 as a stage package, and I'm now seeing a different error:

(#0) Error	No GPUs detected via PCI
(#1) Error	glxtest: process failed (received signal 11)

I'm seeing a couple of apparmor denials that might explain error #0:

abr 09 20:48:33 dantian audit[66533]: AVC apparmor="DENIED" operation="open" profile="snap.firefox.firefox" name="/sys/devices/pci0000:00/0000:00:1c.0/0000:01:00.0/0000:02:00.0/0000:03:00.0/resource" pid=66533 comm="firefox-bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
abr 09 20:48:33 dantian kernel: audit: type=1400 audit(1617994113.089:305): apparmor="DENIED" operation="open" profile="snap.firefox.firefox" name="/sys/devices/pci0000:00/0000:00:1c.0/0000:01:00.0/0000:02:00.0/0000:03:00.0/resource" pid=66533 comm="firefox-bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0

Error #1 requires further investigation.

I'm seeing these entries in the journal, which I suspect correspond to error #1:

firefox-bin[101686]: segfault at 0 ip 00007f97d31fdcd7 sp 00007ffcc03b2640 error 6 in libxul.so[7f97d0d16000+5471000]

I straced the snap, but didn't find anything obvious that might explain the segfault. From what I gather by skimming through the code, firefox forks to run the EGL test, and presumaly that child process is crashing, but I'm not sure how to enable more verbose logging to understand why it does.

I was able to get the firefox snap to detect my GPU (and thus enable WebRender) by adding the following two rules to the generated apparmor profile (/var/lib/snapd/apparmor/profiles/snap.firefox.firefox) and reloading it:

/sys/devices/pci0000:00/0000:00:*.*/* r,
/sys/devices/pci0000:00/0000:00:*.*/**/* r,

That's not a solution though, these rules are far too permissive to be acceptable by snapd.

Duplicate of this bug: 1707841

Adding the hardware-observe plug and connecting it, together with the addition of libpci3 as a stage package, is enough to make GPU detection work again.

Before I go ahead and submit these changes, I've made a request for comments on the snapcraft forum.

Assignee: nobody → olivier
Status: NEW → ASSIGNED
Pushed by mozilla@kaply.com:
https://hg.mozilla.org/integration/autoland/rev/37328b26da57
enable GPU detection using libpci in the snap. r=mkaply DONTBUILD

Comment on attachment 9221147 [details]
Bug 1703142 - enable GPU detection using libpci in the snap.

Beta/Release Uplift Approval Request

  • User impact if declined: Users of the firefox snap won't benefit from hardware-accelerated rendering.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Only affects the snap package.
  • String changes made/needed:
Attachment #9221147 - Flags: approval-mozilla-beta?

Actually, it was bug 1717216 that caused the failure I think.

I should have spaced these apart better.

There are some intermittent failures in the snap store at the moment, see https://status.snapcraft.io/, and this is what is causing builds to fail.
Not linked to the actual changes, builds should be retried when the snap store's status is back to normal.

Thanks. I'll keep an eye on the status and reland then.

Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 91 Branch

Comment on attachment 9221147 [details]
Bug 1703142 - enable GPU detection using libpci in the snap.

approved for 90.0b12

Attachment #9221147 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

And the snap store auto-connection request was granted and is now live.

You need to log in before you can comment on or make changes to this bug.