Bug 475792 - Qt6 apps started from Kickoff/KRunner still get killed after kwin_wayland restarts
Summary: Qt6 apps started from Kickoff/KRunner still get killed after kwin_wayland res...
Status: RESOLVED DOWNSTREAM
Alias: None
Product: krunner
Classification: Plasma
Component: general (show other bugs)
Version: master
Platform: Compiled Sources Linux
: NOR major
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2023-10-18 11:36 UTC by Fushan Wen
Modified: 2023-12-23 00:10 UTC (History)
7 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fushan Wen 2023-10-18 11:36:06 UTC
Because plasmashell/krunner disable the survive mechanism, it's still impossible for Qt6 apps to survive after a compositor restart because its children are also getting killed after plasmashell/krunner is killed.

Wayland
Qt 6.6.0
plasma-workspace at c08270957b7acf4b6d24d29e355130a7f12523e7
kwin at d91534303e319316772f5039a7938c994ae8428b
Comment 1 Alexander Lohnau 2023-10-29 05:46:15 UTC
> commit 1dd3f5128fc5975b9f463b9cecd3517ce948dbb1
>Author: David Edmundson <kde@davidedmundson.co.uk>
>Date:   Thu Apr 20 16:04:46 2023 +0000
>   Disable wayland reconnects for plasmashell and krunner
>   Plasmashell is a unique process, it doesn't have a lot of saved state
>  and does a lot of bespoke wayland operations. Right now a kwin restart
>  leaves a broken state.    
>  Disable for now, we can revisit this later.


Maybe it is time to revisit it now :D
Comment 2 Nicolas Fella 2023-10-30 16:06:09 UTC
The problem isn't that plasmashell/krunner quit, it's that apps launched from it are not properly detached
Comment 3 Prajna Sariputra 2023-11-09 16:20:22 UTC
Just gave this a try in my Plasma 6 kdesrc-build session, by using Kickoff to open Qt6 Konsole, Plasma 6 System Monitor, Qt6 qpwgraph and Qt5 Dolphin, followed by running `kwin_wayland --replace`, and afterwards the three Qt6 apps came back just fine, and Qt5 Dolphin naturally didn't.

In a Neon Unstable VM, I also tried opening Konsole and Dolphin via Kickoff, KInfoCenter via KRunner and System Settings via the "Configure Display Settings..." right click option on the Desktop, ran `kwin_wayland --replace` in the Konsole window, and all 4 apps came back too.

So, seems like it works now? Unless the bug is about an actual KWin crash instead of just using --replace that is, no idea how well that works yet.

In my kdesrc-build session plasma-workspace is at commit fc1f5dac0ffe882ae590a54d67a06e7c291219a9, while kwin is at commit d75d0daf3bac9017bf44786b3555c8b873d9af96.
Comment 4 Nate Graham 2023-12-20 16:21:57 UTC
Indeed, this is working as expected for me now as well.
Comment 5 Fushan Wen 2023-12-22 08:32:03 UTC
This still happens for some electron apps when they are started from Kickoff.
Comment 6 Fushan Wen 2023-12-22 08:32:48 UTC
However, since only Qt apps can survive, I think it can be closed.
Comment 7 Nate Graham 2023-12-22 15:23:09 UTC
Yeah, Electron doesn't yet have support for surviving Wayland compositor restarts.
Comment 8 Fushan Wen 2023-12-22 15:23:52 UTC
hmm, I mean they can be killed on X11 too
Comment 9 Nate Graham 2023-12-22 16:06:29 UTC
Right, the possibility of surviving the window server crashing or restarting is a Wayland-only thing.
Comment 10 Nicolas Fella 2023-12-23 00:10:49 UTC
I don't think this has anything to do with the window system.

What happens if you kill plasmashell/krunner manually?