Bug 492516 - input devices freeze occasionally on inputcapture
Summary: input devices freeze occasionally on inputcapture
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: input (show other bugs)
Version: 6.1.4
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-02 00:39 UTC by dofficialgman
Modified: 2024-12-06 20:54 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.3.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dofficialgman 2024-09-02 00:39:10 UTC
SUMMARY
I have experience multiple instances of mouse/keyboard going fully unresponsive after accepting the input capture portal prompt. I cannot reproduce it at will but it occurs with inputleap on a kde plasma wayland 6.1.4 system using git master libportal on occasion.

STEPS TO REPRODUCE
1. use a software such as inputleap to capture input
2. start the software and accept the inputcapture portal
3. occasionally all input devices go unresponsive

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Ubuntu Noble Neon
KDE Plasma Version: 6.1.4
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2

ADDITIONAL INFORMATION

Originally reported and partially diagnosed as a possible kwin issue on https://github.com/flatpak/libportal/issues/152#issuecomment-2323566346

Sep 01 14:29:02 garrett-desktop systemd[2303]: Started app-\x2fhome\x2fgarrett\x2finput\x2dleap\x2dubuntu\x2d22\x2d04\x2fbin\x2finput\x2dleap@c9345465f7bc42708df765f5fff41d9b.service - /home/garrett/input-leap-ubuntu-22-04/bin/input-leap.
Sep 01 14:29:03 garrett-desktop input-leap[4642]: *** WARNING *** The program 'input-leap' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
Sep 01 14:29:03 garrett-desktop input-leap[4642]: *** WARNING *** Please fix your application to use the native API of Avahi!
Sep 01 14:29:03 garrett-desktop input-leap[4642]: *** WARNING *** For more information see <http://0pointer.de/blog/projects/avahi-compat.html>
Sep 01 14:29:03 garrett-desktop input-leap[4642]: *** WARNING *** The program 'input-leap' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
Sep 01 14:29:03 garrett-desktop input-leap[4642]: *** WARNING *** Please fix your application to use the native API of Avahi!
Sep 01 14:29:03 garrett-desktop input-leap[4642]: *** WARNING *** For more information see <http://0pointer.de/blog/projects/avahi-compat.html>
Sep 01 14:29:03 garrett-desktop kded6[2661]: Registering ":1.89/StatusNotifierItem" to system tray
Sep 01 14:29:03 garrett-desktop input-leap[4642]: ("-f", "--no-tray", "--debug", "INFO", "--name", "garrett-desktop", "--disable-client-cert-checking", "-c", "/tmp/InputLeap.pNPhmM", "--address", ":24800")
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: registering eis_handshake v1 object 0
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: sending: object 0 (eis_handshake@v1:handshake_version(0)) signature 'u'
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: dispatching eis_handshake.handshake_version() on object 0
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: client 0x1 supports handshake version 1
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: dispatching eis_handshake.context_type() on object 0
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: dispatching eis_handshake.name() on object 0
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: dispatching eis_handshake.interface_version() on object 0
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: client 0x1 supports ei_connection version 1
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: dispatching eis_handshake.interface_version() on object 0
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: client 0x1 supports ei_callback version 1
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: dispatching eis_handshake.interface_version() on object 0
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: client 0x1 supports ei_pingpong version 1
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: dispatching eis_handshake.interface_version() on object 0
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: client 0x1 supports ei_seat version 1
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: dispatching eis_handshake.interface_version() on object 0
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: client 0x1 supports ei_device version 1
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: dispatching eis_handshake.interface_version() on object 0
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: client 0x1 supports ei_pointer version 1
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: dispatching eis_handshake.interface_version() on object 0
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: client 0x1 supports ei_pointer_absolute version 1
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: dispatching eis_handshake.interface_version() on object 0
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: client 0x1 supports ei_scroll version 1
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: dispatching eis_handshake.interface_version() on object 0
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: client 0x1 supports ei_button version 1
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: dispatching eis_handshake.interface_version() on object 0
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: client 0x1 supports ei_keyboard version 1
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: dispatching eis_handshake.interface_version() on object 0
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: client 0x1 supports ei_touchscreen version 1
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: dispatching eis_handshake.finish() on object 0
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: sending: object 0 (eis_handshake@v1:interface_version(1)) signature 'su'
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: sending: object 0 (eis_handshake@v1:interface_version(1)) signature 'su'
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: sending: object 0 (eis_handshake@v1:interface_version(1)) signature 'su'
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: sending: object 0 (eis_handshake@v1:interface_version(1)) signature 'su'
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: sending: object 0 (eis_handshake@v1:interface_version(1)) signature 'su'
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: sending: object 0 (eis_handshake@v1:interface_version(1)) signature 'su'
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: sending: object 0 (eis_handshake@v1:interface_version(1)) signature 'su'
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: sending: object 0 (eis_handshake@v1:interface_version(1)) signature 'su'
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: sending: object 0 (eis_handshake@v1:interface_version(1)) signature 'su'
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: sending: object 0 (eis_handshake@v1:interface_version(1)) signature 'su'
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: registering eis_connection v1 object 0xff00000000000000
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: sending: object 0 (eis_handshake@v1:connection(2)) signature 'unu'
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: registering eis_pingpong v1 object 0xff00000000000001
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: sending: object 0xff00000000000000 (eis_connection@v1:ping(3)) signature 'nu'
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: deregistering eis_handshake v1 object 0
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: Client dispatch: NEW -> CONNECTING
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: dispatching eis_connection.sync() on object 0xff00000000000000
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: 🪳  libeis bug:  Received invalid version 24 for object id 0x1. Disconnecting
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: Received invalid version 24 for object id 0x1.
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: Client error: Received invalid version 24 for object id 0x1.
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: queuing event type EIS_EVENT_CLIENT_DISCONNECT (2)
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: sending: object 0xff00000000000000 (eis_connection@v1:disconnected(0)) signature 'uus'
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: deregistering eis_connection v1 object 0xff00000000000000
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: deregistering eis_pingpong v1 object 0xff00000000000001
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: Client dispatch: CONNECTING -> DISCONNECTED
Sep 01 14:29:04 garrett-desktop systemd[1]: systemd-localed.service: Deactivated successfully.
Sep 01 14:29:07 garrett-desktop systemd[1]: systemd-timedated.service: Deactivated successfully.
Sep 01 14:29:17 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Activating input capture, crossing barrier( Qt::Vertical 0 [ 0 , 1439 ]) at QPoint(0,983) with QPointF(-8,0)
Sep 01 14:29:56 garrett-desktop kernel: usb 1-4: USB disconnect, device number 2
Sep 01 14:29:57 garrett-desktop kernel: usb 1-4: new full-speed USB device number 5 using xhci_hcd
Sep 01 14:29:57 garrett-desktop kernel: usb 1-4: New USB device found, idVendor=046d, idProduct=c53f, bcdDevice=44.01
Sep 01 14:29:57 garrett-desktop kernel: usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Sep 01 14:29:57 garrett-desktop kernel: usb 1-4: Product: USB Receiver
Sep 01 14:29:57 garrett-desktop kernel: usb 1-4: Manufacturer: Logitech
Sep 01 14:29:57 garrett-desktop kernel: logitech-djreceiver 0003:046D:C53F.0007: hidraw1: USB HID v1.11 Keyboard [Logitech USB Receiver] on usb-0000:00:14.0-4/input0
Sep 01 14:29:57 garrett-desktop kernel: logitech-djreceiver 0003:046D:C53F.0008: hiddev0,hidraw2: USB HID v1.11 Mouse [Logitech USB Receiver] on usb-0000:00:14.0-4/input1
Sep 01 14:29:57 garrett-desktop kernel: logitech-djreceiver 0003:046D:C53F.0009: hiddev1,hidraw4: USB HID v1.11 Device [Logitech USB Receiver] on usb-0000:00:14.0-4/input2
Sep 01 14:29:57 garrett-desktop kernel: logitech-djreceiver 0003:046D:C53F.0009: device of type eQUAD Lightspeed 1.1 (0x0d) connected on slot 1
Sep 01 14:29:57 garrett-desktop mtp-probe[4772]: checking bus 1, device 5: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-4"
Sep 01 14:29:57 garrett-desktop mtp-probe[4772]: bus: 1, device: 5 was not an MTP device
Sep 01 14:29:57 garrett-desktop kernel: input: Logitech G305 as /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.2/0003:046D:C53F.0009/0003:046D:4074.000A/input/input34
Sep 01 14:29:57 garrett-desktop kernel: logitech-hidpp-device 0003:046D:4074.000A: input,hidraw5: USB HID v1.11 Keyboard [Logitech G305] on usb-0000:00:14.0-4/input2:1
Sep 01 14:29:57 garrett-desktop kernel: logitech-hidpp-device 0003:046D:4074.000A: HID++ 4.2 device connected.
Sep 01 14:29:57 garrett-desktop mtp-probe[4783]: checking bus 1, device 5: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-4"
Sep 01 14:29:57 garrett-desktop mtp-probe[4783]: bus: 1, device: 5 was not an MTP device
Sep 01 14:29:57 garrett-desktop systemd-logind[877]: Watching system buttons on /dev/input/event5 (Logitech G305)
Comment 1 Bug Janitor Service 2024-12-04 16:49:42 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/6863
Comment 2 David Redondo 2024-12-04 17:43:29 UTC
Git commit 88a92f9ebbfe542f47d0fe3c99ac2f1c46281f5b by David Redondo.
Committed on 04/12/2024 at 17:14.
Pushed by davidre into branch 'master'.

Remove inputcapture if eis client disconnects

Otherwise input can get stuck because the client may base its decision to
release the capture on the input event it receives.

M  +26   -0    autotests/integration/input_capture_test.cpp
M  +2    -1    src/plugins/eis/eisinputcapture.cpp

https://invent.kde.org/plasma/kwin/-/commit/88a92f9ebbfe542f47d0fe3c99ac2f1c46281f5b