How can I blacklist the 'pcspkr' module?

Asked by Jonathan Anderson

I really hate my laptop's "beep" speaker... it's super-loud and super-obnoxious. Currently, whenever I log in, one of the first things I do is 'sudo rmmod pcspkr'... there *must* be a way to automate this.

How can I blacklist some arbitrary kernel module, or, barring that, at least automatically rmmod it when Ubuntu boots?

Thanks in advance.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
I Gede Bagus Kosha
Solved:
Last query:
Last reply:
Revision history for this message
Mathias Uebelacker (muebelacker) said :
#1

Hello,

you can add your command to the rc file in /etc/init.d/ The rc file includes all commands which starts or stops services which will execute by every runlevel change.

br
Mathias

Revision history for this message
Best I Gede Bagus Kosha (kosha) said :
#2

You can add your kernel module at /etc/modprobe.d/blacklist so it will be blacklisted when system boots.

Revision history for this message
Jonathan Anderson (jonathan-anderson) said :
#3

Thanks I Gede Bagus Kosha P, that solved my question.

Revision history for this message
Jonathan Anderson (jonathan-anderson) said :
#4

That did the trick... thanks!

Revision history for this message
Ktron (kevin-hamer) said :
#5

Yes, Kosha answer works perfectly in Feisty and Gutsy (at least).

Revision history for this message
Graham Tibbitts (graham-tibbitts) said :
#6

Update: Jaunty Jackalope

Add 'blacklist pcspkr' to the file /etc/modprobe.d/blacklist.conf .