Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Middle button scrolling not working (TrackPoint) #6541

Open
tejohnso opened this issue Sep 21, 2021 · 6 comments
Open

Middle button scrolling not working (TrackPoint) #6541

tejohnso opened this issue Sep 21, 2021 · 6 comments
Labels
bug Not working as intended input/pointer

Comments

@tejohnso
Copy link

tejohnso commented Sep 21, 2021

  • Sway Version:

    • 1.6.1
  • Debug Log:

  • Configuration File:

  • Description:

    • Immediately upon starting sway, open a terminal and start Brave (or chromium) and navigate to news.google.com
    • Hold down middle trackpoint button and move pointing stick
    • Notice no scrolling is taking place in the browser
    • In terminal, confirm libinput debug-events outputs numerous POINTER_SCROLL_CONTINUOUS events when scrolling
    • In sway debug log, notice multiple "Unknown libinput event 406" entries
@tejohnso tejohnso added the bug Not working as intended label Sep 21, 2021
@Xyene
Copy link
Member

Xyene commented Sep 22, 2021

I believe this should be addressed by the in-progress swaywm/wlroots#3082. I'm a little surprised the non-hi-res versions of the events are not sent, but I'm not very familiar with the matter.

@chmanie
Copy link

chmanie commented Sep 26, 2021

I have noticed that, too, but for me at least it seems to be exclusively the case for Chromium (-based browsers). It works fine in all other windows.

@JoseExposito
Copy link

Just see this issue as a mention in the high-resolution PR.

I'm a little surprised the non-hi-res versions of the events are not sent, but I'm not very familiar with the matter.

The kernel should be sending both low-resolution and high-resolution events. When the kernel doesn't support high-resolution (Linux < 5) libinput does the emulation. You are right, both events should be sent.

@tejohnso could you attach the output of sudo libinput record, please? You can redirect it to a file: sudo libinput record > record.txt.

The command will ask you to select your device number. Once selected, reproduce the issue by pressing the middle click button and moving the trackpoint. Then press Control+C to exit.

That'd help me to discard (or not) an issue in libinput and to the wlroots devs to replay it locally using libinput replay <file>.

I'd be helpful to know if it happens globally or, as @chmanie mentioned, only in Chromium.

@tokyovigilante
Copy link
Contributor

tokyovigilante commented Sep 27, 2021

I'm pretty sure this is a Chromium-only issue and specific to the Ozone cross-platform layer. I see this as well when running Vivaldi (Chrome 94) with --enable-features=UseOzonePlatform --ozone-platform=wayland. If I omit this flag (so that Chrome falls back to Xwayland) trackpad scroll works fine.

This was a fairly recent bug (~2 months) as I've been running with Ozone for a year or so and it has previously worked, I'm just not sure if it's Sway or more likely Chromium given it depends on the backend, and from my attempts to debug locally, the trackpoint axis events are generated fine.

record.txt

For reference, wev output during trackpoint scroll:

