Bug 472037

Summary: No support for notification sound hints
Product: [Plasma] plasmashell Reporter: Akseli Lahtinen <akselmo>
Component: NotificationsAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: fedin-ilja2010, guimarcalsilva, isma.af, kde, kdelibs-bugs-null, nate, nicolas.fella
Priority: NOR    
Version First Reported In: 5.27.6   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 6.4.0
Sentry Crash Report:

Description Akseli Lahtinen 2023-07-07 09:49:03 UTC
SUMMARY
Applications that want to play sounds with notification hints, for example "sound-name" do not play sound effects.


STEPS TO REPRODUCE
1. Open terminal
2. Run notify-send with a sound hint: notify-send --hint=STRING:sound-file:/usr/share/sounds/Oxygen-Im-New-Mail.ogg eds



OBSERVED RESULT
No sound is played, even sound-file hint is supplied

EXPECTED RESULT
The sound that is given to the notification with the hint should play

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 38
KDE Plasma Version: 5.27.6
KDE Frameworks Version: 5.107.0
Qt Version: 5.15.10
Kernel Version: 6.3.11-200.fc38.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
Memory: 15,5 GiB of RAM
Graphics Processor: AMD Radeon RX 6600

ADDITIONAL INFORMATION
See here for the possible notification hints
https://specifications.freedesktop.org/notification-spec/notification-spec-latest.html#hints
Comment 1 Nate Graham 2023-09-13 18:00:06 UTC
Can confirm, though we should move in the direction of specifying sounds by name, not filepath.
Comment 2 Nicolas Fella 2025-03-22 15:08:50 UTC
Git commit 1b25adde96c744a15a889afa517ce3e906ecab01 by Nicolas Fella, on behalf of Ruslan Khabibullin.
Committed on 22/03/2025 at 15:08.
Pushed by nicolasfella into branch 'master'.

notifications: Add support for playing sound via hints

This allows applications to add sounds to their notifications by setting the appropriate hints

M  +1    -0    applets/notifications/package/contents/ui/global/Globals.qml
M  +1    -0    libnotificationmanager/CMakeLists.txt
M  +2    -0    libnotificationmanager/abstractnotificationsmodel.cpp
M  +2    -0    libnotificationmanager/notification.cpp
M  +67   -1    libnotificationmanager/notifications.cpp
M  +3    -0    libnotificationmanager/notifications.h
M  +1    -1    libnotificationmanager/server_p.cpp

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