<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>492516</bug_id>
          
          <creation_ts>2024-09-02 00:39:10 +0000</creation_ts>
          <short_desc>input devices freeze occasionally on inputcapture</short_desc>
          <delta_ts>2024-12-06 20:54:11 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Plasma</classification>
          <product>kwin</product>
          <component>input</component>
          <version>6.1.4</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>dofficialgman</reporter>
          <assigned_to name="KWin default assignee">kwin-bugs-null</assigned_to>
          <cc>kde</cc>
    
    <cc>nate</cc>
          
          <cf_commitlink>https://invent.kde.org/plasma/kwin/-/commit/88a92f9ebbfe542f47d0fe3c99ac2f1c46281f5b</cf_commitlink>
          <cf_versionfixedin>6.3.0</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2350679</commentid>
    <comment_count>0</comment_count>
    <who name="">dofficialgman</who>
    <bug_when>2024-09-02 00:39:10 +0000</bug_when>
    <thetext>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 &apos;input-leap&apos; called &apos;DNSServiceRegister()&apos; 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 &lt;http://0pointer.de/blog/projects/avahi-compat.html&gt;
Sep 01 14:29:03 garrett-desktop input-leap[4642]: *** WARNING *** The program &apos;input-leap&apos; called &apos;DNSServiceRegister()&apos; 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 &lt;http://0pointer.de/blog/projects/avahi-compat.html&gt;
Sep 01 14:29:03 garrett-desktop kded6[2661]: Registering &quot;:1.89/StatusNotifierItem&quot; to system tray
Sep 01 14:29:03 garrett-desktop input-leap[4642]: (&quot;-f&quot;, &quot;--no-tray&quot;, &quot;--debug&quot;, &quot;INFO&quot;, &quot;--name&quot;, &quot;garrett-desktop&quot;, &quot;--disable-client-cert-checking&quot;, &quot;-c&quot;, &quot;/tmp/InputLeap.pNPhmM&quot;, &quot;--address&quot;, &quot;:24800&quot;)
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 &apos;u&apos;
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 &apos;su&apos;
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: sending: object 0 (eis_handshake@v1:interface_version(1)) signature &apos;su&apos;
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: sending: object 0 (eis_handshake@v1:interface_version(1)) signature &apos;su&apos;
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: sending: object 0 (eis_handshake@v1:interface_version(1)) signature &apos;su&apos;
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: sending: object 0 (eis_handshake@v1:interface_version(1)) signature &apos;su&apos;
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: sending: object 0 (eis_handshake@v1:interface_version(1)) signature &apos;su&apos;
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: sending: object 0 (eis_handshake@v1:interface_version(1)) signature &apos;su&apos;
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: sending: object 0 (eis_handshake@v1:interface_version(1)) signature &apos;su&apos;
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: sending: object 0 (eis_handshake@v1:interface_version(1)) signature &apos;su&apos;
Sep 01 14:29:04 garrett-desktop kwin_wayland[2421]: kwin_inputcapture: Libeis: sending: object 0 (eis_handshake@v1:interface_version(1)) signature &apos;su&apos;
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 &apos;unu&apos;
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 &apos;nu&apos;
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 -&gt; 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 &apos;uus&apos;
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 -&gt; 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: &quot;/sys/devices/pci0000:00/0000:00:14.0/usb1/1-4&quot;
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: &quot;/sys/devices/pci0000:00/0000:00:14.0/usb1/1-4&quot;
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)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2378944</commentid>
    <comment_count>1</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2024-12-04 16:49:42 +0000</bug_when>
    <thetext>A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/6863</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2378955</commentid>
    <comment_count>2</comment_count>
    <who name="David Redondo">kde</who>
    <bug_when>2024-12-04 17:43:29 +0000</bug_when>
    <thetext>Git commit 88a92f9ebbfe542f47d0fe3c99ac2f1c46281f5b by David Redondo.
Committed on 04/12/2024 at 17:14.
Pushed by davidre into branch &apos;master&apos;.

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</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>