swaywm / sway

i3-compatible Wayland compositor
https://swaywm.org
MIT License
14.65k stars 1.11k forks source link

Sway occasionally detects one less finger on the touchpad for a period of time #5471

Open nicola-sorace opened 4 years ago

nicola-sorace commented 4 years ago

Sorry for the lack of debug logs but the issue happens only a few times a month or so; I haven't worked out how to reproduce it or get logs from it. I think it tends to happen after I resume from a suspend, but I couldn't be sure this is always the case. Suspending and resuming again doesn't solve the issue.

What happens is that, for a period of time, the number of fingers on the touchpad as interpreted by Sway seems to be one less than reality: One finger on the touchpad does nothing, two fingers moves the mouse normally, three fingers scrolls, and so on.

Starting a movement with two fingers and then releasing one of them usually lets me use the mouse normally, until I release that finger also.

The problem seems to resolve itself after a few minutes. Not sure whether this is time-based or if some tricky combination of touchpad events is solving it.

The output of libinput debug-events seems to not be affected by this issue. Touchpad events are always reported correctly:

Furthermore, I'm running 'libinput-gestures', which also seems to not be affected by this issue. This makes me assume the problem must be in Sway.

Sway Version:

sway version 1.4-45859be0 (Jun 14 2020, branch 'master')

Hardware is the builtin touchpad on a Dell XPS 13 2-in-1 (7390)

Configuration File:

https://gist.github.com/rokyfox/9c9f248efa5cd5573a366dec5710f6e2

Here's the part of the config relating to libinput:

input type:touchpad {
    natural_scroll enabled
    pointer_accel 0.4
    scroll_factor 0.5
    click_method clickfinger
    dwt disabled
}

input type:keyboard {
    xkb_options altwin:swap_lalt_lwin
}

input "1386:18669:Wacom_HID_48ED_Finger" map_to_output eDP-1
input "1386:18669:Wacom_HID_48ED_Pen" map_to_output eDP-1
kiritofeng commented 9 months ago

I too was experiencing this issue on Dell's XPS 13 2-in-1 7390 as late as last year, and am still experiencing this on Dell's XPS 13 9315 (not 2-in-1), on sway version 1.8.1