You are not logged in.

#1 2009-01-31 01:42:57

Raccoon1400
Member
From: Ontario, Canada
Registered: 2008-04-14
Posts: 853

blacklist pcspkr after udev mods

I modifided udev using option 3 here:
http://wiki.archlinux.org/index.php/Spe … v#Option_3
which among other things disables blacklisting in rc.conf

so I have to blacklist in /etc/modprobe.conf

but, pcspkr still loads and I hate system beep so much.
other blacklisted modules don't load, it's just pcspkr.

here's rc.conf and modprobe.conf

root@duncan-arch duncan]#cat /etc/rc.conf
#
# /etc/rc.conf - Main Configuration for Arch Linux
#

# -----------------------------------------------------------------------
# LOCALIZATION
# -----------------------------------------------------------------------
#
# LOCALE: available languages can be listed with the 'locale -a' command
# HARDWARECLOCK: set to "UTC" or "localtime"
# USEDIRECTISA: use direct I/O requests instead of /dev/rtc for hwclock
# TIMEZONE: timezones are found in /usr/share/zoneinfo
# KEYMAP: keymaps are found in /usr/share/kbd/keymaps
# CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)
# CONSOLEMAP: found in /usr/share/kbd/consoletrans
# USECOLOR: use ANSI color sequences in startup messages
#
LOCALE="en_US.utf8"
HARDWARECLOCK="localtime"
USEDIRECTISA="yes"
TIMEZONE="Canada/Eastern"
KEYMAP="us"
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"

# -----------------------------------------------------------------------
# HARDWARE
# -----------------------------------------------------------------------
#
# MOD_AUTOLOAD: Allow autoloading of modules at boot and when needed
# MOD_BLACKLIST: Prevent udev from loading these modules
# MODULES: Modules to load at boot-up. Prefix with a ! to blacklist.
#
# NOTE: Use of 'MOD_BLACKLIST' is deprecated. Please use ! in the MODULES array.
#
MOD_AUTOLOAD="yes"
#MOD_BLACKLIST=(bcm43xx b43 ssb) #deprecated
MODULES=(mii ndiswrapper b44 snd-mixer-oss snd-pcm-oss snd-hwdep snd-page-alloc snd-pcm snd-timer snd snd-hda-intel acpi-cpufreq cpufreq_ondemand cpufreq_powersave soundcore vboxdrv usblp fuse iwl3945)

# Scan for LVM volume groups at startup, required if you use LVM
USELVM="no"

# -----------------------------------------------------------------------
# NETWORKING
# -----------------------------------------------------------------------
#
# HOSTNAME: Hostname of machine. Should also be put in /etc/hosts
#
HOSTNAME="duncan-arch"

# Use 'ifconfig -a' or 'ls /sys/class/net/' to see all available interfaces.
#
# Interfaces to start at boot-up (in this order)
# Declare each interface then list in INTERFACES
#   - prefix an entry in INTERFACES with a ! to disable it
#   - no hyphens in your interface names - Bash doesn't like it
# 
# DHCP:     Set your interface to "dhcp" (eth0="dhcp")
# Wireless: See network profiles below
#
#eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"
eth0="dhcp"
wlan0="dhcp"
INTERFACES=(eth0 wlan0)

# Routes to start at boot-up (in this order)
# Declare each route then list in ROUTES
#   - prefix an entry in ROUTES with a ! to disable it
#
#gateway="default gw 192.168.0.1"
ROUTES=(!gateway)
 
# Enable these network profiles at boot-up.  These are only useful
# if you happen to need multiple network configurations (ie, laptop users)
#   - set to 'menu' to present a menu during boot-up (dialog package required)
#   - prefix an entry with a ! to disable it
#
# Network profiles are found in /etc/network.d
#
# This now requires the netcfg package
#
#NETWORKS=(main)

# -----------------------------------------------------------------------
# DAEMONS
# -----------------------------------------------------------------------
#
# Daemons to start at boot-up (in this order)
#   - prefix a daemon with a ! to disable it
#   - prefix a daemon with a @ to start it up in the background
#
DAEMONS=(syslog-ng dbus @cpufreq @hal @alsa @dhcdbd @networkmanager @crond @cups)
root@duncan-arch duncan]#
root@duncan-arch duncan]#cat /etc/modprobe.conf
#
# /etc/modprobe.conf (for v2.6 kernels)
#
install snd-via82xx-modem /bin/true # temporarily disabled by hsf - conflicts with hsfmc97via
install snd-intel8x0m /bin/true # temporarily disabled by hsf - conflicts with hsfmc97ich hsfmc97sis
install snd-atiixp-modem /bin/true # temporarily disabled by hsf - conflicts with hsfmc97ati
alias /dev/ttySHSF[0-9]* /dev/ttySHSF
alias /dev/modem /dev/ttySHSF
alias char-major-240 /dev/ttySHSF
alias char-major-240-* /dev/ttySHSF
options hsfserial serialmajor=240
alias char-major-242 hsfosspec
alias char-major-242-* hsfosspec
alias /dev/hsfdiag hsfosspec
alias /dev/hsfdiag* /dev/hsfdiag
alias char-major-243 /dev/hsfdiag
alias char-major-243-* /dev/hsfdiag
options hsfosspec dcpmajor=242 diagmajor=243
install /dev/ttySHSF /sbin/modprobe hsfpcibasic2; /sbin/modprobe hsfmc97ich; /sbin/modprobe hsfmc97via; /sbin/modprobe hsfmc97ali; /sbin/modprobe hsfmc97ati; /sbin/modprobe hsfmc97sis; [ -e /lib/modules/`uname -r`/extra/hsfusbcd2.ko ] && /sbin/modprobe hsfusbcd2; /sbin/modprobe snd_hda_intel; /bin/true
alias symbol:cnxthwhda_probe hsfhda
alias symbol:cnxthwhda_resume hsfhda
alias symbol:cnxthwhda_suspend hsfhda
blacklist pcspkr
blacklist bcm43xx
blacklist snd_pcsp

root@duncan-arch duncan]#

Fustrated Windows users have two options.
1. Resort to the throwing of computers out of windows.
2. Resort to the throwing of windows out of computers.

Offline

#2 2009-01-31 02:46:05

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,540

Re: blacklist pcspkr after udev mods

Off the top of my head I don't know a solution, but I found a better one IMO a while back... I learned to love the system beep.

The default beep is indeed downright awful, but you can customize the length and pitch. Google for more info. My beep is now a short tweet that is pleasant and helpful smile You can probably customize what makes a system beep too (e.g. in bash, vim...)

Offline

#3 2009-01-31 02:52:27

Raccoon1400
Member
From: Ontario, Canada
Registered: 2008-04-14
Posts: 853

Re: blacklist pcspkr after udev mods

I have a temporary solution.
After the  modules section in rc.sysinit, I added this line
rmmod pcspkr

however, since I'm tweaking boot times, this redundancy is the sort of thing I like to avoid. I'd rather it not load at all.


Fustrated Windows users have two options.
1. Resort to the throwing of computers out of windows.
2. Resort to the throwing of windows out of computers.

Offline

#4 2009-01-31 04:03:28

fulloffur
Member
Registered: 2007-09-24
Posts: 20

Re: blacklist pcspkr after udev mods

isn't pcspkr renamed to snd-pcsp? I blacklisted both to remove the beep

Offline

#5 2009-01-31 04:14:04

Raccoon1400
Member
From: Ontario, Canada
Registered: 2008-04-14
Posts: 853

Re: blacklist pcspkr after udev mods

fulloffur wrote:

isn't pcspkr renamed to snd-pcsp? I blacklisted both to remove the beep

I had them both blacklisted too.
snd_pcsp at least blacklists without a fight now


Fustrated Windows users have two options.
1. Resort to the throwing of computers out of windows.
2. Resort to the throwing of windows out of computers.

Offline

#6 2009-01-31 05:41:22

fulloffur
Member
Registered: 2007-09-24
Posts: 20

Re: blacklist pcspkr after udev mods

how about adding "platform:pcspkr" to the blacklist?

Last edited by fulloffur (2009-01-31 05:46:22)

Offline

#7 2009-02-01 02:51:31

Raccoon1400
Member
From: Ontario, Canada
Registered: 2008-04-14
Posts: 853

Re: blacklist pcspkr after udev mods

fulloffur wrote:

how about adding "platform:pcspkr" to the blacklist?

When I add that to modprobe.conf it just spits out bad line errors.


Fustrated Windows users have two options.
1. Resort to the throwing of computers out of windows.
2. Resort to the throwing of windows out of computers.

