Bug 483840 - When minimizing/maximizing/closing some applications a sound effect plays
Summary: When minimizing/maximizing/closing some applications a sound effect plays
Status: RESOLVED NOT A BUG
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (show other bugs)
Version: 6.0.2
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2024-03-17 15:00 UTC by kde
Modified: 2024-08-01 22:27 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kde 2024-03-17 15:00:45 UTC
SUMMARY
When I minimize/maximize/close some applications (examples that I've found are: firefox, thunderbird, qalculate-gtk, pinentry) an annoying sound effect plays. 

STEPS TO REPRODUCE
1. Open firefox
2. Try minimizing/maximizing/closing it (sometimes, it needs to be done several times for the effect to show)
3. Hear

OBSERVED RESULT
Sometimes an annoying and distracting sound effect plays

EXPECTED RESULT
No effect plays

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 6.8.1-zen1-1-zen (64-bit)
(available in About System)
KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2

ADDITIONAL INFORMATION
I've started experiencing this since Plasma 6, the only workaround is to uncheck System Settings -> Colors & Themes -> System Sounds -> Enable notification sounds. Unfortunately, doing so disables all notification sounds which is not acceptable.
I'm sorry if this isn't related to Kwin. I did not find a more matching product.
Comment 1 milkytwix 2024-03-17 19:00:50 UTC
I can observe the same behaviour on my system, everything in the buf report is the same, but ofc on another config:
Operating System: EndeavourOS 
KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.6.22-1-lts (64-bit)
Graphics Platform: X11
Processors: 32 × AMD Ryzen 9 5950X 16-Core Processor
Memory: 62,7 GiB of RAM
Graphics Processor: AMD Radeon RX 6800 XT
Manufacturer: Micro-Star International Co., Ltd.
Product Name: MS-7C84
System Version: 1.0
Comment 2 kde 2024-03-17 19:03:57 UTC
(In reply to milkytwix from comment #1)
> I can observe the same behaviour on my system, everything in the buf report
> is the same, but ofc on another config:
> Operating System: EndeavourOS 
> KDE Plasma Version: 6.0.2
> KDE Frameworks Version: 6.0.0
> Qt Version: 6.6.2
> Kernel Version: 6.6.22-1-lts (64-bit)
> Graphics Platform: X11
> Processors: 32 × AMD Ryzen 9 5950X 16-Core Processor
> Memory: 62,7 GiB of RAM
> Graphics Processor: AMD Radeon RX 6800 XT
> Manufacturer: Micro-Star International Co., Ltd.
> Product Name: MS-7C84
> System Version: 1.0

Thanks for confirming this. I also have an AMD GPU and CPU, and I'm running on X11.
I wonder whether this sound effect was implemented intentionally and is supposed to appear on all windows, or is it a bug?
I think I can only replicate it on GTK windows, what about you?
Comment 3 Vlad Zahorodnii 2024-03-18 10:10:28 UTC
I cannot reproduce it. kwin also has no code to play a sound when a window is minimized, maximized, or closed. can you reproduce the bug when using default settings or in a new user profile?
Comment 4 kde 2024-03-18 15:39:00 UTC
(In reply to Vlad Zahorodnii from comment #3)
> I cannot reproduce it. kwin also has no code to play a sound when a window
> is minimized, maximized, or closed. can you reproduce the bug when using
> default settings or in a new user profile?

So, after creating a new user and logging in, I can not reproduce the issue, unless I switch the global theme and then switch the system sounds theme + mash the enable notification sounds button a few times. After doing this, the issue appears and I can no longer eliminate it (even when I switch back to the original global and system sounds theme).
I've tried this on 2 new accounts and both exhibited this behavior.

It is very well possible that this is not caused by Kwin, unfortunately, I have no idea what is causing this as the sound is not coming from the applications themselves (when I mute the application, the sound still appears). The only thing I know is that this is related to the Colors & Themes > Global Theme > System Sounds > Enable notification sounds checkbox. Do you have any idea which component handles it?
Comment 5 Bug Janitor Service 2024-04-02 03:47:10 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 6 kde 2024-04-02 13:09:40 UTC
Oops, I forgot to set the bug as REPORTED. See my reply above.
Comment 7 ricevacuum 2024-04-16 09:22:38 UTC
I can confirm.

Sound files that are played:
/usr/share/sounds/oxygen/stereo/window-close.ogg
/usr/share/sounds/oxygen/stereo/window-maximized.ogg
/usr/share/sounds/oxygen/stereo/window-minimized.ogg

OS: Arch Linux
KDE Plasma version: 6.0.3
KDE Frameworks version: 6.1.0
Qt version: 6.7.0
Graphics Platform: X11
Comment 8 kde 2024-05-05 19:15:18 UTC
Hey, 
I just want to confirm that this issue is still present on 6.0.4.
However, it seems like this only happens on X11, not on Wayland.
Comment 9 Vlad Zahorodnii 2024-05-31 12:05:18 UTC
>  Enable notification sounds checkbox. Do you have any idea which component handles it?

soundtheme kcm which is in plasma-workspace
Comment 10 Nate Graham 2024-08-01 18:59:54 UTC
Those are all GTK apps, I notice.

I'm leaning towards this being some weird internal GTK setting that happened to get turned on, which respects the systemwide sound theme setting (it is a cross-desktop spec after all, so this makes some sense).

Those of you who are affected, can you also reproduce it with more GTK apps? And can you NOT reproduce it with any KDE, Qt, or Electron apps?
Comment 11 kde 2024-08-01 19:04:51 UTC
(In reply to Nate Graham from comment #10)
> Those are all GTK apps, I notice.
> 
> I'm leaning towards this being some weird internal GTK setting that happened
> to get turned on, which respects the systemwide sound theme setting (it is a
> cross-desktop spec after all, so this makes some sense).
> 
> Those of you who are affected, can you also reproduce it with more GTK apps?
> And can you NOT reproduce it with any KDE, Qt, or Electron apps?

I think you're correct; I can only reproduce it on GTK apps.
BTW, if I remove the following files:
```
/usr/share/sounds/oxygen/stereo/window-close.ogg
/usr/share/sounds/oxygen/stereo/window-maximized.ogg
/usr/share/sounds/oxygen/stereo/window-minimized.ogg
```
The issue disappears for some time, however, after a while it's back. (I guess that the files may get reinstated with a system update?)
Comment 12 Nate Graham 2024-08-01 22:17:29 UTC
That's probably the case, yes.

I don't have enough knowledge of GTK to tell you exactly which setting it causing this, but at this point I feel confident enough to say it's not a KDE bug. It's probably not a GTK bug either, just a setting that previously didn't work and now does, which results in an unexpected UX.

Do let us know if you manage to figure out what exact setting it is!
Comment 13 kde 2024-08-01 22:22:14 UTC
(In reply to Nate Graham from comment #12)
> That's probably the case, yes.
> 
> I don't have enough knowledge of GTK to tell you exactly which setting it
> causing this, but at this point I feel confident enough to say it's not a
> KDE bug. It's probably not a GTK bug either, just a setting that previously
> didn't work and now does, which results in an unexpected UX.
> 
> Do let us know if you manage to figure out what exact setting it is!

I think that this might be a KDE bug. This behavior is not reproducible under Wayland. You're indicating that this was probably intended to be a feature, in that case, it should work on Wayland too, right?
Comment 14 Nate Graham 2024-08-01 22:23:17 UTC
It would all depend on how it's implemented in GTK.
Comment 15 kde 2024-08-01 22:24:22 UTC
(In reply to Nate Graham from comment #14)
> It would all depend on how it's implemented in GTK.

If this is implemented in GTK, why did it start appearing exactly after the update to Plasma 6?
Comment 16 Nate Graham 2024-08-01 22:27:52 UTC
Plasma 6 was the first version of Plasma to support sound themes.