Bug 381887 - KWin should replace system bells initiated by GTK programs with the standard alert sound
Summary: KWin should replace system bells initiated by GTK programs with the standard ...
Status: RESOLVED INTENTIONAL
Alias: None
Product: kwin
Classification: Plasma
Component: compatibility (show other bugs)
Version: 5.9.4
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 379295 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-07-01 22:46 UTC by Nate Graham
Modified: 2017-07-03 12:02 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2017-07-01 22:46:32 UTC
GTK emits system error bells to play an alert sound. By themselves, these are extremely unpleasant. So several years ago, GNOME 2.0's window manager metacity was changed to capture system bell events and translate them to a more pleasant sound [1]. This is well and good for GNOME, but KWin does not do the same thing, so GTK programs run from within a KDE Plasma environment *do* emit harsh, unpleasant system bell noises instead of something nicer like /usr/share/sounds/KDE-Sys-App-Error.ogg.

Absent KWin performing this translation, there are only bad options:
1. Live with the unpleasant noises, which cause user frustration and hatred [2].
2. Turn off the error bells throughout all of GTK by setting "gtk-error-bell = 0" in /etc/gtk-3.0/settings.ini, which prevents any alert sounds from playing at all. And regardless, this would be a distro change, not something KDE could enforce.
3. Turn off the PC speaker systemwide by adding "blacklist pcspkr" in /etc/modprobe.d/blacklist.conf. This is actually what Ubuntu does. This silences GTK programs as well as any potentially legitimate uses of the ancient PC speaker, and as with #2, KDE can't enforce this.




[1] For more information see these bugs for background:
https://bugzilla.gnome.org/show_bug.cgi?id=607906
https://bugs.launchpad.net/ubuntu/+source/module-init-tools/+bug/77010
https://bugs.launchpad.net/ubuntu/+source/metacity/+bug/486154


[2] See some of the comments in https://bugs.launchpad.net/ubuntu/+source/module-init-tools/+bug/77010):

"No longer get the beep that just about gets people evicted from their apartment for blasting it at 3AM, or blows out someones ear drums while relaxing to some music with headphones."

"I would go so far as to say that we NEVER want to play the system beep during the course of a normal graphical session; sometimes it is so loud, users look as if they had received an electric shock"

"It was especially antagonizing when I was playing Solitaire as my last act before heading to bed, using the rote click-click-click to stupefy my attention and relax; except that clicking an already clicked card caused this loud shrieking bleep, which rather defeated the purpose of the game for me."
Comment 1 Nate Graham 2017-07-01 22:51:22 UTC
*** Bug 379295 has been marked as a duplicate of this bug. ***
Comment 2 Martin Flöser 2017-07-02 06:42:22 UTC
This is not a task of the window manager.
Comment 3 Nate Graham 2017-07-02 23:17:53 UTC
The GTK developers evidently think differently. And we both know that they're not going to change their mind. That leaves two possible outcomes:

1. KWin adapts, and GTK programs run under KWin play pleasant system sounds in all KDE environments and distros going forward.

2. KWin doesn't adapt, and GTK programs run under KWin periodically produce unpleasant beeps that don't respect the system volume level unless distros take matters into their own hands by either turning off all alert sounds in GTK programs, or muting the PC speaker globally.

It sounds like you're saying that #2 is acceptable for the foreseeable future. Is that correct?
Comment 4 Martin Flöser 2017-07-03 04:23:32 UTC
KWin won't implement this. Just because gnome added this to the window manager, doesn't mean we have to add it to the window manager. It could also be a dedicated app.

So again: it is not a task of the window manager.
Comment 5 Nate Graham 2017-07-03 12:02:07 UTC
All right.