Touchpad scrolling is too fast

Bug #1922047 reported by Martin
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
GTK+
Fix Released
Unknown
Mozilla Firefox
Fix Released
Unknown
Mutter
New
Unknown
firefox (Ubuntu)
Confirmed
Undecided
Unassigned
gtk+3.0 (Ubuntu)
Confirmed
Undecided
Unassigned
gtk4 (Ubuntu)
Confirmed
Undecided
Unassigned
mutter (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

This is an issue which has troubled me for a while. Anecdotally, scrolling feels way too fast in GNOME on Wayland compared to on X11. I finally tested it semi-scientifically, and it seems like GNOME on Wayland scrolls almost exactly 1.5x faster than GNOME on X11.

I tested this by testing how many lines are scrolled from a full two-finger touchpad swipe from the bottom of my touchpad to the top of my touchpad, and logged a few attempts in both X and Wayland. I kept track of the results in this spreadsheet: https://docs.google.com/spreadsheets/d/17EaBM5Pgt7GdnnzcN2Vchk4kfT7IZ6i4qZ0zpVRGLhc/edit?usp=sharing

I scrolled in one of my own GTK applications (https://github.com/mortie/lograt) because it lets me easily see how many lines I scrolled. Attach is a video of one full scroll on X11 and one full scroll on Wayland.

This testing was performed on a Dell XPS 13 9343, but I've also used Ubuntu on a Dell XPS 9575 where GNOME Wayland scrolling also feels way too fast. I don't have other hardware to test on.

This has been an issue on both Ubuntu 20.10 and Ubuntu 21.04.

ProblemType: Bug
DistroRelease: Ubuntu 21.04
Package: gnome-shell 3.38.4-1ubuntu1
ProcVersionSignature: Ubuntu 5.11.0-13.14-generic 5.11.7
Uname: Linux 5.11.0-13-generic x86_64
ApportVersion: 2.20.11-0ubuntu61
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: ubuntu:GNOME
Date: Wed Mar 31 11:44:04 2021
DisplayManager: gdm3
InstallationDate: Installed on 2019-11-21 (495 days ago)
InstallationMedia: Ubuntu 19.10 "Eoan Ermine" - Release amd64 (20191017)
RelatedPackageVersions: mutter-common 3.38.4-1ubuntu1
SourcePackage: gnome-shell
UpgradeStatus: Upgraded to hirsute on 2021-03-16 (14 days ago)

Revision history for this message
In , Vincent-liao (vincent-liao) wrote :

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

Steps to reproduce:

Open firefox wayland and start browsing on trackpad.

Actual results:

The scrolling is very unnatural and fast, it's uncomfortable to use.

Expected results:

The scrolling of wayland and x11 should be the same, but it's not.

Revision history for this message
In , Vincent-liao (vincent-liao) wrote :

Created attachment 9122009
The video showing the normal scrolling behavior on firefox x11

Revision history for this message
In , Vincent-liao (vincent-liao) wrote :

Created attachment 9122010
The video showing the weird scrolling behavior on firefox wayland

Revision history for this message
In , Release-mgmt-account-bot (release-mgmt-account-bot) wrote :

[Bugbug](https://github.com/mozilla/bugbug/) thinks this bug should belong to this component, but please revert this change in case of error.

Revision history for this message
In , Daniel van Vugt (vanvugt) wrote :

I can confirm this bug. `MOZ_ENABLE_WAYLAND` looks very promising but the touchpad scrolling is too fast to be controllable.

Last time I spoke to the libinput maintainer about this subject (other toolkits are guilty of the same bug) he said the ideal touchpad scrolling speed is the unaccelerated speed of cursor movement. I would tend to agree.

Revision history for this message
In , 2-me-b (2-me-b) wrote :

I can also confirm this bug. On my trackpad, the scrolling speed on wayland is almost uncontrollable. More precisely, the inertia is almost zero. When I do a small "flick" on X11, it will scroll about 1/3 of the screen then stop. On wayland, it will scroll probably 8 screens worth of content (if the page is that long) before it comes to a stop.

I tested this on the latest nightly and there is no change.

Revision history for this message
In , Oigevald+mozilla (oigevald+mozilla) wrote :

Related https://gitlab.gnome.org/GNOME/gtk/-/issues/1308 "two-finger scrolling is far too fast".
This is a general problem with GNOME/GTK, though Firefox might exacerbate the issue.

Revision history for this message
In , Cwestkaemper (cwestkaemper) wrote :

I can confirm the bug is present on wayland, but not in xwayland or native x11. Furthermore, my GTK apps do not appear to be exhibiting the same issue, so I doubt that GTK is responsible, although I am not knowledgeable enough to say for sure.

Revision history for this message
In , Vincent Chernin (vchernin) wrote :

(In reply to Yariv from comment #6)
> Related https://gitlab.gnome.org/GNOME/gtk/-/issues/1308 "two-finger scrolling is far too fast".
> This is a general problem with GNOME/GTK, though Firefox might exacerbate the issue.

It appears that the above upstream linked bug has been closed due to the confusing array of comments. There appears to be another issue opened for it though: https://gitlab.gnome.org/GNOME/gtk/-/issues/3631

I agree that firefox seems to somehow exacerbate the gtk issue, perhaps since one often wants to scroll to a very specific part of the page. Also, the scrolling behaviour can be very easily compared to other operating systems by opening the same webpages.

Revision history for this message
In , Daniel van Vugt (vanvugt) wrote :

I would be surprised if this was related to the GTK issue because GTK was never as dramatically fast as `MOZ_ENABLE_WAYLAND` seems to be. Maybe Firefox exacerbates the issue as you say, but either way it feels like Firefox needs its own unique fix. Please don't just wait for a GTK fix and expect that to also fix Firefox.

Revision history for this message
In , Till Schäfer (till2-schaefer) wrote :

I can confirm this for Firefox 86.0.1

Operating System: Gentoo Linux
KDE Plasma Version: 5.21.3
KDE Frameworks Version: 5.80.0
Qt Version: 5.15.2
Kernel Version: 5.11.7-gentoo
OS Type: 64-bit
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-4810MQ CPU @ 2.80GHz
Memory: 15.5 GiB of RAM
Graphics Processor: Mesa DRI Intel® HD Graphics 4600

Revision history for this message
Martin (martid0311) wrote :
Revision history for this message
Martin (martid0311) wrote :

I reported a bug in upstream Mutter too: https://gitlab.gnome.org/GNOME/mutter/-/issues/1731

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

GTK in general (not just Wayland) does have poor touchpad scrolling. That's being tracked in:

https://gitlab.gnome.org/GNOME/gtk/-/issues/1308
https://gitlab.gnome.org/GNOME/gtk/-/issues/3631

As for Wayland being faster than X11, I wonder if it's related to:

https://bugzilla.mozilla.org/show_bug.cgi?id=1610477

no longer affects: gnome-shell (Ubuntu)
Revision history for this message
In , Mert Can Demir (validatedev) wrote :

In Windows 10, with the Precision touchpad, unaccelerated scrolling deltas are used directly. In Firefox and GTK, they are not used directly, it seems. Also, the scrolling on X11 using XInput2 with touchpad is also unusable for me, same with GTK. Haven't exactly tested Wayland though, but for me, it is 1.5xish compared to X11.

I could manage the situation for Firefox as changing `mousewheel.default.delta_multiplier_x` and `mousewheel.default.delta_multiplier_x` from 100 to 30, and `mousewheel.min_line_scroll_amount` from 5 to 180. With deltas, I could manage touchpad scrolling speed usable, and with `min_line_scroll_amount` one, mouse doesn't be affected by the delta reduction command. These are my findings.

no longer affects: gtk+3.0 (Ubuntu)
Revision history for this message
In , Botond-2 (botond-2) wrote :

*** Bug 1674218 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Strangiato Xanadu (strangiato) wrote :

Firefox 89 beta running on Wayland session of KDE Plasma is affected.

Revision history for this message
In , Hunter Nightblood (kah0922) wrote :

Firefox 95.0 on Fedora 35 KDE Wayland Session is also affected. It kind of feels like using touch screen scrolling without the touch screen.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gtk+3.0 (Ubuntu):
status: New → Confirmed
Changed in gtk4 (Ubuntu):
status: New → Confirmed
Changed in mutter (Ubuntu):
status: New → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I consider this bug a priority for Ubuntu 22.04 and was hoping to get to it by the new year break. Time to at least put all the bug links in one place...

summary: - Touchpad scrolling is 1.5x faster on Wayland than on X11
+ Touchpad scrolling is too fast
Changed in firefox (Ubuntu):
status: New → Confirmed
Changed in firefox:
importance: Unknown → Medium
status: Unknown → New
Revision history for this message
In , Artogahr-9 (artogahr-9) wrote :

Firefox 96 on Gnome 41.2 is still affected. These settings seem to help though. Also the other one should be multiplier_y.

> In Windows 10, with the Precision touchpad, unaccelerated scrolling deltas are used directly. In Firefox and GTK, they are not used directly, it seems. Also, the scrolling on X11 using XInput2 with touchpad is also unusable for me, same with GTK. Haven't exactly tested Wayland though, but for me, it is 1.5xish compared to X11.
>
> I could manage the situation for Firefox as changing `mousewheel.default.delta_multiplier_x` and `mousewheel.default.delta_multiplier_x` from 100 to 30, and `mousewheel.min_line_scroll_amount` from 5 to 180. With deltas, I could manage touchpad scrolling speed usable, and with `min_line_scroll_amount` one, mouse doesn't be affected by the delta reduction command. These are my findings.

tags: added: jammy
removed: hirsute
tags: added: impish
tags: added: focal
Revision history for this message
In , Emilio (emiliocobos) wrote :

See bug 1752862 comment 12 and following. If this is something people find in need to change frequently, we should consider tweaking the default.

The page delta mode is more similar to other GTK apps, but for the web where there are a lot of scrollers it might not be a good default. The pixel delta mode is more similar to what GNOME web does, and it seems fast enough in my experience.

Either way filing this at least for tracking this potential behavior change.

Revision history for this message
In , Emilio (emiliocobos) wrote :

Bug 1752862 adds prefs to tweak this more precisely. Bug 1753033 tracks potentially switching the default.

*** This bug has been marked as a duplicate of bug 1752862 ***

Revision history for this message
In , Asif Youssuff (yoasif) wrote :

It seems to me that the GNOME Web may be doing it wrong if Firefox matches other GTK apps - and if users prefer that GTK does it more like GNOME Web, they ought to work with GNOME upstream to get that preference reflected. It is nice that we now have an option, but I would consider it a regression to default to a setting that is unlike the platform.

Just my 2¢.

Changed in firefox:
status: New → Invalid
Changed in firefox:
importance: Medium → Unknown
status: Invalid → Unknown
Changed in firefox:
status: Unknown → Confirmed
Changed in gtk:
status: Unknown → Fix Released
tags: removed: impish
Changed in mutter:
status: Unknown → New
Revision history for this message
In , Two-b (two-b) wrote :

GTK apps scroll the same as Epiphany, Firefox is much faster

Revision history for this message
In , Z-val (z-val) wrote :

Hi, the person who originally implemented the scrolling with the wrong mode only here :)

It's been a year since the original discussions and looks like everyone has forgotten about it, oops :/

Was just talking with a friend who was trying Linux out and complained about this:

> [scrolling] was just easily 5x worse in firefox. everything was too fast and kept scrolling too long after releasing

Please do flip the default to `apz.gtk.kinetic_scroll.mode=2`, *everyone* liked it in the Bug 1752862 discussion!

I would also suggest `apz.fling_friction=0.004-if-gtk`, and `apz.gtk.kinetic_scroll.pixel_mode_multiplier=25` seems to be what people have agreed on from that previous discussion, but those are subtler and not nearly as crucial as the mode.

Revision history for this message
In , Botond-2 (botond-2) wrote :

Heh, I'm used to the faster speed now and the pref changes in the previous comment feel quite slow :) But that's probably just familiarity bias rather than the current defaults being objectively better.

So, yes, I'm open to changing the defaults. Maybe we can start with just flipping `delta_mode` on the Nightly branch and see what feedback we get?

Would you like to write a patch?

Revision history for this message
In , Z-val (z-val) wrote :

I did also like fast speed, but it should be in line with regular GTK apps and shouldn't shock new users by feeling 5x faster that them…

> Would you like to write a patch?

I don't currently have a dev setup sooo no..

Revision history for this message
In , Two-b (two-b) wrote :

> kept scrolling too long after releasing

this is probably another thing
in gtk, kinetic scrolling stops after you put a finger on the touchpad (zwp_pointer_gesture_hold_v1 event), but in firefox it doesn't, you have to wait

Revision history for this message
In , Alexander Browne (elcste) wrote :

> in gtk, kinetic scrolling stops after you put a finger on the touchpad (zwp_pointer_gesture_hold_v1 event), but in firefox it doesn't, you have to wait

In GTK 4, and Firefox uses GTK 3. So either someone need to add it to GTK 3 or Firefox needs to use to GTK 4.

Revision history for this message
In , Botond-2 (botond-2) wrote :

(In reply to Alexander Browne from comment #7)
> > in gtk, kinetic scrolling stops after you put a finger on the touchpad (zwp_pointer_gesture_hold_v1 event), but in firefox it doesn't, you have to wait
>
> In GTK 4, and Firefox uses GTK 3. So either someone need to add it to GTK 3 or Firefox needs to use to GTK 4.

Yeah. We have bug 1568722 open about this, and like you say it's blocked on hold gestures being backported to GTK 3. It would be great if that happened; as I mentioned in [this comment](https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/3454#note_1427920), we only need a backport of the GDK layer of hold gestures, not the whole thing.

Revision history for this message
In , Renevietnam29 (renevietnam29) wrote :

you can assign it to me if its still open botond

Revision history for this message
In , Botond-2 (botond-2) wrote :

(In reply to renevietnam29 from comment #9)
> you can assign it to me if its still open botond

Sure!

Do you have a local build of Firefox already? If not, you can find instructions [here](https://firefox-source-docs.mozilla.org/setup/index.html).

As discussed in comment 4, we are initially only looking to change the value of the [apz.gtk.pangesture.delta_mode](https://searchfox.org/mozilla-central/rev/0b55b868c17835942d40ca3fedfca8057481207b/modules/libpref/init/StaticPrefList.yaml#593) pref, to 2 (pixel mode), and only on the Nightly branch. You can see an example of making a pref value conditional on Nightly [here](https://searchfox.org/mozilla-central/rev/0b55b868c17835942d40ca3fedfca8057481207b/modules/libpref/init/StaticPrefList.yaml#4539-4543).

Revision history for this message
In , Renevietnam29 (renevietnam29) wrote :

yes , I have a build. Ok I'll write a patch and you can check it from there

Revision history for this message
Daniel van Vugt (vanvugt) wrote :
Revision history for this message
In , Renevietnam29 (renevietnam29) wrote :

Created attachment 9346181
Bug 1753033 - Change default kinetic scroll mode on Linux on the Nighly channel. r?botond

Depends on D184620

Revision history for this message
In , Pulsebot-d (pulsebot-d) wrote :

Pushed by <email address hidden>:
https://hg.mozilla.org/integration/autoland/rev/2f51f44f5da6
Change default kinetic scroll mode on Linux on the Nighly channel. r=botond

Revision history for this message
In , Nbeleuzu (nbeleuzu) wrote :
Changed in firefox:
status: Confirmed → Fix Released
Revision history for this message
In , Botond-2 (botond-2) wrote :

I filed bug 1851258 as a follow-up for potentially rolling out this change to the release channel.

Regressions from this change like bug 1849201 will need to be fixed before that happens.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.