Closed Bug 1601962 Opened 4 years ago Closed 3 years ago

keyboard scrolling at fixed 60fps, despite of widget.wayland_vsync.enabled

Categories

(Core :: Widget: Gtk, defect, P3)

73 Branch
defect

Tracking

()

RESOLVED DUPLICATE of bug 1645528

People

(Reporter: tempel.julian, Unassigned)

References

Details

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

Steps to reproduce:

When setting widget.wayland_vsync.enabled = true, mouse scrolling happens with smooth 75fps on a 75Hz display inside a Sway Wayland session.

Actual results:

But this is not true for scrolling via keyboard arrow keys, it still looks like choppy fixed 60fps @ 75Hz.

Expected results:

Keyboard scrolling input events should be equally applied to every display refresh so that scrolling looks smooth (which it does on Xorg).

The about:support page btw. seems to be an exception: There keyboard scrolling input seems to lead to fluid 75fps/Hz scrolling. I first thought the stutter was just less noticeable than on other sites, but it probably was due to me moving the cursor, which makes keyboard scrolling stutter on that particular page for whatever reason.

Hi walmartguy,

Thanks for reporting this bug.

Since I don't have a Sway Wayland set up to test on my end, I'll add a product and component to this bug.

In the meantime, please confirm:

Regards,
Virginia

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

Yes, happens also with Nightly 73a1 2019-12-10 and fresh profile.

Kenny, I guess it's related to your patch, correct?

Flags: needinfo?(bugzilla)
Priority: -- → P3

The overall gist should be the same as bug 1601966. Synthetic scroll movement is likely running off the synthetic global vsync source rather than the new widget-local vsync source, making it appear choppy even though it is compositing on vsync.

I'd have to dig into where the synthetic scroll movements are scheduled. Switching something over from synthetic global to widget local vsync source requires access the the (real, non-puppet) nsWindow that is used as compositing target.

Flags: needinfo?(bugzilla)
Blocks: 1629140
See Also: → 1601966

Also likely a duplicate of bug 1645528, but not yet confirmed.

See Also: → 1645528

Julian: same here, can you confirm that it's fixed now in nightly?

Flags: needinfo?(tempel.julian)

It is still choppy. Though the same now applies to Xorg (both GLX and EGL backends of FF) and even Windows. Perhaps it's not just a vsync issue, but the keyboard scrolling in general is choppy (regressed)?

Flags: needinfo?(tempel.julian)

(In reply to walmartguy from comment #7)

It is still choppy. Though the same now applies to Xorg (both GLX and EGL backends of FF) and even Windows. Perhaps it's not just a vsync issue, but the keyboard scrolling in general is choppy (regressed)?

Hm, this is very interesting. Can I talk you into bisecting the regression (using https://mozilla.github.io/mozregression/, it makes it very easy)? :)
Unfortunately I still don't own any hardware that is capable of >60Hz refresh rates...

It would be especially interesting if either bug 1645528, bug 1681030 or bug 1684352 have anything to do with it.

Flags: needinfo?(tempel.julian)

It's also very stuttery with 60Hz display, the keyboard scrolling looks more like 30fps or so.

(In reply to walmartguy from comment #9)

It's also very stuttery with 60Hz display, the keyboard scrolling looks more like 30fps or so.

Hm, you are right. Did a quick bisect and got this:

12:29.62 INFO: Last good revision: cab81767be70469b780cd372ff463df59c2264e0
12:29.62 INFO: First bad revision: 32a2e59ab7260118d8d5f430e503967fad6993cf
12:29.62 INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=cab81767be70469b780cd372ff463df59c2264e0&tochange=32a2e59ab7260118d8d5f430e503967fad6993cf
Flags: needinfo?(tempel.julian)
Depends on: 1684520

It btw. is still fluid on about:support, unless the cursor is moved while scrolling.

Does setting apz.force_disable_desktop_zooming_scrollbars:true make it smooth again (even though with some elements getting rendered slowly)? And does it then run properly with your refresh rate?

Flags: needinfo?(tempel.julian)

Yes, this makes keyboard scrolling run smoothly with properly vsynced fps on Windows, Xorg and Wayland.

Flags: needinfo?(tempel.julian)

(In reply to walmartguy from comment #13)

Yes, this makes keyboard scrolling run smoothly with properly vsynced fps on Windows, Xorg and Wayland.

\o/
So I guess we can close this a dup of bug 1645528 once bug 1684520 is addressed.

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.