Bug 492563

Summary: kdeconnect freezes plasmashell upon successful connection to phone
Product: [Applications] kdeconnect Reporter: Keigh Rim <keigh.rim>
Component: commonAssignee: Albert Vaca Cintora <albertvaka>
Status: REPORTED ---    
Severity: critical CC: andrew.g.r.holmes, jesusnavarrojr188, smowtenshi
Priority: NOR    
Version First Reported In: 24.08.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Keigh Rim 2024-09-02 20:58:21 UTC
SUMMARY
Immediately after kdeconnect connects to my phone (running android), plasmashell completely freezes. 

OBSERVED RESULT
1. all plasamshell panels freeze and 
    1. stop responding to any mouse/keyboard (shortcut) interactions
    2. stop updating any visuals (e.g. clock no longer goes)
2. other parts of the KDE work without much problem 
  1. all existing apps and their windows continue to work as expected
  2. keyboard shortcuts that are not related to plasmashell elements continue to work, for example, I can call krunner via keyboard shortcut and start a new application 
  3. kwin continues to properly render and tile app windows 
  4. system clipboard stops working for GUI apps, but accessible via bash commands, such as `wl-copy`
3. journal log messages from kdeconnectd around the time of freezing 
  ```
  Sep 02 15:50:48 feist kdeconnectd[1682]: 2024-09-02T15:50:48 default: new capabilities for  "phone-name"
  Sep 02 15:50:48 feist kdeconnectd[1682]: 2024-09-02T15:50:48 kf.modemmanagerqt: Failed enumerating MM objects: "org.freedesktop.DBus.Error.NameHasNoOwner" 
  Sep 02 15:50:48 feist kdeconnectd[1682]: 2024-09-02T15:50:48 default: Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
  Sep 02 15:50:49 feist kdeconnectd[1682]: 2024-09-02T15:50:49 default: DataControlOffer: timeout reading from pipe
  Sep 02 15:50:50 feist kdeconnectd[1682]: 2024-09-02T15:50:50 default: DataControlOffer: timeout reading from pipe
  ```
4. `kquitapp6 plasmashell` timeouts after 60 seconds
  ```
  "Quitting application plasmashell failed. Error reported was:\n\n     org.freedesktop.DBus.Error.NoReply : Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken."
  ```
5. at this point, only "fix" I found is just rebooting the system, but then shutting down the system takes unusually long time, as plasmashell doesn't stop obdiently. After the reboot, journal log shows 
  ```
  $ journalctl -b -1  | grep -i plasma
  ...
  Sep 02 16:10:57 feist systemd[927]: Stopping KDE Plasma Workspace...
  # 40 secs later
  Sep 02 16:11:37 feist systemd[927]: plasma-plasmashell.service: State 'stop-sigterm' timed out. Killing.
  Sep 02 16:11:37 feist systemd[927]: plasma-plasmashell.service: Killing process 1337 (plasmashell) with signal SIGKILL.
  Sep 02 16:11:37 feist systemd[927]: plasma-plasmashell.service: Killing process 1684 (n/a) with signal SIGKILL.
  Sep 02 16:11:37 feist systemd[927]: plasma-plasmashell.service: Killing process 2269 (n/a) with signal SIGKILL.
  Sep 02 16:11:37 feist systemd[927]: plasma-plasmashell.service: Killing process 2360 (plasmash:gdrv0) with signal SIGKILL.
  Sep 02 16:11:37 feist systemd[927]: plasma-plasmashell.service: Killing process 2824 (n/a) with signal SIGKILL.
  Sep 02 16:11:37 feist systemd[927]: plasma-plasmashell.service: Main process exited, code=killed, status=9/KILL
  Sep 02 16:11:37 feist systemd[927]: plasma-plasmashell.service: Failed with result 'timeout'.
  Sep 02 16:11:37 feist systemd[927]: Stopped KDE Plasma Workspace.
  ...
  ```

SOFTWARE/OS VERSIONS
OS: Arch Linux x86_64
Kernel: Linux 6.10.7-arch1-1
Shell: bash 5.2.32
DE: KDE Plasma 6.1.4
Terminal: konsole 24.8.0
Android: 14
Android App: kdeconnect 1.32 installed from Play store
Comment 1 Keigh Rim 2024-09-02 21:16:56 UTC
(more system environment info) 
Operating System: Arch Linux 
KDE Plasma Version: 6.1.4
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2
Kernel Version: 6.10.7-arch1-1 (64-bit)
Graphics Platform: Wayland