[13:      wl_pointer] axis_source: 2 (continuous)
[13:      wl_pointer] axis: time: 947790; axis: 0 (vertical), value: 5.000000
[13:      wl_pointer] frame
[13:      wl_pointer] axis_source: 2 (continuous)
[13:      wl_pointer] axis: time: 947799; axis: 0 (vertical), value: 5.000000
[13:      wl_pointer] frame
[13:      wl_pointer] axis_source: 2 (continuous)
[13:      wl_pointer] axis: time: 947810; axis: 0 (vertical), value: 4.000000
[13:      wl_pointer] frame
[13:      wl_pointer] axis_source: 2 (continuous)
[13:      wl_pointer] axis: time: 947820; axis: 0 (vertical), value: 4.000000
[13:      wl_pointer] frame
[13:      wl_pointer] axis_source: 2 (continuous)
[13:      wl_pointer] axis: time: 947830; axis: 0 (vertical), value: 5.000000
[13:      wl_pointer] frame
[13:      wl_pointer] axis_source: 2 (continuous)
[13:      wl_pointer] axis: time: 947840; axis: 0 (vertical), value: 7.000000
[13:      wl_pointer] frame
[13:      wl_pointer] axis_source: 2 (continuous)
[13:      wl_pointer] axis: time: 947850; axis: 0 (vertical), value: 5.000000
[13:      wl_pointer] frame
[13:      wl_pointer] axis_source: 2 (continuous)
[13:      wl_pointer] axis: time: 947861; axis: 0 (vertical), value: 2.000000
[13:      wl_pointer] frame
[13:      wl_pointer] axis_source: 2 (continuous)
[13:      wl_pointer] axis: time: 947881; axis: 0 (vertical), value: 1.000000
[13:      wl_pointer] frame
[13:      wl_pointer] axis_source: 2 (continuous)
[13:      wl_pointer] axis: time: 947911; axis: 0 (vertical), value: 1.000000
[13:      wl_pointer] frame
[13:      wl_pointer] axis_source: 2 (continuous)
[13:      wl_pointer] axis: time: 947922; axis: 0 (vertical), value: -1.000000
[13:      wl_pointer] frame
[13:      wl_pointer] axis_source: 2 (continuous)
[13:      wl_pointer] axis: time: 947993; axis: 0 (vertical), value: -3.000000
[13:      wl_pointer] frame
[13:      wl_pointer] axis_source: 2 (continuous)
[13:      wl_pointer] axis: time: 948013; axis: 0 (vertical), value: -4.000000
[13:      wl_pointer] frame
[13:      wl_pointer] axis_source: 2 (continuous)
[13:      wl_pointer] axis: time: 948024; axis: 0 (vertical), value: -5.000000
[13:      wl_pointer] frame
[13:      wl_pointer] axis_source: 2 (continuous)
[13:      wl_pointer] axis: time: 948034; axis: 0 (vertical), value: -6.000000
[13:      wl_pointer] frame
[13:      wl_pointer] axis_source: 2 (continuous)
[13:      wl_pointer] axis: time: 948044; axis: 0 (vertical), value: -5.000000
[13:      wl_pointer] frame
[13:      wl_pointer] axis_source: 2 (continuous)
[13:      wl_pointer] axis: time: 948054; axis: 0 (vertical), value: -5.000000
[13:      wl_pointer] frame
[13:      wl_pointer] axis_source: 2 (continuous)
[13:      wl_pointer] axis: time: 948064; axis: 0 (vertical), value: -7.000000
[13:      wl_pointer] frame
[13:      wl_pointer] axis_source: 2 (continuous)
[13:      wl_pointer] axis: time: 948075; axis: 0 (vertical), value: -5.000000
[13:      wl_pointer] frame
[13:      wl_pointer] axis_source: 2 (continuous)
[13:      wl_pointer] axis: time: 948085; axis: 0 (vertical), value: -7.000000
[13:      wl_pointer] frame
[13:      wl_pointer] axis_source: 2 (continuous)
[13:      wl_pointer] axis: time: 948095; axis: 0 (vertical), value: -2.000000
[13:      wl_pointer] frame
[13:      wl_pointer] axis_source: 2 (continuous)
[13:      wl_pointer] axis: time: 948105; axis: 0 (vertical), value: -5.000000
[13:      wl_pointer] frame
[13:      wl_pointer] axis_source: 2 (continuous)
[13:      wl_pointer] axis: time: 948115; axis: 0 (vertical), value: -7.000000
[13:      wl_pointer] frame
[13:      wl_pointer] axis_source: 2 (continuous)
[13:      wl_pointer] axis: time: 948125; axis: 0 (vertical), value: -6.000000
[13:      wl_pointer] frame
[13:      wl_pointer] axis_source: 2 (continuous)
[13:      wl_pointer] axis: time: 948135; axis: 0 (vertical), value: -6.000000
[13:      wl_pointer] frame
[13:      wl_pointer] axis_source: 2 (continuous)
[13:      wl_pointer] axis: time: 948146; axis: 0 (vertical), value: -5.000000
[13:      wl_pointer] frame
[13:      wl_pointer] axis_source: 2 (continuous)
[13:      wl_pointer] axis: time: 948156; axis: 0 (vertical), value: -13.000000
[13:      wl_pointer] frame
[13:      wl_pointer] axis_source: 2 (continuous)
[13:      wl_pointer] axis: time: 948166; axis: 0 (vertical), value: -3.000000
[13:      wl_pointer] frame
[13:      wl_pointer] axis_source: 2 (continuous)
[13:      wl_pointer] axis: time: 948176; axis: 0 (vertical), value: -3.000000
[13:      wl_pointer] frame
[13:      wl_pointer] axis_source: 2 (continuous)
[13:      wl_pointer] axis: time: 948196; axis: 0 (vertical), value: -1.000000
[13:      wl_pointer] frame
[13:      wl_pointer] axis_source: 2 (continuous)
[13:      wl_pointer] axis: time: 948217; axis: 0 (vertical), value: -1.000000
[13:      wl_pointer] frame
[13:      wl_pointer] axis_source: 2 (continuous)
[13:      wl_pointer] axis_stop: time: 948309; axis: 0 (vertical)
[13:      wl_pointer] frame

@tejohnso
Copy link
Author

Thanks @tokyovigilante

@JoseExposito I've confirmed that scroll does not work in Chromium, but does work in Firefox. And my record.txt output is similar to that of @tokyovigilante

@JoseExposito
Copy link

JoseExposito commented Sep 28, 2021

Thanks for the logs. I asked because there was a similar bug with a different trackpoint recently in libinput.... I can not help much with this one then :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Not working as intended input/pointer
Development

No branches or pull requests

5 participants