Closed Bug 1768358 Opened 2 years ago Closed 1 month ago

Xwayland/NVIDIA 470: Firefox freezes on startup [@ WebRenderLayerManager::Initialize]

Categories

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

Firefox 100
Desktop
Linux
defect

Tracking

()

RESOLVED INACTIVE
Tracking Status
firefox100 --- affected
firefox101 --- affected
firefox102 --- affected

People

(Reporter: slewsys, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: crash, hang)

Crash Data

Attachments

(3 files)

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

Steps to reproduce:

Open Firefox Developer Edition 101.0b3 under Wayland (Ubuntu 22.04)

Actual results:

Firefox freezes with a transparent frame and eventually times out with system reporting "firefox-aurora" is not responding.

Expected results:

Display web page on start up, as it does when opened under X11 server alone.

What may be new on Ubuntu 22.04 is that, when running Wayland, there are actually two sessions - one X11 and one Wayland, as can be observed by running the (systemd) command:

$ loginctl | awk '/tty/ { print $1 }' | while read pid; do loginctl show-session $pid -p Type $pid; done

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

Component: Untriaged → Widget: Gtk
Product: Firefox → Core

I have the same problem with the Release-version (Mozilla/5.0 (X11; Linux x86_64; rv:100.0) Gecko/20100101 Firefox/100.0)
On Fedora 35 using Gnome/Wayland.

For me it can be fixed by restarting Browser.
Maybe some sort of race-condition only happening at the first start (after booting the system)?

Flags: needinfo?(slewsys)
Flags: needinfo?(roidal)
Flags: needinfo?(slewsys)

Upon sending a SIGSEGV, a Firefox crash report dialog appears, from which I'm able to copy some telemetry. But it appears that the report never actually gets written to disk. Firefox 101 consistently freezes hard on start up under Ubuntu 22.04.

By the way, I'm not seeing any issues with Firefox 100 Ubuntu 22.04 nor with Firefox 101.0b4 on Fedora 36. The issue seems to be very specific to Firefox 101 on Ubuntu 22.04.

One more data point: Firefox 101.0b4 on Ubuntu 22.04 does NOT freeze when run in safe mode - i.e., firefox --safe-mode.

Looks like a freeze in NVIDIA binary drivers during WebRender init, it's in Render thread / mozilla::gl::GLContextEGL::SwapBuffers().

Component: Widget: Gtk → Graphics: WebRender
Summary: Firefox Developer Edition (firefox-101.0b3) freezes on start up under Wayland → [NVIDIA/Wayland] Firefox Developer Edition (firefox-101.0b3) freezes on start up under Wayland [@ WebRenderLayerManager::Initialize]

Just for info:

I'am using the radeonsi from mesa 21.3.8
So does not seem to be a nvidia-related Problem?

Flags: needinfo?(roidal)

