Closed Bug 1717555 Opened 3 years ago Closed 2 years ago

"gfx.x11-egl.force-enabled=true" causes choppiness with scrolling

Categories

(Core :: Graphics, defect, P3)

Firefox 89
defect

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: validatedev, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(3 files, 1 obsolete file)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36

Steps to reproduce:

  1. change gfx.x11-egl.force-enabled=true
  2. change general.smoothScroll.mouseWheel.durationMaxMS=400
  3. change general.smoothScroll.mouseWheel.durationMinMS=200
    (step 2 and 3 are not necessary, but it shows more clearly that there is a choppiness)
  4. open youtube
  5. scroll

Actual results:

The scrolling is not smooth, it always lags. With gfx.x11-egl.force-enabled=false the lag is gone. Also with layers.acceleration.force-enabled and gfx.webrender.all, the lag is still there.

Expected results:

The scrolling should be smooth as with gfx.x11-egl.force-enabled=false

The version of Firefox is 89.0.1-ubuntu. Got the same result also on Fedora 34. I'm on Ubuntu 20.04.2 LTS.

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
Blocks: linux-egl

:rmader, can you comment to the bug? Is it a known problem?

Flags: needinfo?(robert.mader)

(In reply to validatedev from comment #0)
Please enable gfx.x11-egl.force-enabled, restart Firefox, open about:support, click on "Copy text to clipboard" and paste it here. Thanks!

(In reply to validatedev from comment #1)

The version of Firefox is 89.0.1-ubuntu. Got the same result also on Fedora 34. I'm on Ubuntu 20.04.2 LTS.

We'd need you system information (about:support), but based on the fact that the same happens on Fedora 34, you'll most likely run proprietary nvidia drivers, is that right? If that is the case, then things should be better in nightly, where proper support for prop. nv is currently landing, see bug 1646135

Flags: needinfo?(robert.mader)

First, thanks for your interest.
I switched to Fedora 34 recently, and it seems that the bug is not present on there, seems I was wrong that the bug was there on Fedora 34. And I just use Intel graphics. Interestingly, when I lower the resolution on Ubuntu 20.04, the lag issue was not present. I have a HiDPI screen. Cannot share the information on Ubuntu, but I shared for Fedora, sorry about that. The system is not changed.

I will try getting the related info on Ubuntu 20.04 LTS with Live USB as soon as possible.

From what I understand so far, there's a good chance that this was not a FF bug, but rather something in Ubuntu/mesa/whatever. But if you manage to reproduce, it would be great to know and see the affected about:support.

Attached file about:support for Ubuntu 20.04 (obsolete) —

Here's the about:support from Ubuntu 20.04 LTS

Blocks: gfx-triage
Severity: -- → S3
Priority: -- → P3

(validatedev from comment #6)
Fedora 34 = apparently unaffected

Version: 89.0
Description: Mesa Intel(R) UHD Graphics 620 (WHL GT2)
Driver Vendor: mesa/iris
Driver Version: 21.1.3.0
Window Protocol: x11
Desktop Environment: gnome
Target Frame Rate: 60

(validatedev from comment #10)
Ubuntu 20.04 = affected

Version: 89.0.1
Description: Mesa Intel(R) UHD Graphics 620 (WHL GT2)
Driver Vendor: mesa/iris
Driver Version: 20.2.6.0
Window Protocol: x11
Desktop Environment: gnome
Target Frame Rate: 60

  • Can it be fixed by setting gfx.webrender.max-partial-present-rects to 0 and gfx.webrender.allow-partial-present-buffer-age to false and restarting Firefox?
    (But Ubuntu 20.04 should only be affected by bug 1677892 when using xwayland instead of x11.)
  • Does this problem also occur with https://nightly.mozilla.org on Ubuntu 20.04 after setting gfx.webrender.all=true and gfx.x11-egl.force-enabled=true and restarting Nightly?

Thanks for posting, would you please attach a profile of a session that demonstrates the stuttering?

Flags: needinfo?(validatedev)

https://profiler.firefox.com/ with Graphics Preset

I will provide the info as soon as possible (~1-2 days expected). Thanks for your interest.

Hi, sorry for the late reply.

Can it be fixed by setting gfx.webrender.max-partial-present-rects to 0 and gfx.webrender.allow-partial-present-buffer-age to false and restarting Firefox?

No.

Does this problem also occur with https://nightly.mozilla.org on Ubuntu 20.04 after setting gfx.webrender.all=true and gfx.x11-egl.force-enabled=true and restarting Nightly?

Yes.

The profilers are the following:
For Firefox Nightly: https://share.firefox.dev/3wB981x
For Firefox 89.0.2: https://share.firefox.dev/3hZUvPP

Flags: needinfo?(validatedev)
Attachment #9229035 - Attachment is obsolete: true

Thanks! From a first look it looks all good. Just to make sure I understand correctly: this only happens on Ubuntu 20.04 but not on Fedora 34?
And on Ubuntu:

  • do you use any (fractional) scaling? If yes, does it still happen if you run at 100%?
  • if not, does it happen at 200% with the option for fractional scaling disabled?
Flags: needinfo?(validatedev)

Also want to pass the profiles without gfx.x11-egl.force-enabled=true

For Firefox 89.0.2: https://share.firefox.dev/3AXYO6O
For Firefox Nightly: https://share.firefox.dev/3eaByZK

Just to make sure I understand correctly: this only happens on Ubuntu 20.04 but not on Fedora 34?

Yes, as I experienced.

do you use any (fractional) scaling?

Well, I do not use the fractional scaling proposed with Ubuntu 20.04 (the xrandr one), which introduces bad fonts and tearing with modesetting driver. I created a xorg configuration file to get fractional scaling with 200%.

The 10-monitor.conf file has the following:

Section "Monitor"
Identifier "eDP-1"
Modeline "2880x1920_60.00" 473.25 2880 3112 3424 3968 1920 1923 1933 1989 -hsync +vsync
Option "PreferredMode" "2880x1920_60.00"
EndSection

And my native resolution is 2160x1440.

If yes, does it still happen if you run at 100%?
With my native resolution, the lag is not happening. With 2880x1920 resolution, 100% and 200% introduces lag.

Also with or without https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1441 on Fedora 34, there isn't any lag or bad thing, FYI.

Flags: needinfo?(validatedev)

We'll look more at this during our work on egl support.

No longer blocks: gfx-triage

(In reply to validatedev from comment #19)
Does this problem still occur with latest Nightly? Network hangs have also been fixed in the last weeks.

validatedev, does this still affect you? Thanks!

Flags: needinfo?(validatedev)

Closing for now, please reopen if this is still visible (as we now ship EGL by default, a lot more users should run into it).

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → INCOMPLETE

I think I am running into something similar. I never had problems with Wayland / EGL prior to Firefox 95, but since the last stable update I'm also having very choppy scrolling. The difference is though, that I was always using Wayland before (with MOZ_ENABLE_WAYLAND=1).

I made a bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=1745098
But maybe it is the same thing.

I am running into a similar issue on X11. Setting gfx.swap-interval.egl to true seems to somewhat improve the situation, but some choppiness is still present (not just when scrolling, but also stuff like WebGL and video playback).

I have WebRender force enabled along with layers.acceleration.force-enabled.

See Also: → 1745098, 1744896

(In reply to Rafael Ristovski from comment #26)

I am running into a similar issue on X11. Setting gfx.swap-interval.egl to true seems to somewhat improve the situation, but some choppiness is still present (not just when scrolling, but also stuff like WebGL and video playback).

I have WebRender force enabled along with layers.acceleration.force-enabled.

Please file a new bug for your case, we can close it as duplicate once we are sure it's the same.
Open about:support in your address bar, click on "Copy text to clipboard" and paste it into the "Add an attachment" field:
https://bugzilla.mozilla.org/enter_bug.cgi?product=Core&component=Graphics%3A+WebRender
Thanks!

Flags: needinfo?(validatedev)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: