Skip to content

[BUG] Consecutive mouse wheel events are dropped or coalesced, causing slow scrolling #241

@daichi-629

Description

@daichi-629

Describe the bug

When scrolling quickly with a mouse wheel in a LinuxServer.io Webtop container using Selkies, consecutive wheel events appear to be dropped or coalesced before they reach the remote X11 session.

As a result, scrolling feels much slower than expected. In the reproduction below, spinning the mouse wheel quickly over an xev window produces only a single X11 scroll event (button 5) in the container.

This was originally noticed in linuxserver/docker-obsidian, but the same behavior is reproducible in linuxserver/webtop:latest, so it does not appear to be specific to Obsidian or Electron.

To Reproduce

  1. Run a LinuxServer.io Webtop container:
docker run --rm -it \
  --name webtop-selkies-test \
  --shm-size=1gb \
  --security-opt seccomp=unconfined \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=Asia/Tokyo \
  -p 3000:3000 \
  -p 3001:3001 \
  lscr.io/linuxserver/webtop:latest
  1. Open the Webtop session in the browser.

  2. Install xev inside the container:

docker exec -it webtop-selkies-test bash
sudo apk add --no-cache xev
# or, if already running as root:
apk add --no-cache xev
  1. Run xev with button events only:
xev -event button
  1. Move the mouse cursor over the xev window.

  2. Spin the mouse wheel quickly.

  3. Observe that only one scroll event is reported, for example:

root@c3626a3c5cca:/# xev -event button
Outer window is 0x2200001, inner window is 0x2200002

ButtonPress event, serial 25, synthetic NO, window 0x2200001,
    root 0x21f, subw 0x0, time 775420882, (61,78), root:(1232,659),
    state 0x0, button 5, same_screen YES

ButtonRelease event, serial 25, synthetic NO, window 0x2200001,
    root 0x21f, subw 0x0, time 775420882, (61,78), root:(1232,659),
    state 0x1000, button 5, same_screen YES

Expected behavior

When the mouse wheel is spun quickly, multiple wheel events should either reach the remote X11 session as multiple ButtonPress / ButtonRelease events, or the accumulated wheel delta should be preserved in a way that produces equivalent scrolling behavior.

For example, a fast downward wheel movement should produce multiple button 5 events in xev, not only a single press/release pair.

Screenshots

No screenshot. The issue is observable through the xev -event button output above.

  • Host OS Version: Windows 11 with WSL2

    • WSL Version: 2.6.3.0
    • Kernel Version: 6.6.87.2-1
    • WSLg Version: 1.0.71
    • MSRDC Version: 1.2.6353
    • Direct3D Version: 1.611.1-81528511
    • DXCore Version: 10.0.26100.1-240331-1435.ge-release
    • Windows Version: 10.0.26200.8246
    • WSL distribution: Ubuntu 24.04.3 LTS (noble)
  • CPU: 13th Gen Intel(R) Core(TM) i5-13600KF

  • Host GPU Model and Driver/Encoder Version: NVIDIA GeForce RTX 4070 Ti, NVIDIA driver 595.97, CUDA 13.2

  • GStreamer Version: not available in this container image; gst-launch-1.0 and gst-inspect-1.0 are not installed

  • Browser Version: Brave 1.89.141 (Chromium 147.0.7727.102)

  • Docker Version: Docker version 29.2.1, build a5c7197

  • Container image: lscr.io/linuxserver/webtop:latest

Container image ID: sha256:a7bc86b5d2e8cfb03af0d1eafa95253498f4ee413a70e63f262190fa1db96d8a

  • The behavior was first noticed in linuxserver/docker-obsidian.
  • It was reproduced in linuxserver/webtop:latest to isolate the problem from Obsidian/Electron.
  • Logs are long and will be attached separately as a log.txt file.

Additional context

This looks different from the existing touchpad issues where scrolling is too fast. In this case, rapid wheel input appears to result in too few X11 scroll events, making scrolling feel slow.

The main observation is that continuous physical mouse wheel input produces only a single button 5 press/release pair in the remote X11 session during a fast wheel movement.

  • I confirm that this issue is relevant to the scope of this project. If you know that upstream projects are the cause of this problem, please raise the issue there.
  • I confirm that I have read other open and closed issues and that duplicates do not exist.
  • I confirm that the issue is easily reproducible and explained thoroughly.
  • I confirm that relevant log files have been included as explained below. Any relevant additional log files have also been included.
  • I confirm that no portion of this issue contains credentials or other private information, and it is my own responsibility to protect my privacy.
  • I confirm that the authors of this issue does not willfully breach or infringe legal regulations, in any and all global law, regarding trademarks, trade names, logos, patents, or any and all other forms of external intellectual property, as well as adhering to software license terms of open-source and proprietary software projects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions