Enabling the PC Speaker in Karmic

So I upgraded to Ubuntu karmic a few weeks back. To my horror, I found that the PC Speaker has been disabled. I like the use of the PC Speaker, for irssi and my email. It’s very handy. I seem to be one of the few people that feel like this. Anyway… After a few weeks, I’ve finally worked out how to enable it again :) Yay!

  1. Open up /etc/modprobe.d/blacklist.conf
    gksudo gedit /etc/modprobe.d/blacklist.conf

    (Use kdesu rather than gksudo, in KDE)

  2. Comment out the following lines, by placing a # at the start:
    blacklist snd_pcsp
    blacklist pcspkr
  3. Save and exit.
  4. Load the modules manually, rather than restarting
    sudo modprobe snd_pcsp
    sudo modprobe pcspkr

It could work now. Have a try. If not, you may have to change a gconf setting. To do this:

  1. Load the gconf editor:
    gconf-editor
  2. Navigate to /desktop/gnome/peripherals/keyboard
  3. Adjust bell_mode to on

Edit: Now this did originally work for me, but it stopped after I rebooted and snd_pcsp was making the pc speaker make strange noises. So I’ve tweaked it a bit.

  1. Blacklist the two modules again in /etc/modprobe.d/blacklist.conf
  2. Open up /etc/rc.local
    gksudo gedit /etc/rc.local
  3. Before the exit line add these two lines:
    modprobe pcspkr
    modprobe snd_pcsp

The end. It REALLY should be working now. Good luck!

7 comments ↓

#1 Paradiesstaub on 11.14.09 at 10:35 pm

I was very happy that they disabled pcspkr with Karmic. One of the first things I did before was to set them on the blacklist.

I never understood why my computer should make a sound when shutting down or deleting files. The beep was disturbing me a lot without having any use.

#2 Andrew Gee on 11.14.09 at 10:37 pm

Yeah. I’m glad they did disable it. I prefer it on though. It’s very useful when using a terminal, IMO.

Each to their own :)

#3 Daniel T Chen on 11.14.09 at 11:28 pm

We’re working across the stacks to make these sorts of complaints better framed as simple checkboxes. A grand objective, and more easily stated than accomplished, but we’re already seeing some fruits in upstream ALSA, where the PC Speaker mixer controls have been coalesced and renamed in a straightforward fashion. The ultimate goal to move away from blacklisting kernel drivers is inching closer.

(As an aside, #1 and your response perfectly illustrate why working on Linux audio in a popular distribution is really tough — I’m damned if I do; I’m damned if I don’t.)

#4 Andrew Gee on 11.14.09 at 11:31 pm

Great! I understand perfectly that this system beep should be disabled by default. It’s good to here that it’ll be easy for people to turn it back on, if wanted.

Thanks :)

#5 topyli on 11.14.09 at 11:37 pm

In the past, I got used to people asking how to disable the PC speaker. Now that it’s disabled by default, we realize that lots of people actually want it! :-)

Anyway, please don’t encourage people to use sudo with graphical applications like gedit. The correct way is to use gksudo (in GNOME) or kdesu (in KDE). This way, configuration files and lock files and backups and whatever don’t end up being owned by root, which can cause trouble with your future X sessions.

Cheers!

#6 Andrew Gee on 11.14.09 at 11:40 pm

I’ve updated that, topyli. Thanks for pointing that out :)

#7 Ryan on 12.09.09 at 6:18 am

I’m not sure you want snd_pcsp. I think that module actually uses the pc speaker as a regular speaker, not a beep generator.

Leave a Comment