Bug 510923 - startup sound plays too early with systemd user sessions
Summary: startup sound plays too early with systemd user sessions
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Startup process (other bugs)
Version First Reported In: master
Platform: Other Linux
: NOR minor
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-10-22 15:48 UTC by Kai Uwe Broulik
Modified: 2026-01-13 22:36 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.7.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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