New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 712737 link

Starred by 24 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

High Resolution touchpad scrolling broken under Xwayland

Reported by bwa...@gmail.com, Apr 18 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36

Steps to reproduce the problem:
1. On hardware with a precision touchpad (in my case an XPS 13 9360) and on a distro that supports wayland (e.g. Fedora 25) login to the wayland session, launch chrome/chromium and try scrolling.

What is the expected behavior?
Should get smooth, pixel scrolling

What went wrong?
Precision xinput2 scrolling is not working as expected in the Wayland session, it scrolls in steps instead.

Did this work before? N/A 

Chrome version: 57.0.2987.133  Channel: stable
OS Version: 
Flash Version: 

If you login to the Xorg session it works as expected

Using firefox it does work as expected even in the wayland session

This was discussed in this bug: https://bugs.chromium.org/p/chromium/issues/detail?id=384970#c72

Which was then closed in favor of this bug: https://bugs.chromium.org/p/chromium/issues/detail?id=593453&can=2&start=0&num=100&q=&colspec=ID%20Pri%20M%20Stars%20ReleaseBlock%20Component%20Status%20Owner%20Summary%20OS%20Modified&groupby=&sort=

Which was then also closed....
 

Comment 1 by bokan@chromium.org, Apr 18 2017

Cc: bokan@chromium.org sadrul@chromium.org
Labels: -Pri-2 Hotlist-Input-Dev Pri-3
Status: Available (was: Unconfirmed)
For a bit more context, see:  https://crbug.com/593453#c39  and  https://crbug.com/593453#c43 

+sadrul@: Do you know how this works on ChromeOS boards that use Wayland?

Comment 2 by sadrul@chromium.org, Apr 18 2017

Cc: reve...@chromium.org
I believe wayland is used on all boards, but only for arc++ But we do not actually use wayland on any boards to receive input events from the system.

Comment 3 by agoode@chromium.org, Apr 26 2017

The issue is that the heuristic introduced in https://crrev.com/b794998819088f76b4cf44c8db6940240c563cf4 is brittle and incorrectly treats all XWayland axis input as discrete mouse wheel input. It should be reverted.

On Fedora, this heuristic is always wrong. Under X11, it claims that no screen devices are discrete mouse wheels, and this drops the first mouse wheel tick. Under XWayland, it claims that all scroll devices are discrete mouse wheels and fails to do smooth scrolling.

Comment 4 by bokan@chromium.org, Apr 26 2017

I don't think a straight revert is preferable. This does work correctly on X11, AFAICT. The first mouse wheel tick works fine with a clicky-wheel and I get smooth scrolling on trackpads. Reverting it will fix Wayland but break X11.

I agree though it's a hack we would like to see fixed. Any ideas on what's necessary to get this working cleanly more broadly?

Comment 5 by agoode@chromium.org, Apr 28 2017

The heuristic works only on distributions that use the deprecated xf86-input-evdev driver. As distributions migrate to xf86-input-libinput (as Fedora and Arch have), the heuristic will stop working.

Is there a metric to figure out what percent of Chrome usage is on X11 libinput or XWayland?

Debian/Ubuntu will eventually fail with the heuristic if they haven't already.

See http://who-t.blogspot.com/2015/01/xf86-input-libinput-compatibility-with.html

https://wiki.archlinux.org/index.php/Libinput

Comment 6 by bokan@chromium.org, Apr 28 2017

I don't think we have any metrics like that. FYI, I'm OOO next week but when I get back I'll try to find someone on the input team to look at it this quarter. 

Comment 7 by j...@jes.st, Oct 11 2017

Ubuntu 17.10 ships with Wayland by default (with X11 as a manual fallback), so I think it's safe to assume a large volume of future Linux users will be exposed to this issue.

You can confirm this on the latest 17.10 build here: http://releases.ubuntu.com/17.10/

Comment 8 by bokan@chromium.org, Oct 11 2017

Cc: -bokan@chromium.org
Labels: -Pri-3 Pri-2
Owner: bokan@chromium.org
Ok, thanks for the heads up. I'll take a look.
Cc: julien.isorce@chromium.org

Comment 10 by bwa...@gmail.com, Jan 14 2018

if a reliable heuristic isn't possible, couldn't there be a flag or something to allow the user to manually enable high resolution scrolling? For example, with firefox you can do this by setting the environment variable MOZ_USE_XINPUT2=1

Comment 11 by bokan@chromium.org, Jan 15 2018

Status: Assigned (was: Available)
I'm currently looking at a different Linux input bug so I'll take a look at this bug after that, while I've got the context paged.
Note that this heuristic is now ineffective on gLinux, because it uses libinput. The first mouse wheel event is lost as before.

(gLinux: https://debconf17.debconf.org/talks/44/)
Cc: bokan@chromium.org
Owner: thomasanderson@chromium.org
thomasanderson@, I heard you're tracking a similar bug - is this related/known on your end? Could you take this over? input-dev doesn't really have the necessary expertise here.
Cc: msi...@igalia.com thomasanderson@chromium.org
Owner: toniki...@chromium.org
Over to tonikitoo@ for wayland.
bokan@ contacted me about it a couple of months ago, but it ended up getting lost in my radar.

I will take a closer look this time.
Related/duplicate:  https://crbug.com/657104 
I can confirm MOZ_USE_XINPUT2=1 works fine for Firefox using Gnome 3.28. A chrome://flags option would indeed be appreciated! Gnome users are chunky- scrolling in Chromium for a long time now. Frankly this is the very last nuisance left for general use of Chromium / Chrome in gnome-wayland.
Has there been any progress on this?
Hi tonikitoo@, is that still on your radar?
Chrome is still not usable on Wayland because of this issue, any things we can to do move forward on this?
Thanks :)
Cc: -msi...@igalia.com toniki...@chromium.org
Owner: msi...@igalia.com
Maksim has better chance to fix it atm.
"Chrome version: 57.0.2987.133  Channel: stable"

This is quite old already. Back at that time, you've used Chromium with X11 backend under XWayland, right?

The current effort is to run Chromium with Wayland backend natively. If you can try it as well, it would be great.
I tried with Chrome 69.0.3497.100 under Wayland (not XWayland), and the scrolling is still not smooth at all, compared to Chrome 69.0.3497.100 on Xorg.
emile@, it was a stable branch, right? I suppose it does not include the ozone layer and must use the old x11 backend, which means it uses XWayland.

To tell you more, the Wayland backend has not been shipped yet, and requires a ToT build.

In order to run it, you must pass --ozone-platform=wayland flag.

https://crrev.com/b794998819088f76b4cf44c8db6940240c563cf4 should be reverted I think. The heuristic is broken on all modern Linux distros in one of two ways:

- under X, it always uses xinput2
- under Xwayland, it never uses xinput2 (this bug)

Fedora reverts this change in their build of Chromium.
https://src.fedoraproject.org/rpms/chromium/blob/master/f/chromium-58.0.3029.96-revert-b794998819088f76b4cf44c8db6940240c563cf4.patch
Labels: Hotlist-DesktopUIChecked
*** UI Mass triage ***

adding labels for expert review.
Also tracking this bug in Ubuntu here: https://bugs.launchpad.net/bugs/1811219

Sign in to add a comment