GNOME Bugzilla – Bug 790815
Bell rate limit
Last modified: 2018-03-03 20:13:02 UTC
There are a few reports about ringing the bell too much causing the desktop to freeze or pulseaudio to crash, or being annoying in other ways: https://bugzilla.redhat.com/show_bug.cgi?id=1369777 https://github.com/mate-desktop/mate-terminal/issues/208 https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1689555 https://bugzilla.redhat.com/show_bug.cgi?id=1471751 I guess we should rate limit the bell (probably both the beep() call itself as well as the emission of the "bell" signal). Maybe to the ballpark of 5-10 per second?
Currently both gdk_window_beep() and the signal emission is performed once for each BEL character encountered. I guess there's no need for an explicit limit, just use the same pattern as we do with let's say window title changes: Flip a dirty flag which will be handled once per batch processing the input. And while at it, let's smash bug 731453.
Some rate limiting was recently added to gtk+'s Wayland backend. See bug 778188.
(In reply to Debarshi Ray from comment #2) > Some rate limiting was recently added to gtk+'s Wayland backend. See bug > 778188. Cool! Does this mean that X11 is still effected, or it wasn't effected at all??
(In reply to Egmont Koblinger from comment #3) > (In reply to Debarshi Ray from comment #2) > > Some rate limiting was recently added to gtk+'s Wayland backend. See bug > > 778188. > > Cool! > > Does this mean that X11 is still effected, or it wasn't effected at all?? I don't recall. There is a downstream Fedora bug (called "beepbleed") that might have more details.
beepbleed: https://bugzilla.redhat.com/show_bug.cgi?id=1466654 Sounds like one of those bugs where studying the current state of things might take more time than just going ahead and implementing rate limiting :-D
Should be fixed on master.
Awesome, thanks! (Haven't tested, I trust you :))
I have tested it a bit, but since (one of) gnome-shell/mutter/gtk also already limits, I might have missed something... [commit 5c94130ec7a8f9bb5eb38db7c7fe384c9699a199]
gtk added a limit recently, but only to its wayland backend and not to x11, no clue why. I'm still on x11. I might check the behavior one day. Too lazy now. I looked at the code and it seemed okay, pretty much the same as the gtk change, obviously there's not much to do differently here.