#83 GTK apps produce horrible jarring beeps when run on KDE Plasma
Opened a year ago by ngraham. Modified 7 months ago

Open Firefox > Ctrl+F to search > type "ffffffffff" or some other nonsense text that will not match anything

Boom, your speakers will emit a horrendous loud beeping sound, even if you have set the volume very low; it plays unless the speakers are explicitly muted. The sound makes you want to throw the computer out the window and irritates your spouse who's sitting next to you. If you're in a library or a lecture hall, you will annoy and dusturb everyone else in the room, with potential social consequences. If you're wearing earbuds, it can be physically painful. I have personally experienced all of these things happening.

It happens because GTK apps emit the system bell in response to various conditions, and expect the window manager to intercept that signal and instead play a quieter, more pleasant notification sound. GNOME's Mutter does this, but KDE's KWin does not.

There are several ways that this could be fixed:

  1. Have KWin intercept these signals and play a nicer sound like Mutter does. This was vetoed by KWin's former maintainer a few years ago: https://bugs.kde.org/show_bug.cgi?id=381887
  2. Write a small daemon that lives outside of KWin to do the above, or have an existing KDE daemon like kded do it.
  3. Disable the system bell systemwide with echo "blacklist pcspkr" > /etc/modprobe.d/nobeep.conf (this is what Ubuntu does; see https://bugs.launchpad.net/ubuntu/+source/module-init-tools/+bug/77010)
  4. Make GTK apps no longer emit system bells by setting gtk-error-bell=0 in gtk-{2.0,3.0,4.0}/settings.ini files in ~/.config/ or /etc/

I would prefer option 1 or option 2. Can we bring this up with the current kwin maintainer to see if it could be implemented?

Sure, I can do that soon.

Metadata Update from @ngompa:
- Issue set to the milestone: Future Release
- Issue tagged with: experience

10 months ago

I just found out that there's a PulseAudio module that does this: module-x11-bell. It now exists for PipeWire too, having been released in today's 0.3.44 update.

So I think this is a distro task after all, not a KDE task. It looks like it needs to be configured with the sound file to play, or else it'll play something ugly. A reasonable candidate would be /usr/share/sounds/Oxygen-Sys-App-Message.ogg

Login to comment on this ticket.

Metadata