Closed Bug 1735784 Opened 3 years ago Closed 3 years ago

Firefox window contents occasionally black or inconsistent

Categories

(Core :: Widget: Gtk, defect)

Firefox 93
x86_64
Linux
defect

Tracking

()

RESOLVED DUPLICATE of bug 1723323

People

(Reporter: andysem, Unassigned)

Details

Attachments

(1 file)

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

Steps to reproduce:

This issue does not reproduce reliably. Sometimes, when you switch to other windows while Firefox is running in background, switching back to Firefox makes its window black, completely or partly. E.g. some rectangular parts of the currently open web page and interface may be drawn while others are black or inconsistent (with unrelated content).

Often, when this happens, UI gets redrawn immediately, so you only see a black blink for a frame or two. At other times, the inconsistent image may persist for longer times, e.g. until you hover mouse over Firefox or click on something.

I have also noticed a similar issue when switching between tabs without Firefox losing focus. Though in this case the content tends to be redrawn immediately, so you only see that the content blinks.

I cannot provide a screenshot because as soon as I launch the screenshot capture program, the UI tends to get redrawn.

It is fairly likely that this is related to Nvidia drivers. As an additional information, in case it's related, I have seen similar problems with KWin (KDE window manager) and I had to disable the use of GLX_EXT_buffer_age by setting KWIN_USE_BUFFER_AGE=0 globally. I don't know if Firefox is using something similar internally.

Actual results:

Occasional black or inconsistent content in Firefox window.

Expected results:

No content corruption is expected.

Attached file about:support page contents (deleted) —

Here are the relevant environment variables that are set globally on my system:

KWIN_TRIPLE_BUFFER=1
KWIN_USE_BUFFER_AGE=0
KWIN_PERSISTENT_VBO=1
__GL_YIELD="USLEEP"
__GL_SYNC_TO_VBLANK=1
__GL_THREADED_OPTIMIZATIONS=1
__GL_SHADER_DISK_CACHE_SIZE=4294967296

TripleBuffer is enabled in xorg.conf.

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

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

Thanks for the report! This bug is known.
It can also be caused by hovering taskbar entries which then show a small preview image of Firefox. These steps can even freeze glxgears when KDE compositing is enabled.

For Firefox it can be fixed by setting
gfx.webrender.allow-partial-present-buffer-age = false
or
gfx.webrender.max-partial-present-rects = 0

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
OS: Unspecified → Linux
Hardware: Unspecified → x86_64
Resolution: --- → DUPLICATE

That bug investigates the issue with compositing disabled. In my case compositing is enabled. Are you certain this is a duplicate?

(In reply to andysem from comment #5)

That bug investigates the issue with compositing disabled. In my case compositing is enabled.

Can you confirm that this bug can be fixed by setting gfx.webrender.allow-partial-present-buffer-age=false or gfx.webrender.max-partial-present-rects=0 ?

Are you certain this is a duplicate?

It seems to be a KDE/Nvidia problem.

(In reply to Darkspirit from comment #6)

(In reply to andysem from comment #5)

That bug investigates the issue with compositing disabled. In my case compositing is enabled.

Can you confirm that this bug can be fixed by setting gfx.webrender.allow-partial-present-buffer-age=false or gfx.webrender.max-partial-present-rects=0 ?

I have set gfx.webrender.allow-partial-present-buffer-age to false and have been testing for an hour or so. Haven't seen the issue yet, although, as I said, I cannot reliably reproduce it.

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

Attachment

General

Creator:
Created:
Updated:
Size: