Firefox has weird visual artifacts when loaded some of the time
Categories
(Core :: Graphics: WebRender, defect)
Tracking
()
People
(Reporter: thecount, Unassigned, NeedInfo)
References
(Blocks 2 open bugs)
Details
(Keywords: correctness)
Attachments
(4 files)
I've tried a few things to try to narrow this down as best I can.
What I know.
When it happens, it looks like the window has no background, and just copies what is behind it, if I move the window around, I see visual artifacts.
It only happens sometimes, but once it happens only closing and reopening the browser can fix it. Once it loads and it is good, it's good until I close it again.
It can happen on the profile select screen too.
If I set gfx.webrender.software
or layers.acceleration.disabled
to true, or set an env export MOZ_ACCELERATED=0
the issue goes away.
Info about my system.
I primarily use nightly or locally built Firefox's.
I'm using Fedora 34, I have an nvidia gpu, using X11, and Gnome 40.5.
The laptop is a Razer Blade 15 Advanced Model - QHD 240Hz - GeForce RTX 3080
Comment 1•3 years ago
|
||
Thanks for the report! Please open about:support, click on "Copy text to clipboard" and paste it here.
Please attach a screenshot of the artifacts.
Comment 2•3 years ago
|
||
It only happens sometimes, but once it happens only closing and reopening the browser can fix it. Once it loads and it is good, it's good until I close it again.
Given that this is on Nvidia, is there a chance that it only happens after a suspend/resume cycle with Firefox open?
Reporter | ||
Comment 3•3 years ago
|
||
Reporter | ||
Comment 4•3 years ago
|
||
Reporter | ||
Comment 5•3 years ago
|
||
Reporter | ||
Comment 6•3 years ago
|
||
Comment 7•3 years ago
|
||
-
Do you use NVIDIA Prime? If yes, would selecting "Intel (Power Saving Mode)" fix the problem? (bug 1739259)
-
Can this bug be fixed by starting Nightly with the following environment variable? (bug 1745172)
$ __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json path/to/firefox
Reporter | ||
Comment 8•3 years ago
|
||
(In reply to Darkspirit from comment #7)
- Do you use NVIDIA Prime? If yes, would selecting "Intel (Power Saving Mode)" fix the problem? (bug 1739259)
No I do not believe I am using Nvidia Prime, but I'm not sure if I would I know if I am. I didn't install it, and in nvidia x server settings, I don't see that option. If it's there, it was there by default.
- Can this bug be fixed by starting Nightly with the following environment variable? (bug 1745172)
$ __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json path/to/firefox
No, it doesn't look like setting this env did anything.
Comment 9•3 years ago
|
||
The severity field is not set for this bug.
:bhood, could you have a look please?
For more information, please visit auto_nag documentation.
Comment 10•3 years ago
|
||
Glenn, have you seen this behavior before?
Comment 11•3 years ago
|
||
Does setting gfx.webrender.max-partial-present-rects
to be 0 and then restarting the browser prevent the issue?
Reporter | ||
Comment 12•3 years ago
•
|
||
No, it doesn't seem to fix it.
Sorry for the delay.
Reporter | ||
Comment 13•3 years ago
•
|
||
Updated this comment a bunch because it initially gave me a a false positive.
Then took a bit to reproduce the error, as is sometimes an issue with intermittent things like this.
Setting gfx.webrender.max-partial-present-rects to 0 does not fix it.
Comment 14•3 years ago
|
||
There's a couple of interesting things from your about:support
. It was taken when you're running software webrender, but that shouldn't affect the info below:
GPU #1
Active: Yes
Description: Mesa Intel(R) UHD Graphics (TGL GT1)
Vendor ID: 0x8086
Device ID: 0x9a60
Driver Vendor: mesa/iris
Driver Version: 21.1.8.0
RAM: 0
GPU #2
Active: No
Vendor ID: 0x10de
Device ID: 0x24dc
Diagnostics
This tells us:
- Firefox can see two GPUs in your system.
- The Intel GPU is what's being used for drawing when acceleration / hw-wr is enabled.
- We only see a vendor / device ID for the nvidia GPU, there's no description of it (not sure if this is normal for 2nd GPU, but I think it should have a description, maybe it's a device id we don't recognize?).
So, I suspect what we're seeing here is a driver bug (I'm guessing you'd also prefer to be using the nvidia GPU given that you have two displays attached for performance reasons, but that's a separate follow up question).
It sounds like you have the nvidia proprietary driver installed - it's been a while since I used that, but there might be a way in the nvidia settings to configure firefox to run with the nvidia GPU.
I generally use ubuntu-based systems, so I don't know fedora very well. Would it be possible / easy to try updating either the mesa / intel driver or the nvidia driver? A non-destructive way to test this might be to download and test a live version of fedora 35 and see if it reproduces on a live system boot?
Comment 15•3 years ago
|
||
From what friends of mine who have intel+nvidia laptop configurations on Linux have said, nvidia prime offloading is pretty broken, this issue likely affects more than just Firefox but I would be interested to understand the mechanism if there is something we can do about it.
Comment 16•3 years ago
|
||
There is fairly extensive documentation for using nvidia prime offloading on Fedora here, Firefox may behave more consistently if you force it to offload or not offload: https://rpmfusion.org/Howto/Optimus#PRIME_Render_Offload
There may also be a "Run with dedicated graphics" option in the Gnome app menu where you can launch Firefox, mentioned by a user on a thread I saw.
Given the multi-process architecture we may be able to add a setting for whether to use the intel or nvidia driver inside Firefox settings, but I am not sure if that's the best solution at hand.
Updated•2 years ago
|
Comment 17•2 years ago
|
||
NI - I will take another look at this, we need to determine which WM (Gnome 3?) and other details of the environment. I am likely able to repro this on my personal laptop but I'll need to set up Optimus.
Updated•10 months ago
|
Description
•