Bug 510923

Summary: startup sound plays too early with systemd user sessions
Product: [Plasma] plasmashell Reporter: Kai Uwe Broulik <kde>
Component: Startup processAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: minor CC: kde, kdedev, nate
Priority: NOR    
Version First Reported In: master   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 6.7.0
Sentry Crash Report:

Description Kai Uwe Broulik 2025-10-22 15:48:07 UTC
SUMMARY
When using systemd user sessions (the default nowadays), the startup sound plays as soon as the plasma-workspace-(wayland).target unit is launched, which is pretty much as soon as ksplash appears.

With the old codepath it is correctly only played when startup has finished just before ksplash disappears.

STEPS TO REPRODUCE
1. Enable login sound
2. Log in

OBSERVED RESULT
Startup sound plays as soon as ksplash appears

EXPECTED RESULT
Startup sound plays just before ksplash disappears/desktop appears

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: git master as of 2025-10-22
KDE Frameworks Version: 
Qt Version: 6.9.2

ADDITIONAL INFORMATION
Comment 1 Bug Janitor Service 2026-01-08 18:28:09 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/6153
Comment 2 Kai Uwe Broulik 2026-01-13 20:56:43 UTC
Git commit 1c7f32770e7d8db3e87526ded63ddf76d559ad0b by Kai Uwe Broulik.
Committed on 13/01/2026 at 19:33.
Pushed by broulik into branch 'master'.

startkde: Move startup sound into a dedicated plasma-startupsound service

The startup sound is only supposed to play once the session is up.
The legacy codepath played it at the end whereas the systemd one plays
it as soon as the workspace target is *started*.

Add a dedicated `plasma-startupsound` service that is executed once the
workspace target is reached to ensure the sound doesn't play prematurely.

M  +1    -1    startkde/CMakeLists.txt
M  +1    -1    startkde/plasma-session/startup.cpp
M  +0    -107  startkde/startplasma.cpp
A  +24   -0    startkde/startup-sound/CMakeLists.txt
A  +135  -0    startkde/startup-sound/main.cpp     [License: LGPL(v2.0+)]
A  +8    -0    startkde/startup-sound/plasma-startupsound.service.in
M  +2    -0    startkde/systemd/plasma-workspace.target

https://invent.kde.org/plasma/plasma-workspace/-/commit/1c7f32770e7d8db3e87526ded63ddf76d559ad0b