https://bugs.kde.org/show_bug.cgi?id=510255
Bug ID: 510255
Summary: plasmashell systemd shutdown order and pipewire
dependency
Classification: Plasma
Product: plasmashell
Version First 6.4.5
Reported In:
Platform: Other
URL: https://invent.kde.org/plasma/plasma-workspace/-/blob/
master/shell/plasma-plasmashell.service.in#L3
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: Startup process
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Target Milestone: 1.0
SUMMARY
Sorry team, the template doesn't quite apply to this!
As one would expect, there's a lot of activity in the journal from plasma, if
the pipewire daemon disappears while plasma is using it. It seems plasma does
not have any mechanism in place to attempt to stop before pipewire, so shutdown
of the machine can involve a lot of noise about pipewire being MIA.
Since it's basically a race condition there are no exact repro steps, but the
trick is to get pipewire to shut down before plasma. I personally just click
restart in the plasma launcher like normal.
I've been seeing these warnings/errors in my journal forever but they're at
shutdown so they seem logical and harmless, still, it contributed to a problem
here: https://github.com/luisbocanegra/kurve/issues/83#issuecomment-3368793510
Because plasma is allowing itself to stop before pipewire, it's also allowing
processes it spawned to stop before pipewire, and that caused this app to hang,
which caused plasma to hang.
That is obviously not a plasma bug in itself, but if systemd waited for plasma
to stop using pipewire before it stopped pipewire, that would have avoided the
issue, and the log noise, and just kinda seems the logical way to do it.
In the above linked thread I worked around the zombification of the process,
and accidentally the shutdown noise from plasma, with a
Before=plasma-plasmashell.service in the pipewire.service unit file (which
behaves as After= at shutdown time). Obviously that's not a good solution for
plasma or pipewire.
In attempts to fix this on plasma's side and be as generic as possible, I tried
using After= with sound.target and pipewire.socket and pipewire.service, from
plasma-core.service and from plasma-plasmashell.service. The only effective
method was appending pipewire.service to the After= directive in the
plasma-plasmashell.service file. I guess the dependency tree is quite specific,
so I hope that saves you some time.
Since sound.target was not working, I guess it would make sense to also append
pulseaudio.service to that line, so this fix works on either server -
https://invent.kde.org/plasma/plasma-workspace/-/blob/master/shell/plasma-plasmashell.service.in#L3
I've confirmed that doesn't break on a system that doesn't have pulse installed
(After= doesn't require it to start, just sets the order it starts if it does
start)
I imagine fixing this needs proper attention to doing it right, but since this
seemingly-harmless warning rose up and bit me, I thought I should raise it here
before it bites others (...more; a web search showed me it has struck before).
I hope that helps.
--
You are receiving this mail because:
You are watching all bug changes.