Bug 457672 - Spotify notifications (coming from plasma-workspace, through XDG portal) plays error sound
Summary: Spotify notifications (coming from plasma-workspace, through XDG portal) play...
Status: RESOLVED FIXED
Alias: None
Product: xdg-desktop-portal-kde
Classification: Plasma
Component: general (show other bugs)
Version: 5.26.3
Platform: Flatpak Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 462283 462357 466441 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-08-09 12:00 UTC by Linus Kardell
Modified: 2023-04-04 12:45 UTC (History)
18 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.105
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Linus Kardell 2022-08-09 12:00:37 UTC
SUMMARY
Lately, every time you switch song in Spotify, Plasma plays the error notification sound. This happens even if you disable notifications for Spotify in the Plasma settings. The only way to get rid of it seems to be to disable desktop notifications for song changes in the Spotify app, or disable notification sounds globally.

STEPS TO REPRODUCE
1. Open Spotify
2. Switch song

OBSERVED RESULT
Error sound plays

EXPECTED RESULT
Notification shown silently

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20220804
KDE Plasma Version: 5.25.3
KDE Frameworks Version: 5.96.0
Qt Version: 5.15.5
Kernel Version: 5.18.15-1-default (64-bit)
Graphics Platform: X11
Processors: 16 × AMD Ryzen 7 5800X 8-Core Processor
Memory: 62.7 Gibyte of RAM
Graphics Processor: NVIDIA GeForce RTX 2080 Ti/PCIe/SSE2
Manufacturer: ASUS
Spotify: 1.1.84.716.gc5f8b819 from Flathub
Comment 2 Wyatt Childers 2022-11-28 17:58:02 UTC
I don't want to presume, but I'd consider this a duplicate of 462283 (I've posted a workaround given by a Telegram contributor there).
Comment 3 Nate Graham 2022-11-28 19:41:58 UTC
It's the opposite; the newer ones should be marked as a duplicate of this. But yes, you're right!
Comment 4 Nate Graham 2022-11-28 19:43:07 UTC
*** Bug 462357 has been marked as a duplicate of this bug. ***
Comment 5 Nate Graham 2022-11-28 19:43:09 UTC
*** Bug 462283 has been marked as a duplicate of this bug. ***
Comment 6 Ilya Fedin 2022-11-28 19:45:19 UTC
Wouldn't the right fix be to just remove the KNotification::DefaultEvent flag? The portal creates applications' notifications, not system notifications after all.
https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/blob/master/src/notification.cpp#L36
Comment 7 MK 2023-02-27 14:45:20 UTC
Happens to me as well, it's annoying as heck. 

Box details as follows:
Operating System: openSUSE Tumbleweed 20230226
KDE Plasma Version: 5.27.1
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Kernel Version: 6.1.12-1-default (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i5-6200U CPU @ 2.30GHz
Memory: 7.5 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 520
Manufacturer: LENOVO
Product Name: 20FB002UMS
System Version: ThinkPad X1 Carbon 4th
Comment 8 Bug Janitor Service 2023-02-27 15:31:45 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/merge_requests/169
Comment 9 Aleix Pol 2023-03-12 23:51:01 UTC
*** Bug 466441 has been marked as a duplicate of this bug. ***
Comment 10 Nate Graham 2023-03-29 16:05:02 UTC
Git commit 183c0525e7a33996126c9438ce2a17065a274e54 by Nate Graham, on behalf of Nicolas Fella.
Committed on 29/03/2023 at 16:04.
Pushed by ngraham into branch 'master'.

Don't play sound for plain notification

We typically don't play a sound by default for most notifications.
However the 'notification' event for the Plasma default notifyrc
has a sound by default

Since this event is used by xdg-desktop-portal-kde, currently all
notifications from Flatpak apps have a sound by default, making
them inconsistent with their non-Flatpak counterparts.

Remove the default sound to align them.
FIXED-IN: 5.105

M  +1    -2    plasma_workspace.notifyrc

https://invent.kde.org/frameworks/frameworkintegration/commit/183c0525e7a33996126c9438ce2a17065a274e54
Comment 11 Nate Graham 2023-03-29 16:07:01 UTC
Git commit f4a899b321948bfa9a0a890f2027678557944205 by Nate Graham, on behalf of Nicolas Fella.
Committed on 29/03/2023 at 16:06.
Pushed by ngraham into branch 'kf5'.

Don't play sound for plain notification

We typically don't play a sound by default for most notifications.
However the 'notification' event for the Plasma default notifyrc
has a sound by default

Since this event is used by xdg-desktop-portal-kde, currently all
notifications from Flatpak apps have a sound by default, making
them inconsistent with their non-Flatpak counterparts.

Remove the default sound to align them.
FIXED-IN: 5.105


(cherry picked from commit 183c0525e7a33996126c9438ce2a17065a274e54)

M  +1    -2    plasma_workspace.notifyrc

https://invent.kde.org/frameworks/frameworkintegration/commit/f4a899b321948bfa9a0a890f2027678557944205