When upgrading from Plasma 6.0 to 6.1 (Beta) while a 6.0 session is active, that session gets killed. The reason for that plasma-workspace updates and adds some user .service files, including plasma-sentinel.service. To make systemd aware of this, the update triggers a daemon-reload of systemd user instances. This notices that plasma-workspace.target is active but the new plasma-sentinel.service is not, so it tries to rectify the situation: Jun 04 13:40:37 localhost.localdomain systemd[1639]: plasma-workspace.target: Unit is stopped because bound to inactive unit plasma-sentinel.service. Jun 04 13:40:37 localhost.localdomain systemd[1639]: plasma-workspace.target: Trying to enqueue job plasma-workspace.target/stop/replace This is fatal for the session.
Thanks for the investigation, I bet that was a pain. > This notices that plasma-workspace.target is active but the new plasma-sentinel.service is not, so it tries to rectify the situation: I *think* that's not quite the whole story. I think the new target will bring up plasma-sentinel.service, but plasma-sentinel.service will exit immediately if startplasma does not own the DBus name 'org.kde.startplasma', which obviously wasn't the case during the last boot. If so I can just delete from waiter.cpp ``` if (!sessionBus.interface()->isServiceRegistered(mService)) { qCDebug(LOG_PLASMA) << "WaitForName: Service" << mService << "is not yet registered"; return false; } ``` and say "watch for deregistration, but if the service doesn't exist, carry on". That would fix this issue, and fix the bug this was trying to fix in the first place.
(In reply to David Edmundson from comment #1) > Thanks for the investigation, I bet that was a pain. > > > This notices that plasma-workspace.target is active but the new plasma-sentinel.service is not, so it tries to rectify the situation: > > I *think* that's not quite the whole story. > > I think the new target will bring up plasma-sentinel.service, but > plasma-sentinel.service will exit immediately if startplasma does not own > the DBus name 'org.kde.startplasma', which obviously wasn't the case during > the last boot. I had the same thought, but the log does not show any attempt at starting plasma-sentinel.service. systemctl --user status plasma-sentinel.service also doesn't show any sign of such an attempt.
I ran systemctl --user edit plasma-workspace.target and BindsTo=plasma-krunner can cause an immediate restart, even if it's 'Wanted'
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4421
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4425
Git commit dcd7080d7f04906ba2998e02779072a3ed9aaa66 by David Edmundson. Committed on 07/06/2024 at 11:21. Pushed by davidedmundson into branch 'master'. Revert "startkde: Close systemd session when startplasma exits" This code worked a bit too aggressively; on a live upgrade from 6.0 to 6.1, systemd will reload and immediately quit the whole session. This reverts commit 0ff2e9a70ccfa96b82fd6d2ea5a0a8545a5e3a60. M +0 -4 startkde/startplasma.cpp M +1 -1 startkde/systemd/CMakeLists.txt D +0 -10 startkde/systemd/plasma-sentinel.service.in M +1 -6 startkde/systemd/plasma-workspace.target M +1 -3 startkde/waitforname/waiter.cpp https://invent.kde.org/plasma/plasma-workspace/-/commit/dcd7080d7f04906ba2998e02779072a3ed9aaa66
Git commit c0624a8bddc2843a1652ea96e6bd1ab231becc8a by Nate Graham, on behalf of David Edmundson. Committed on 07/06/2024 at 16:29. Pushed by ngraham into branch 'Plasma/6.1'. Revert "startkde: Close systemd session when startplasma exits" This code worked a bit too aggressively; on a live upgrade from 6.0 to 6.1, systemd will reload and immediately quit the whole session. This reverts commit 0ff2e9a70ccfa96b82fd6d2ea5a0a8545a5e3a60. M +0 -4 startkde/startplasma.cpp M +1 -1 startkde/systemd/CMakeLists.txt D +0 -10 startkde/systemd/plasma-sentinel.service.in M +1 -6 startkde/systemd/plasma-workspace.target M +1 -3 startkde/waitforname/waiter.cpp https://invent.kde.org/plasma/plasma-workspace/-/commit/c0624a8bddc2843a1652ea96e6bd1ab231becc8a