Bug 425974 - Notification sound plays on Plasma session started with a new user account despite its volume level is set to 0% in plasma-pa settings
Summary: Notification sound plays on Plasma session started with a new user account de...
Status: RESOLVED FIXED
Alias: None
Product: plasma-pa
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Neon Linux
: NOR minor
Target Milestone: ---
Assignee: David Rosca
URL:
Keywords:
: 373981 440756 456390 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-08-30 11:35 UTC by Patrick Silva
Modified: 2024-09-20 14:05 UTC (History)
12 users (show)

See Also:
Latest Commit:
Version Fixed In: The next PulseAudio-Qt release
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2020-08-30 11:35:01 UTC
STEPS TO REPRODUCE
1. cretae a new user account in system settings > users
2. logout
3. start Plasma with your new user account
4. select any file/folder in Dolphin and press shift+del: notification sound plays
5. open settings window of sound applet in system tray, click on "Audio" in the left side, click on "Applications" tab: notice that the volume level of "Notificaton sounds" is set to 0%

EXPECTED RESULT
Notificaton sound should not play when its volume level is set to 0%

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.19.80
KDE Frameworks Version: 5.74.0
Qt Version: 5.14.2
Comment 1 Nicolas Fella 2020-08-30 13:18:14 UTC
The issue appears to be that what we display in the KCM does not match PulseAudio's internal volume state for event sounds.

When we get notified by PulseAudio about the event sound stream it reports the volume for each channel. However it reports a channel count of 0, so we can't read the volume info from anywhere. This is the same root cause as in https://bugs.kde.org/show_bug.cgi?id=407397, where we work around it by forcing the channel count to 1 for writing the volume.

pavucontrol seems to have the same issue
Comment 2 Nicolas Fella 2020-08-30 15:40:57 UTC
I know what's going on. When the notification sound is played no explicit volume is set, instead it relies on PulseAudio restoring the volume of the previous notification.

On a new user there is no such volume saved and some default (I think 100%) is used. It also doesn't save the played volume since PulseAudio does not consider it worth saving since it was never set explicitly (see save_volume in sink-input).
Comment 3 Nicolas Fella 2020-11-23 00:37:42 UTC
*** Bug 373981 has been marked as a duplicate of this bug. ***
Comment 4 Patrick Silva 2021-08-09 00:27:55 UTC
*** Bug 440756 has been marked as a duplicate of this bug. ***
Comment 5 Nicolas Fella 2022-07-06 18:50:39 UTC
*** Bug 456390 has been marked as a duplicate of this bug. ***
Comment 6 Patrick Silva 2023-02-21 17:57:32 UTC
*** Bug 466190 has been marked as a duplicate of this bug. ***
Comment 7 Barry Jackson 2023-02-22 09:45:46 UTC Comment hidden (spam)
Comment 8 Barry Jackson 2023-02-22 10:15:20 UTC Comment hidden (spam)
Comment 9 Patrick Silva 2023-02-22 13:11:50 UTC Comment hidden (spam)
Comment 10 Patrick Silva 2023-02-26 13:50:31 UTC
I have created a new user account for test purposes right now.
The notification sounds are muted in Audio KCM, Dolphin does not play a notification sound when I try to delete something by pressing
shift+del, but System Settings does when save/discard changes dialog shows up.

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.27.80
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8
Graphics Platform: Wayland
Comment 11 Patrick Silva 2023-11-19 16:09:20 UTC
This bug persists on Plasma 6 alpha. And the "Notification sounds" slider is missing from Audio KCM in the new account.

Operating System: Arch Linux 
KDE Plasma Version: 5.27.80
KDE Frameworks Version: 5.245.0
Qt Version: 6.6.0
Graphics Platform: Wayland
Comment 12 fanzhuyifan 2024-01-30 06:19:48 UTC
Can't reproduce on current master with pipewire-pulse. When I set the notification volume to 0 and reboot/relogin, there remains no notification sound when I Shift+Delete stuff in dolphin or when I change volume; system settings also does not play a sound when the save/discard dialog popup.

Are people affected by this all running PulseAudio? Can people still reproduce this?
Comment 13 Patrick Silva 2024-01-30 13:57:46 UTC
"Notification sounds" slider is not available in Sound KCM when using a newly created user account for the first time. The slider only appears in the KCM after triggering a notification sound (in Dolphin, for example) and then rebooting. The slider is set to 100%.

Tested on Arch Linux running Plasma 6 RC1 and pipewire.
Comment 14 Patrick Silva 2024-01-30 14:30:11 UTC
On neon unstable with pulseaudio I need to trigger a notification  sound to make the slider to appear in the KCM too, but I do not need to reboot. The notification sound plays even if the slider is set to 0%.

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 6.0.80
KDE Frameworks Version: 5.249.0
Qt Version: 6.6.1
Graphics Platform: Wayland
Comment 16 Bug Janitor Service 2024-08-19 11:54:35 UTC
A possibly relevant merge request was started @ https://invent.kde.org/libraries/pulseaudio-qt/-/merge_requests/42
Comment 17 Harald Sitter 2024-09-20 13:28:28 UTC
Git commit f24eec054f65b2fa68a93c2972b14c761958da21 by Harald Sitter.
Committed on 20/09/2024 at 13:26.
Pushed by sitter into branch 'master'.

context: always synthesize an event streamrestore

doesn't look like this is going to happen upstream in pipewire so let's
do it on a library level for convenience reasons.

when starting a new user profile there will initially be no stream
restores and by extension no event stream control in plasma-pa. to
prevent this from happening we now initially create a dummy restore that
will eventually be updated into the correct object once the real info
arrives.

this now also requires that we explicitly reset the restores on errors
as otherwise we'd have our synthesized restore but stream restoring in
general doesn't work.

M  +17   -0    src/context.cpp
M  +1    -0    src/context_p.h

https://invent.kde.org/libraries/pulseaudio-qt/-/commit/f24eec054f65b2fa68a93c2972b14c761958da21