Offline

#8 2009-02-01 02:53:35

kludge
Member
Registered: 2008-08-03
Posts: 294

Re: blacklist pcspkr after udev mods

snd_pcsp and pcskr are indeed two different things.  the first attempts to use your pc-speaker as soundcard.  the latter gives you beeps.

i'm guessing the reason blacklisting isn't working is that a blacklisted module can still be loaded as a dependency of another module.

you could use the 'install' directive in a file under /etc/modprobe.d/.  for example, i just created '/etc/modprobe.d/boogabooga,' which contains the line:

install lrw /bin/echo "humptydump!"

so when i run 'modprobe lrw' i get:

humptydump!

and lrw is not loaded.

also, 'man true,' if only because the first sentence is hilarious.


[23:00:16]    dr_kludge | i want to invent an olfactory human-computer interface, integrate it into the web standards, then produce my own forked browser.
[23:00:32]    dr_kludge | can you guess what i'd call it?
[23:01:16]    dr_kludge | nosilla.
[23:01:32]    dr_kludge | i really should be going to bed.  i'm giggling madly about that.

Offline

#9 2009-02-01 02:55:59

Raccoon1400
Member
From: Ontario, Canada
Registered: 2008-04-14
Posts: 853

Re: blacklist pcspkr after udev mods

kludge:
when I lsmod, pcspkr shows up, but it is not being used by anything.


Fustrated Windows users have two options.
1. Resort to the throwing of computers out of windows.
2. Resort to the throwing of windows out of computers.

Offline

#10 2009-02-02 02:25:53

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,540

Re: blacklist pcspkr after udev mods

Offline

#11 2009-02-02 17:53:42

bt
Member
Registered: 2007-04-11
Posts: 198

Re: blacklist pcspkr after udev mods

In the MODULES section of /etc/rc.conf I added:    !snd_pcsp
Seems to work fine.

Offline

#12 2009-02-02 20:57:13

Raccoon1400
Member
From: Ontario, Canada
Registered: 2008-04-14
Posts: 853

Re: blacklist pcspkr after udev mods

bt wrote:

In the MODULES section of /etc/rc.conf I added:    !snd_pcsp
Seems to work fine.

That used to work, but because of a udev hack mentioned in the first post, I lost the ability to blacklist there.


Fustrated Windows users have two options.
1. Resort to the throwing of computers out of windows.
2. Resort to the throwing of windows out of computers.

Offline

#13 2009-02-03 18:50:36

kludge
Member
Registered: 2008-08-03
Posts: 294

Re: blacklist pcspkr after udev mods

Raccoon1400 wrote:

kludge:
when I lsmod, pcspkr shows up, but it is not being used by anything.

after doing, what...?


[23:00:16]    dr_kludge | i want to invent an olfactory human-computer interface, integrate it into the web standards, then produce my own forked browser.
[23:00:32]    dr_kludge | can you guess what i'd call it?
[23:01:16]    dr_kludge | nosilla.
[23:01:32]    dr_kludge | i really should be going to bed.  i'm giggling madly about that.

Offline

#14 2009-02-07 20:02:19

wideeye
Member
Registered: 2006-09-30
Posts: 32

Re: blacklist pcspkr after udev mods

if blackisting in rc.conf doesn't work, I know of two ways to blacklist modules in modprobe.conf or in a file in /etc/modprobe.d/

blacklist snd_pcsp
blacklist pcspkr
install pcspkr /bin/false
install snd_pcsp /bin/false

also you dont need to edit rc.sysinit for adding a rmmod command, this is what rc.local is for.

Offline

#15 2010-01-01 23:39:10

Dima Smirnov
Member
Registered: 2009-12-06
Posts: 2

Re: blacklist pcspkr after udev mods

You need adding

modprobe -r pcspkr

in rc.conf after section MODULES=(...)

Offline

#16 2010-01-02 01:49:39

R00KIE
Forum Moderator
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: blacklist pcspkr after udev mods

If blacklist doesn't work in modprobe.conf then try giving an alias to the thing tongue

A lot like the procedure to disable ipv6, the other thing is to try a line like your install lines, so I would say something like

install pcspk  /bin/true
or
alias pcspk off

Never tried it though, I didn't mod anything in my arch install. Also I think that part is a lot faster now so you may want to give the default files a try.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

Board footer

Powered by FluxBB