Closed Bug 1761812 Opened 2 years ago Closed 2 years ago

Scrolling still stutters in some cases after landing bug 1760222

Categories

(Core :: Panning and Zooming, defect, P3)

Firefox 100
x86_64
Linux
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: Alexey104, Unassigned)

Details

Attachments

(1 file)

Attached file about_support

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

Steps to reproduce:

Update to the latest nightly build.

Actual results:

This report is related to bug 1759147, bug 1759017 and bug 1760222. The fix from bug 1760222 has significantly improved jerky scrolling on many web pages, but stutters still occur from time to time when using the latest Nightly build. The amount and frequency of lags are much less now, but some pages are still affected. For example, scrolling is extremely laggy when scrolling through the "Latest blogs" and "Latest articles" sections at the very bottom of this page:
https://www.imperva.com/learn/application-security/buffer-overflow/

Expected results:

Scrolling should be smooth.

OS: Unspecified → Linux
Hardware: Unspecified → x86_64

Google search pages with many images and video thumbnails are also affected.

Reddit main page is also jerky.

The laggy scrolling is actually happening where there's effective scroll linked effect in the document, effective means mutating some CSS properties having impacts on layout in scroll event listeners.

So, a hypothesis I can think of is, given that there's no significant busy tasks on the main-thread in the bad profile result in comment 3, it probably means each paint (each scroll position update) is processed within a vsync tick, so what's going on there is;

  1. We use one-frame-delay scroll offset if there's no scroll linked effect
  2. We use the latest scroll offset if there's scroll linked effect

So, going across these two situations the lagginess is noticable.

If my hypothesis is correct, bug 1753334 will solve this bug. A missing piece of bug 1753334 is there's no machinery to tell whether using the latest scroll offset would be better on the user's device or not. The patch I posted in bug 1753334 is just adding a pref so that the users can tell by themselves.

Component: Untriaged → Panning and Zooming
Depends on: 1753334
Product: Firefox → Core

Alexey104, can you please try this build to see whether the issue is less noticeable or not on the build? https://treeherder.mozilla.org/jobs?repo=try&revision=be3b8be09176eb03f0ea79a58a1835e3a9669319&selectedTaskRun=QZeDQmjYTp2g_JXKdSzQIg.0 .

The build has the patch in bug 1753334, you need to set gfx.webrender.prefer-one-frame-delay to false explicitly. Thanks!

Flags: needinfo?(Alexey104)

Have just tried, but don't see any difference, unfortunately. Some pages are always laggy. On the others, when stutters occur, it might help sometimes to stop scrolling, wait for a second or two and continue to scroll after a short break. Then scrolling is smooth, but only temporarily.

Flags: needinfo?(Alexey104)

Thanks for testing. That's unfortunate.

(In reply to Alexey104 from comment #6)

On the others, when stutters occur, it might help sometimes to stop scrolling, wait for a second or two and continue to scroll after a short break. Then scrolling is smooth, but only temporarily.

It may be an expected outcome of bug 1760222. Since bug bug 1760222, but if the short break means a couple of seconds, it's likely not.

No longer depends on: 1753334

The severity field is not set for this bug.
:botond, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(botond)
Severity: -- → S3
Flags: needinfo?(botond)
Priority: -- → P3

Based onn previous comments update status to NEW

Status: UNCONFIRMED → NEW
Ever confirmed: true

I have a good news:
I was just playing with the settings in about:config and accidentally found the culprit. It turns out that setting gfx.x11-egl.force-disabled to true and restarting Firefox solves my problem completely. Nothing stutters anymore, everything is smooth. Interestingly, I've never had to touch this setting in Firefox < 98, it has always been set to default(false) and everything has always been smooth. This setting only causes problems with Firefox >= 98.

Thanks! Given that the pref value is default by default, I am going to close this bug as WORKSFORME.

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

Unfortunately, after upgrading to 101.0.1 scrolling became a nightmare for me again. Now it is choppy even with gfx.x11-egl.force-disabled set to true. With set to false it is absolutely unusable.

Alexey104, it sounds like a gfx issue. Mind filing a new bug? With mozregression result would be nice. Thanks!

Hi,
Alexey104, have you filed a bug or maybe found a solution? I have this very same problem and I’m struggling to find any info about it online.
Thanks in advance

Flags: needinfo?(Alexey104)

Hi, @maciek4231!
I finally got rid of stutters by setting both of these options in about:config:

gfx.x11-egl.force-disabled = true
gfx.swap-interval.glx = true

Do not forget to restart Firefox. I am not sure if it will work for you, but I hope it will.

Flags: needinfo?(Alexey104)

Thanks!
I think it improved quite a bit, but some sites are still far worse than what it was in pre-98 versions. Prime example is: https://svelte-native.technology/
It is very jerky/stuttery, but super smooth in Chromium/FF on Windows/pre-98 FF
Is it smooth for you? (with auto-scrolling it's much more evident)

(In reply to maciek4231 from comment #16)

some sites are still far worse than what it was in pre-98 versions. Prime example is: https://svelte-native.technology/
It is very jerky/stuttery, but super smooth in Chromium/FF on Windows/pre-98 FF

I confirm, the page you are referring to is jerky. Few other websites are also still affected, and I don't know how to fix it. What I can certainly say is that the problem occurs only on Linux in my case.

It's the same for me. Sad that it probably won't be fixed anytime soon since it's quite rare. I think it only happens with Nvidia, so I might buy AMD card in the future to get rid of that.
Anyway, thanks for help!

(In reply to maciek4231 from comment #18)

I might buy AMD card in the future to get rid of that.

I am also thinking about it. What nvidia driver version are you using? Is it legacy nvidia-470xx branch?

I am currently on 510, but I actually tried 470, 515 and open source driver. It stuttered in every single one sadly. I also tried many about:config settings related to hardware acceleration, but it wasn’t very effective.
It’s also clear to me that the problem is related to scroll related events triggering, so I can’t see how this can be dependent on gpu. I guess nvidia on linux is a mess. If I don’t figure this out soon, I’m buying amd

I think that the best solution is to use layers.gpu-process.force-enabled = true and gfx.x11-egl.force-disabled = true gfx.swap-interval.glx = true. For me it makes it almost as smooth as it is in <98 Firefox. Still not perfect though

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

Attachment

General

Creator:
Created:
Updated:
Size: