Rethink notification sounds
Open, Needs TriagePublic

Description

Currently KNotifications emits sound for notification client-side if the Sound action is specified in the notifyrc (or the user has configured it that way). For this it used canberra with build-time fallback to Phonon.

Android, Windows and macOS do sound themeselves so we don't want/can't use canberra there.

Moving the sound to Plasma/the notification server would have a number of benefits:

  • Better platform integration
  • KNotifications and thus apps don't need to link against canberra/phonon/whatever
  • non-KNotifications apps could have notification sound on Plasma
  • Consistent configuration on the Plasma side

This needs investigation on how the relevant Linux notification services handle/support sound.
GNOME has sound-file and sound-name hints for this (https://developer.gnome.org/notification-spec/)

Also needs investigating if/how Windows/Android/mac allow setting specific sounds and how to design a KNotifications-side API for that

apol added a subscriber: apol.Jan 13 2020, 4:15 PM

I'd say the sound should happen whenever the actual notification is shown, if there's lag between visuals and sounds the experience breaks considerably. That would be a reason to move it to Plasma.

Consistent configuration, sounds like a stretch though, but it's surely doable.

Now if we want to do something like sound on click or so, we'll still want to do that in process (that would be kwin I guess).

broulik claimed this task.Mar 27 2021, 1:34 PM
ervin moved this task from Needs Input to In Discussion on the KF6 board.Mar 28 2021, 1:36 PM
ervin moved this task from In Discussion to Needs Input on the KF6 board.Mar 28 2021, 3:53 PM

Notes from the sprint:

  • Try to get sound scheme support to QSoundEffect: https://bugreports.qt.io/browse/QTBUG-92055
  • Add ability to use sound schemes in Plasma notifications
  • Make oxygen-sounds a proper fdo scheme
  • Add a sound theme selector/editor to Plasma
  • Port users of popup-less KNotifications to something else
  • Adapt KNotifications, i.e. remove sound playback
vkrause moved this task from Needs Input to Needs Splitting on the KF6 board.May 8 2021, 1:22 PM

This is unlikely to get done before 6.0, and not of high priority