Starting in Ubuntu 10.04 (Lucid Lynx), the pcspkr kernel module is blacklisted by default. See this Launchpad bug report.
Disabling the System Bell
You know that beep you get when press the wrong key in xterm? Well here is a mini-howto to get rid of the beep (system bell) if it annoys you.
In KDE the system bell can be turned off or on by: K Menu > System > System Settings
You can stop the PC speaker from beeping by removing the PC speaker kernel module. To do so run the following command in a terminal:
sudo rmmod pcspkr
A more permanent way is to disable the loading of the PC speaker kernel module. Add the following line to your /etc/modprobe.d/blacklist.conf file, to blacklist and stop the module for loading at boot:
To re-enable the bell, comment the blacklist line with a # symbol:
# blacklist pcspkr
Thanks to the users who investigated this on the Ubuntu forums