The new laptop I just bought had the bad habit of using the pc speaker at a loud level. It was deranging the coleagues at work when autocompletion yelded more than one result or none (it also scared me a few times during the last nights when I was configuring and testing the laptop).
So I unloaded the module (pcspkr) by hand and wanted to make the system not load it anymore.
So I thought that blacklisting it would do the trick. Probably some people know already that adding al line like:
in /etc/modprobe.d/blacklist doesn't work. The rest of you find out now. I found out at the next reboot, when I heard again the beep.
Ok, I googled a bit and found some info about restricting ipv6 modules being loaded so I though I could do the same for pcspkr. So I tried:
to change the line from /etc/modprobe.d/pnp-hotplug:
alias pnp:dPNP0800 pcspkr
alias pnp:dPNP0800 off
That didn't work either.
So, at this point I googled more and found some outdated information about update-modules.
That brought me to modprobe.conf(5) which pointed to the "right" solution.Write the following in some file in /etc/modprobe.d/ (I added it in blacklist, since it seemed the right place)
install pcspkr true
Which seems to do what I want.
Still something tells me that either:
1) there is a cleaner solution I am not thinking about
2) I could have told udev not to load the module... And I feel this solution should have to do something with these lines and "ACTION":
eddy@bounty /etc/udev $ grep -r pcspkr *
A clean solution would be appreciated.