Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn off beeps #5253

Open
f2404 opened this issue Apr 28, 2016 · 35 comments

Comments

Projects
None yet
@f2404
Copy link

commented Apr 28, 2016

I have all effects disabled under Sound -> Sound Effects in the Settings, and the Effects Volume there is set to Muted. But I'm still hearing beeps in some applications (e.g. Nemo, Backgrounds settings) when pressing up (down) arrow button while the cursor is already at the topmost (bottommost) position.
How can I disable those beeps?

@mtwebster

This comment has been minimized.

Copy link
Member

commented Apr 28, 2016

Check your accessibility settings, you might have some typing assistance turned on.

@f2404

This comment has been minimized.

Copy link
Author

commented Apr 28, 2016

From all Accessibility settings, I only had Keyboard -> Enable audio alerts turned on. Nothing changed after turning it off, however.

@mtwebster

This comment has been minimized.

Copy link
Member

commented Apr 28, 2016

What version of cinnamon are you running?

@f2404

This comment has been minimized.

Copy link
Author

commented Apr 28, 2016

Cinnamon 3.0.1, Arch Linux.

@KickerTom

This comment has been minimized.

Copy link

commented Apr 29, 2016

Same problem here. Seems to really be connected to the new accessibility stuff, started after latest cinnamon upgrade. If I enable visual alerts, the screen flashes at the same time as the beep.
Happens also in e.g. firefox->find in page->enter text which is not found. Or Backspace in Nemo panel.

Edit: LMDE 2 Betsy, Cinnamon 3.0.1

@mtwebster

This comment has been minimized.

Copy link
Member

commented Apr 29, 2016

Can you try enabling and disabling the visual/audible alert stuff to see if it changes this? I'll try to reproduce it later.

@KickerTom

This comment has been minimized.

Copy link

commented Apr 29, 2016

I tried, no change. Visual alert enable/disable works, audible not. Interesting is that the configuration of audible alert specifies bell.ogg file, and playing it in the configuration indeed plays a sound file, but the keyboard is always producing "speaker beep", not ogg file replay. Changing the sound file has no effect.

@leigh123linux

This comment has been minimized.

Copy link
Member

commented Apr 30, 2016

@KickerTom Try disabling the "nemo terminalprovider" plugin to fix the nemo sound issue

@KickerTom

This comment has been minimized.

Copy link

commented May 1, 2016

Thanks for getting back to me. Not sure what you mean by "disabling nemo terminalprovider plugin". If you mean a plugin in Nemo, I don't have such plugin installed. Just out of curiosity I tried disabling all plugins there and restarting Nemo, but it didn't make any difference.
I doubt this has anything to do with Nemo, as I already stated I can observe the same effect in e.g. Firefox, when you do Find in page (Ctrl+F) and search for text which does not exist.

@f2404

This comment has been minimized.

Copy link
Author

commented May 4, 2016

I've accidentally found a work-around for this issue: unloading 'pcspkr' kernel module (sudo rmmod pcspkr) removes the beeps.

I'm not sure whether or not it is right to route speaker beeps through the sound card (as I was hearing them in my headphones), and which component (Cinnamon or not) is responsible for that...

@calestyo

This comment has been minimized.

Copy link

commented Aug 26, 2016

Is this the samen as what I've reported here? https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=824427

It should be noticed that this audible bell setting is apparently also inherited by programs running in cinnamon (e.g. firefox) which beeps everytime I search in a HTML page with no result.. pretty annoying...

@f2404: this is not really a solution, as it also disables the beeps for any legitimate uses e.g. when using the beep(1) command.

@mtwebster

This comment has been minimized.

Copy link
Member

commented Aug 26, 2016

Cinnamon Settings-> Accessibility-> Keyboard-> Enable audio alerts should be controlling this. Turn it off, these alerts should go away.

The triggering is handled internally by toolkits like Gtk - so any program using that toolkit will trigger the sound at certain events, by telling the x server to ring a bell, which our window manager sees, and does either the audio or visual alert or both, depending on what that setting is.

Turning off "Enable audio alerts" (and visual) tells our window manager to ignore these events. I can't reproduce the issue here on my end in Mint - I will give it a go on my arch vbox later.

Note: Any program can 'subscribe' to these triggers system-wide, and circumvent our controls.

@calestyo

This comment has been minimized.

Copy link

commented Aug 26, 2016

As I've written in the Debian bug, I have them all set to off, yet it still beeps. :(

@mtwebster

This comment has been minimized.

Copy link
Member

commented Aug 26, 2016

Would you guys mind running this script: https://gist.github.com/mtwebster/d9559821b6fb0f948f88f65e0ea9146d

Download it, or paste it into a text file, make it executable (chmod a+x *filename*)...

This might help me find out what's causing this problem - while it's running, do whatever you'd normally do to cause the sounds to occur, then pastebin the output.

Thanks

@calestyo

This comment has been minimized.

Copy link

commented Aug 26, 2016

$ ./sound-source-mon 
Monitoring sound stream...  ctrl-c to terminate


Stream added:   1 None alsa_output.pci-0000_00_1b.0.analog-stereo Built-in Audio Analog Stereo /devices/pci0000:00/0000:00:1b.0/sound/card0
Stream added:   2 None alsa_input.pci-0000_00_1b.0.analog-stereo Built-in Audio Analog Stereo None
Stream added:   3 None mpv Media Player 194.mp4 - mpv None
Stream added:   4 None System Sounds None None

Doesn't print more than that, even after restarting firefox.
And I did trigger the beeps from within firefox... (and also from gnome-terminal, though I had to enable the terminal bell setting for that, which I disabled since this issue rose up in cinnamon).

What I further just noticed:
When I Ctrl-F in Firefox and search a string that doesn't exist to trigger the beep... it doesn't happen always, that is:
When I search on a site for e.g. "fo" and that string still exists and then I add another "f" to make it "fof" it won't beep the first time.
When I add further characters like "fofgggg" it generally won't beep again until I go back to a string that it can find (i.e. "fo").
So when I do that (going back to "fo") and then wait sufficiently long (2-3s) I won't beep even if I add the "f" again (and it doesn't find "fof"... but when I do it pretty fast like
fo -> f, backspace, f, backspace, f...
it will beep every time.

Not sure if that helps in any way.

@mtwebster

This comment has been minimized.

Copy link
Member

commented Aug 26, 2016

Does anything get output if you do something like turn the volume up or down or change workspaces with a hotkey (try enabling a few things in the sound effects page of sound settings)

Try enabling audio alerts from accessibility settings - do you then get 2 sounds each time you trigger it? Or still just one? Is it the bell.ogg sound or something else? With audio alerts enabled, you should see this spewed out in that little monitor program i made.

I just want to be sure the utility is working for you the same way it's working for me.

@mtwebster

This comment has been minimized.

Copy link
Member

commented Aug 26, 2016

by the way, it looks like firefox can also be individually disabled in about:config - accessibility.typeaheadfind.enablesound

@calestyo

This comment has been minimized.

Copy link

commented Aug 26, 2016

I did for minimizing windows and switching workspaces:
$ ./sound-source-mon 
Monitoring sound stream...  ctrl-c to terminate


Stream added:   1 None alsa_output.pci-0000_00_1b.0.analog-stereo Built-in Audio Analog Stereo /devices/pci0000:00/0000:00:1b.0/sound/card0
Stream added:   2 None alsa_input.pci-0000_00_1b.0.analog-stereo Built-in Audio Analog Stereo None
Stream added:   3 None mpv Media Player 194.mp4 - mpv None
Stream added:   4 org.gnome.VolumeControl cinnamon Peak detect None
Stream added:   5 None System Sounds None None
Stream added:   6 org.freedesktop.libcanberra libcanberra /usr/share/sounds/freedesktop/stereo/bell.oga None
Stream removed: 6
Stream added:   7 org.freedesktop.libcanberra libcanberra /usr/share/sounds/freedesktop/stereo/bell.oga None
Stream removed: 7
Stream added:   8 org.freedesktop.libcanberra libcanberra /usr/share/sounds/freedesktop/stereo/bell.oga None
Stream removed: 8

(btw: Switch workspace sounds only work when doing it via workspace switcher applet, not when doing it via hotkeys)...

Anyway one sees some events in your program.

But just to emphasise this again:
The bell sound I hear in Firefox/etc. is really the pcspkr beeper, I guess... and not somthing from the soundcard as in your the sound events for minimising windows.

To mute those sounds right now (since this whole issue appeared) I mute the respective channel ("Beep") in alsamixer for the soundcard device.

@mtwebster

This comment has been minimized.

Copy link
Member

commented Aug 26, 2016

Man.. an actual speaker beep. I am mixing your reporting with the other user who said it was in the headphones.. I'm not sure what could be causing this. Have you had a look at https://wiki.archlinux.org/index.php/Disable_PC_speaker_beep? Check your running processes for clues? Any type of alert like this coming from Cinnamon, you'd see it in that monitor utility, so I think something else must be causing it.

@mtwebster

This comment has been minimized.

Copy link
Member

commented Aug 26, 2016

I'm particularly curious if adding:

[Settings]
gtk-error-bell = 0

to ~/.config/gtk-3.0/settings.ini has any effect here.

We don't appear to control that with our usual machinery (in fact gtk doesn't provide a way to control it system-wide, either, like many other similar settings).

@mtwebster

This comment has been minimized.

Copy link
Member

commented Aug 27, 2016

Actually, if this does solve it, I have an api I wrote that I can automatically update that file for you via cinnamon settings (we had to do this to enable dark theme variants, which suffers from the same problem of not being configurable system-wide without having root permissions)

@calestyo

This comment has been minimized.

Copy link

commented Aug 27, 2016

Sorry for the confusion I might have caused... shall we open a new bug for this then?
Anyway as for what you've wrote above:
The arch wiki also suggests the setting which I already have set to false (and doesn't affect this apparently)... unloading the speaker module is IMHO not an alternative but just a bad workaround like muting the channel.

But... you had a good guess with gtk-error-bell.. I set it retried with firefox,... didn't change anything there (not sure why... perhaps firefox is doing this completely independent?).
Then I re-checked with gedit, i.e. also doing a search there, but gedit - on must notice - apparently never rings the bell when no match is found (like firefox), but it does when you have the search field open and backspace at the empty field (i.e. it tells you "I'm already empty")...
Now when I set gtk-error-bell, it in fact no longer beeps then in gedit.

Not sure if this was a change then in Debian's gtk, at least it happened to start when I upgraded cinnmon.

Also not sure what about firefox... of course I can use the setting you found out above, but if we knew whether it tries to inherit that somehow from the desktop environment, it would perhaps mean another fix is needed for FF.

@mtwebster

This comment has been minimized.

Copy link
Member

commented Aug 27, 2016

No, this bug is fine to keep open for now.. Firefox could very well just ignore the gtk setting - I know they recently updated to using gtk3 (I think?) but they're under no obligation to abide by GtkSettings, particularly if they already had their own machinery/systems in place - what still puzzles me, however, is even in my version of gtk3 here (on Mint 18), the gtk-error-bell setting also defaults to True, yet I don't suffer from this issue. In fact, if I turn it off, none of my nice shiny new audible/visual alert settings work at all.

If you care to, could you maybe make a new user and see if the issue occurs in that session also? I'm trying to understand why this appears to be so under-reported, for how annoying it might be. Maybe simply that support for these internal speakers is spotty? Or newer PCs don't have one anymore? I'm not sure - some vestigial feature buried in X server?

@f2404

This comment has been minimized.

Copy link
Author

commented Aug 27, 2016

Man.. an actual speaker beep. I am mixing your reporting with the other user who said it was in the
headphones..

@mtwebster I guess I was hearing that in the headphones because my laptop simply does not have a pc speaker, so its sounds get routed to the sound card. Just a guess, but proved with the fact that unloading pcspkr kernel module removes the sounds.

@calestyo

This comment has been minimized.

Copy link

commented Aug 30, 2016

@mtwebster I just tried with a new user, and the issues occurs as well.

Perhaps some speakers are either not exported through the soundcard via ALSA, or the default to be muted?

@calestyo

This comment has been minimized.

Copy link

commented Dec 24, 2016

fyi: still in Cinnamon 3.2.6

@dg1727

This comment has been minimized.

Copy link

commented Feb 12, 2017

I'm having a similar experience as user "calestyo". All the beeps in question are PC-speaker beeps, not line-out audio-file playback:

  • Bluefish was beeping when I backspaced in an empty search field, but the ~/.config/gtk-3.0/settings.ini stopped that. I wish there were also an option to select an audio file to be played for this beep; I looked briefly in the GTK+ documentation on the Web, but I didn't find such an option.
  • Firefox beeps when I type a search string that doesn't exist in the webpage. I've set accessibility.typeaheadfind.enablesound to false, and I assume the beeps will go away after I restart Firefox. I also noticed accessibility.typeaheadfind.soundURL which should let Firefox use the sound card as opposed to the PC speaker.
  • There is a beep on logout of the desktop (e.g., restarting the PC). It seems louder and/or longer than the error beeps in text fields. I'd rather be able to disable this beep specifically, and optionally select an audio file to be played on the sound card's line out, instead of disabling all PC-speaker beeps altogether.

LMDE 2 Cinnamon 64-bit, Cinnamon 3.2.7

@dg1727

This comment has been minimized.

Copy link

commented Feb 12, 2017

Yes, after restart of Firefox, it's no longer beeping when I type a search string that doesn't exist in the webpage.

@dg1727

This comment has been minimized.

Copy link

commented Feb 12, 2017

To select an audio file for the X11 beep, a technique in the following bug report worked for me:
https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/231234
Uncomment the lines in /etc/pulse/default.pa that are as follows: (they're typically not consecutive)
load-sample-lazy x11-bell FILENAME
load-module module-x11-bell sample=x11-bell

This affects programs that can produce an X11 beep, including GTK+ programs such as Bluefish, but it doesn't affect the beep on logout.

@selliott512

This comment has been minimized.

Copy link

commented Mar 8, 2017

It's not an ideal solution, but one way to get rid of such beeps is to find it's audio file and then replace that audio file with silence. For example, on my Fedora 25 system the beep that's played, both in gedit when the end of the buffer is reached and in Eclipse in some cases, is drip.ogg. On my system it's in /usr/share/sounds/gnome/default/alerts. Maybe it works to simply remove it, but I chose to replace it with a silent file of the same type and length:

cd /usr/share/sounds/gnome/default/alerts
mv drip.ogg drip.ogg.orig
sox -v 0 drip.ogg.orig silence.ogg
ln -s silence.ogg drip.ogg

After the above on my system /usr/share/sounds/gnome/default/alerts looks like:

-rw-r--r--. 1 root root 13322 Oct 21 12:22 bark.ogg
lrwxrwxrwx. 1 root root    11 Mar  8 11:03 drip.ogg -> silence.ogg
-rw-r--r--. 1 root root  8495 Oct 21 12:22 drip.ogg.orig
-rw-r--r--. 1 root root 18999 Oct 21 12:22 glass.ogg
-rw-r--r--. 1 root root  4065 Mar  8 11:03 silence.ogg
-rw-r--r--. 1 root root 20011 Oct 21 12:22 sonar.ogg

Alternatively the beep could be made quieter with something other than -v 0. Maybe -v 0.3 or something like that.

@calestyo

This comment has been minimized.

Copy link

commented Mar 8, 2017

o.O ... or I dismount my soundcard?!

@HW71

This comment has been minimized.

Copy link

commented Apr 14, 2017

Hi all,

actually for me the hint @mtwebster gave here:

#5253 (comment)

did the trick: in my case this ugly "beep" coming from the internal PC speaker occurred for example when pressing [Backspace] more often than characters were available in any textfield (for example password field in Legitimation dialog after starting Synaptic).

Now creating a new settings.ini and adding gtk-error-bell = 0 as outlined above finally eliminated this "beep" without removing pcspkr kernel module (I didn't want to do that, because I'm afraid that this could have side effects, for example not alerts in case of important hardware issues).

After restarting my laptop the setting became effective (but I assume logging-off and on again would have been sufficient).

HTH & Cheers, Erik

@RoyiAvital

This comment has been minimized.

Copy link

commented Aug 26, 2017

Does it affect MATLAB's sound (Usually a beep) when there is a run error?

In Windows MATLAB makes a beep for error.
Yet on Linux Mint I can't hear it.

MATLAB's beep() status is ON yet no sound.

Thank You.

@SEV007

This comment has been minimized.

Copy link

commented Nov 23, 2017

Actually it's pretty simple.
Just go to Keyboard >> Shortcuts >> Sound and Media (on the left panel) >> Rewind (on the right panel)
Now all you have to do is unassign the sound effect by double clicking it and pressing ESCAPE ;)
And we are done. No more backspace beeping sound. Enjoy.

@linkp

This comment has been minimized.

Copy link

commented Aug 13, 2018

@SEV007 What you describe is the steps to unassign physical keys that control media player software.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.