r-c-f / waynergy

A synergy client for Wayland compositors
MIT License
419 stars 17 forks source link

libinput and waynergy #56

Open ackstorm23 opened 2 years ago

ackstorm23 commented 2 years ago

Does waynegy's method of communicating with wayland bypass libinput?

I've noticed if I use libinput debug-events, keyboard and mouse clicks are not shown.

I am trying to debug a frequent issue with swaywm where mouse clicks no longer register.

ackstorm23 commented 2 years ago

This is the output from initial startup

# sudo libinput debug-events --set-click-method=clickfinger --verbose
libinput version: 1.21.0
event2  - Video Bus: is tagged by udev as: Keyboard
event2  - Video Bus: device is a keyboard
event0  - Lid Switch: is tagged by udev as: Switch
event0  - Lid Switch: device is a switch device
event0  - Lid Switch: device is a switch device
event1  - Intel Touch Host Controller: is tagged by udev as: Touchscreen
event1  - Intel Touch Host Controller: device is a touch device
event266 - Generic TX 384kb Hifi Type_C Audio: is tagged by udev as: Keyboard
event266 - Generic TX 384kb Hifi Type_C Audio: device is a keyboard
event31 - Generic USB Audio Consumer Control: is tagged by udev as: Keyboard
event31 - Generic USB Audio Consumer Control: device is a keyboard
event256 - Generic USB Audio: is tagged by udev as: Keyboard
event256 - Generic USB Audio: device is a keyboard
event13 - HDA Intel PCH Mic: is tagged by udev as: Switch
event13 - not using input device '/dev/input/event13'
event14 - HDA Intel PCH Headphone: is tagged by udev as: Switch
event14 - not using input device '/dev/input/event14'
event15 - HDA Intel PCH HDMI/DP,pcm=3: is tagged by udev as: Switch
event15 - not using input device '/dev/input/event15'
event16 - HDA Intel PCH HDMI/DP,pcm=7: is tagged by udev as: Switch
event16 - not using input device '/dev/input/event16'
event17 - HDA Intel PCH HDMI/DP,pcm=8: is tagged by udev as: Switch
event17 - not using input device '/dev/input/event17'
event18 - HDA Intel PCH HDMI/DP,pcm=9: is tagged by udev as: Switch
event18 - not using input device '/dev/input/event18'
event19 - HDA Intel PCH HDMI/DP,pcm=10: is tagged by udev as: Switch
event19 - not using input device '/dev/input/event19'
event20 - HDA Intel PCH HDMI/DP,pcm=11: is tagged by udev as: Switch
event20 - not using input device '/dev/input/event20'
event21 - HDA Intel PCH HDMI/DP,pcm=12: is tagged by udev as: Switch
event21 - not using input device '/dev/input/event21'
event22 - HDA Intel PCH HDMI/DP,pcm=13: is tagged by udev as: Switch
event22 - not using input device '/dev/input/event22'
event23 - HDA Intel PCH HDMI/DP,pcm=14: is tagged by udev as: Switch
event23 - not using input device '/dev/input/event23'
event24 - HDA Intel PCH HDMI/DP,pcm=15: is tagged by udev as: Switch
event24 - not using input device '/dev/input/event24'
event25 - HDA Intel PCH HDMI/DP,pcm=16: is tagged by udev as: Switch
event25 - not using input device '/dev/input/event25'
event26 - HDA Intel PCH HDMI/DP,pcm=17: is tagged by udev as: Switch
event26 - not using input device '/dev/input/event26'
event4  - gpio-keys: is tagged by udev as: Keyboard
event4  - gpio-keys: device is a keyboard
event5  - gpio-keys: is tagged by udev as: Keyboard
event5  - gpio-keys: device is a keyboard
event9  - Microsoft Surface 045E:09AE Keyboard: is tagged by udev as: Keyboard
event9  - Microsoft Surface 045E:09AE Keyboard: device is a keyboard
  ... event0  - lid: keyboard paired with Lid Switch<->Microsoft Surface 045E:09AE Keyboard
event10 - Microsoft Surface 045E:09B0 Keyboard: is tagged by udev as: Keyboard
event10 - Microsoft Surface 045E:09B0 Keyboard: device is a keyboard
event11 - Microsoft Surface 045E:09B0: not tagged as supported input device
event11 - not using input device '/dev/input/event11'
event12 - Microsoft Surface 045E:09B0: not tagged as supported input device
event12 - not using input device '/dev/input/event12'
event27 - Microsoft Surface 045E:09AF Mouse: is tagged by udev as: Mouse
event27 - Microsoft Surface 045E:09AF Mouse: device is a pointer
event28 - Microsoft Surface 045E:09AF Touchpad: is tagged by udev as: Touchpad
  ... event28 - thumb: enabled thumb detection (area)