(In reply to roidal from comment #9)

Just for info:

I'am using the radeonsi from mesa 21.3.8
So does not seem to be a nvidia-related Problem?

The Crash ID: bp-e611334e-3f0c-4e3e-9458-1580e0220510 provided by slewsys is caused by NVIDIA. If you use Radeon please file a new bug as it may be something different.
Thanks.

Does this happen with the latest 495 and/or 510 drivers? From what I can tell your GPU should be supported by the newer driver sets.

Blocks: wayland
Flags: needinfo?(slewsys)
Severity: -- → S3
OS: Unspecified → Linux
Priority: -- → P3
Hardware: Unspecified → Desktop

Please open about:support, click on "Copy text to clipboard" and paste it here so that we are 100% sure about whether you use Wayland or Xwayland.

AdapterDriverVersion: 470.103.1.0

Having driver 470 (=minimum required version for hardware rendering: bug 1742994) might be the reason alone
because it doesn't fully support Wayland.
Please upgrade to Nvidia driver 495 or >= 510.

Ubuntu switched its Firefox build from Wayland to back to xwayland because Mozillas hasn't officially shipped Wayland yet.
Xwayland/Nvidia can be broken of multiple reasons (nvidia driver version, egl-wayland version, xwayland version, multiple graphics cards, etc, bug 1717715). X11/Nvidia has worse performance than Wayland/Nvidia (bug 1736245).
IIUC, Native Wayland should always be preferred on Nvidia.

In case this problem also occurs with 495 or >= 510, please check if starting Firefox with MOZ_ENABLE_WAYLAND=1 environment variable avoids the problem:
$ MOZ_ENABLE_WAYLAND=1 snap run firefox (bug 1767231 has been fixed)
$ MOZ_ENABLE_WAYLAND=1 path/to/firefox

Blocks: wr-nv-linux
Crash Signature: [@ __futex_abstimed_wait_cancelable64 ]
Summary: [NVIDIA/Wayland] Firefox Developer Edition (firefox-101.0b3) freezes on start up under Wayland [@ WebRenderLayerManager::Initialize] → [NVIDIA 470/Wayland] Firefox Developer Edition (firefox-101.0b3) freezes on start up under Wayland [@ WebRenderLayerManager::Initialize]

I am unable to post the contents of about:support because the browser freezes long before that - all that appears on screen is a transparent frame until the system reports "firefox-aurora is not responding". Forcing Wayland does not change that:

$ MOZ_ENABLE_WAYLAND=1 /usr/lib/firefox-dev/firefox

Exiting due to channel error.
Exiting due to channel error.
Killed

For what it's worth, the snap version of Firefox shipped by Ubuntu, version 100, does run under Wayland, not Xwayland.

I'll upgrade the display driver from Nvidia 470 to 510 then report back here .

Flags: needinfo?(slewsys)

First of all, I stand corrected: Ubuntu 22.04 snap Firefox v100 does use Xwayland protocol as you indicated.

Upgrading to Nvidia driver 510 resolved the issue with Firefox v101. It still uses Xwayland by default, but adding the environment variable MOZ_ENABLE_WAYLAND=1 allows Firefox 101 to use Wayland protocol. Both appear to work without issue now. The attached contents of about:support is for Firefox 101.0b7 / Wayland. Thank you for your assistance!

It is possible to force Firefox to always use Wayland protocol by creating a file /etc/environment.d/60firefox.conf with the contents:

MOZ_ENABLE_WAYLAND=1

After reboot, that will be added to each user's environment. See man environment.d.

No longer blocks: wayland
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: crash, hang
Summary: [NVIDIA 470/Wayland] Firefox Developer Edition (firefox-101.0b3) freezes on start up under Wayland [@ WebRenderLayerManager::Initialize] → Xwayland/NVIDIA 470: Firefox freezes on startup [@ WebRenderLayerManager::Initialize]

I have the same problem. Firefox 100 starts with an empty window and freezes until it gets killed by timeout. The second start succeeds, but all my tabs, even pinned tabs, are gone. I had 11 pinned and 2 unpinned tabs opened before closing firefox yesterday.

I'm on KUbuntu 20.04 with Plasma 5.18.8 on X11. Please see attached about:support report.

Unfortunetly I can't update my NVIDIA driver higher than 470 because my NVIDIA GeForce GT 640 only got support until 470. I tried to install the next generally available version 510 from package repositories and fiddled arround for about an hour, but got nothing other than a black screen. So i reverted back to 470 and Plasma with X11 started working again.

I would normally buy a newer graphics card on this point, but unfortunetly this is my works PC, so I'm out of luck here.

Closing because no crashes reported for 12 weeks.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WORKSFORME

I hit this twice today, FWIW, with Firefox Nightly on Ubuntu 22.04. --> Reopening.

Here are my crash reports:
bp-ef4c1779-a5ff-48e7-993d-503cd0230126
bp-754c1040-1014-48a9-8886-ca07a0230126

I don't have concrete STR, but here's a brief description while it's fresh in my memory:

  • I thought Firefox was not running (the first time, I was coming back after having my computer suspended with no Firefox windows visible. The second time, I had just done File|Quit on my main Firefox browsing session).
  • Then I tried to start Firefox (Super key, type "firefox", hit enter), and I got an error dialog telling me that Firefox was already running.
  • I clicked "OK" on that dialog, checked top, and sure enough, there was some sort of Firefox process running, with no visible windows. I killed that process with kill -11 [pid] to kill the process and generate a crash report, which is how I got those two^ crash reports.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Status: REOPENED → RESOLVED
Closed: 2 years ago1 month ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: