Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have tried and tried to get the system beep working, but with no success.

I have selected System-->Sound-->System Beep-->Enable Audible Beep (from the Gnome Desktop) I have tried from a Terminal window Edit-->General Tab-->Selecting terminal bell checkbox I have tried entering modprobe pcspkr at the command line.

Trying echo -e '\a' or using the beep application - Nothing works!

I know my hardware speaker works, because if on startup the battery is low it will beep.

Update: It is a laptop computer. It is an IBM Thinkpad, iSeries.

I did look at the modprobe blacklist, and pcspkr was not listed.

share|improve this question

migrated from stackoverflow.com Aug 14 '09 at 11:46

This question came from our site for professional and enthusiast programmers.

add comment

13 Answers

This might be a possible solution

What happens sometimes is the pcspkr might be added to blacklist to remove it from the blacklist

Edit /etc/modprobe.d/blacklist and remove these lines if they exist : (NOTE: You need to edit /etc/modprobe.d/blacklist.conf instead)

# get rid of system beep

blacklist pcspkr

Reboot to de-activate this line.To disable the speaker (that emits the beep), add these lines and reboot.

This might solve your problem. Can provide more information if we know the system details.

If that doesn't solve your problem try running sudo modprobe pcspkr .

share|improve this answer
1  
I did check the blacklist, but it wasn't listed. –  Melissa W Aug 14 '09 at 11:44
    
Why rebooting? Just load the module manually. –  Pascal Thivent Oct 13 '09 at 13:36
    
This is the default for 10.04 –  charlesbridge May 27 '10 at 20:21
    
Sadly, did not help. –  Tal Weiss Feb 20 '12 at 8:33
1  
@Robru Thanks that worked. Added it to the answer. –  Ufoguy Jan 27 at 16:31
show 2 more comments
  • Check if pcspkr module is currently loaded

    $ lsmod | grep pcspkr
    pcspkr 10496 0

  • Check if there are any related errors in /var/log/dmesg

    $ sudo grep pcspkr /var/log/dmesg
    [ 15.620198] input: PC Speaker as /devices/platform/pcspkr/input/input8

If there's still no clue, do a full manual check of /var/log/dmesg for other errors. A quick grep of the other logs in /var/log/* with today's timestamp might also turn up something.

The above steps are just to help you narrow down the possible issue. With these kind of problems, it can be difficult to guess the answer right off the bat.

share|improve this answer
add comment

I had the same problem. For me, it was solved by opening "alsamixer" on the console and unmuting the "Beep" slider.

share|improve this answer
    
This worked great for me on Ubuntu 10.04 –  Rian Sanderson Dec 28 '11 at 1:39
add comment

My laptop doesn't have a PC speaker, so I needed a software-only solution. I found an article about setting up GNOME to play an audio file for the system beep.

The idea is to set up xkbevd(1) to run a command when a certain event occurs; in this case, the event Bell. For Ubuntu 9.04 Jaunty (and possibly previous versions as well), many of the sound files provided are in ogg vorbis format instead of wave, so depending on which sound you want to play on a terminal bell, using aplay(1) may not work. If you don't already have it, you'll need to install the vorbis-tools package:

sudo aptitude install vorbis-tools

After that, you'll need to create ~/.xkb/xkbevd.cf (note the spelling, the article has a typo here) and insert the following:

soundDirectory="/usr/share/sounds/"
soundCmd="ogg123 -q"

Bell() "ubuntu/stereo/bell.ogg"

In order to have the daemon run on login, you can edit your profile as the article suggests, or you can add it to your Startup Applications (System -> Preferences ->Startup Applications). Click on Add to create a new startup program, set the Name to XKB Event Daemon, the command to xkbevd -bg, and the comment to Software terminal bell.

share|improve this answer
    
use this if you don't want the bell sound to queue: Bell() shell "(if [ ! -e /run/lock/bell_playing ]; then touch /run/lock/bell_playing; paplay /usr/share/sounds/ubuntu/stereo/bell.ogg; rm /run/lock/bell_playing; fi ) &" –  Janus Troelsen Oct 10 '12 at 23:16
add comment

First, you need to be sure the right module is loaded. If not, the sound control center won't do nothing AFAIK (and even if the module is loaded, I don't know if the bugs mentioned in this thread are solved in Jaunty).

What version of Ubuntu are you using? Prior to Jaunty, the module was name snd_pcspkr.

Can you give us the output of:

lsmod | grep pcspkr

Can you give us the output of:

grep pcspkr /etc/modprobe.d/blacklist*

BTW, pcspkr is blacklisted by default again in Karmic.

share|improve this answer
add comment

http://ubuntu-virginia.ubuntuforums.org/showthread.php?t=1315929

Post number 6 solved it for me. In short do the following in a terminal:

  1. run 'alsamixer'
  2. move to PC Beep
  3. press m to unmute
  4. set volume
  5. press escape
share|improve this answer
    
Thanks - this worked in Ubuntu 12.04. Critical in my case was the need to unmute the beep in alsamixer. How do we find out if we have a pc speaker? (And what was the plan on the developer side anyway in terms of disabling beeping by default?) –  nealmcb May 7 at 14:54
add comment

I installed beep with:

sudo aptitude install beep

Now I can call beep from shell or script with

beep
beep -r 3

This program can do much more. See man beep.

share|improve this answer
add comment

On Ubuntu 14.04 (and perhaps others), the module-x11-bell module tries to play a bell.ogg sample, which is not loaded in PulseAudio's sample cache. As a workaround to load it manually, type this in a terminal:

pactl upload-sample /usr/share/sounds/ubuntu/stereo/bell.ogg bell.ogg

To make this permanent, add the above line inside .xprofile in your home directory (create it if it doesn't exist already).

This command will tell you whether the sample is loaded or not:

pactl list samples
share|improve this answer
add comment

Try this:

sudo modprobe pcspkr
share|improve this answer
add comment

For me the solution was a combination of the posts from Leo and nana.galvao:

  • run alsamixer, unmute Beep and set a decent volume.
  • sudo modprobe pcspkr
  • and of course install the beep package with sudo apt-get install beep
share|improve this answer
add comment

This could depend on the type of computer you are using. Are you using a laptop or desktop PC? What is the model. That will hopefully help find a solution. :)

share|improve this answer
    
It is an IBM ThinkPad iSeries laptop –  Melissa W Aug 14 '09 at 11:43
add comment

The command beep didn't work for me so I came up with an own solution:

alias beep="mplayer -ao alsa $HOME/bin/alert.wav &>/dev/null"

Where alert.wav is a short audio file. Usage:

$ sleep 2; beep

See my blog post about it here.

share|improve this answer
    
Doesn't that play it in the speakers and not the buzzer? –  Ufoguy Jan 27 at 16:33
add comment

I've been researching this problem for a week or so, and I've discovered one of the two machines that I wanted to make beep does not have a built in pc-speaker (weird). So check if there is one.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.