event28 - Microsoft Surface 045E:09AF Touchpad: device is a touchpad
  ... event28 - lid: activated for Microsoft Surface 045E:09AF Touchpad<->Lid Switch
  ... event28 - palm: dwt activated with Microsoft Surface 045E:09AF Touchpad<->Microsoft Surface 045E:09AE Keyboard
event29 - Microsoft Surface 045E:09AF UNKNOWN: not tagged as supported input device
event29 - not using input device '/dev/input/event29'
event30 - Microsoft Surface 045E:09AF UNKNOWN: not tagged as supported input device
event30 - not using input device '/dev/input/event30'
event8  - Microsoft Surface KIP Tablet Mode Switch: is tagged by udev as: Switch
event8  - Microsoft Surface KIP Tablet Mode Switch: device is a switch device
  ... event9  - tablet-mode: paired Microsoft Surface 045E:09AE Keyboard<->Microsoft Surface KIP Tablet Mode Switch
  ... event28 - tablet-mode: activated for Microsoft Surface 045E:09AF Touchpad<->Microsoft Surface KIP Tablet Mode Switch
event3  - PC Speaker: not tagged as supported input device
event3  - not using input device '/dev/input/event3'
event6  - IPTS Touch: is tagged by udev as: Touchscreen
event6  - IPTS Touch: device is a touch device
event7  - IPTS Stylus: is tagged by udev as: Tablet
event7  - IPTS Stylus: tablet 'IPTS Stylus' unknown to libwacom
event7  - IPTS Stylus: device is a tablet
-event2   DEVICE_ADDED            Video Bus                         seat0 default group1  cap:k
-event0   DEVICE_ADDED            Lid Switch                        seat0 default group2  cap:S
 event0   SWITCH_TOGGLE           +0.000s       switch lid state 1
-event1   DEVICE_ADDED            Intel Touch Host Controller       seat0 default group3  cap:t ntouches 1 calib
-event266  DEVICE_ADDED            Generic TX 384kb Hifi Type_C Audio seat0 default group4  cap:k
-event31  DEVICE_ADDED            Generic USB Audio Consumer Control seat0 default group5  cap:kp scroll-nat
-event256  DEVICE_ADDED            Generic USB Audio                 seat0 default group5  cap:k
-event4   DEVICE_ADDED            gpio-keys                         seat0 default group6  cap:k
-event5   DEVICE_ADDED            gpio-keys                         seat0 default group6  cap:k
-event9   DEVICE_ADDED            Microsoft Surface 045E:09AE Keyboard seat0 default group7  cap:kp scroll-nat
-event10  DEVICE_ADDED            Microsoft Surface 045E:09B0 Keyboard seat0 default group8  cap:k
-event27  DEVICE_ADDED            Microsoft Surface 045E:09AF Mouse seat0 default group9  cap:p left scroll-nat scroll-button
-event28  DEVICE_ADDED            Microsoft Surface 045E:09AF Touchpad seat0 default group9  cap:pg  size 96x52mm tap(dl off) left scroll-nat scroll-2fg-edge click-buttonareas-clickfinger dwt-on dwtp-on
-event8   DEVICE_ADDED            Microsoft Surface KIP Tablet Mode Switch seat0 default group10 cap:S
-event6   DEVICE_ADDED            IPTS Touch                        seat0 default group11 cap:t  size 274x185mm ntouches 11 calib
-event7   DEVICE_ADDED            IPTS Stylus                       seat0 default group12 cap:T  size 274x185mm calib

however nothing can be seen after this output from that point forward.

ackstorm23 commented 2 years ago

running latest wlroots-git, sway-git, and waynergy-git from arch aur

r-c-f commented 2 years ago

It will indeed bypass libinput, which is just one of several backends on the wlroots side of things

ackstorm23 commented 2 years ago

Thanks!

r-c-f commented 2 years ago

If it's particularly useful, for debugging purposes you can use the uinput waynergy backend with sway as well. This will go through libinput, like any hardware device.

ackstorm23 commented 1 year ago

Technically speaking, how does Waynergy control keyboard/mouse input with wlroots compositors like sway?

This issue has existed for ages with no resolution, but everyone reporting it has not found any information from debugging libinput.

As I experience this same problem using Waynergy (which is not using libinput), it may reveal that the bug is in fact in wlroots (or sway)

r-c-f commented 1 year ago

For the mouse input that seems to be the issue here, it uses this Wayland protocol to do so. For debugging purposes you can export WAYLAND_DEBUG=1 to see what it's doing on either end, compositor or client.

In any case it is almost certainly a sway/wlroots bug; to narrow it down one might consider trying to reproduce using other wlroots compositors.