LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-02-2007, 05:22 AM   #1
Toods
Member
 
Registered: Dec 2005
Location: UK
Distribution: Slackware 12.1
Posts: 249

Rep: Reputation: 32
Disable PC Speaker


I know that this one has been discussed in various threads but I still cannot kill the PC speaker.

I am using Slackware 'Current' using a custom kernel with 'pcspkr' build as a module. UDEV (v116) is present so I should be able to prevent the 'pcspkr' module loading by putting an entry in the '/etc/modprobe.d/blacklist' file. I have also tried commenting the appropriate 'alias' line in '/etc/modprobe.d/isapnp' but still the module loads at boot.

I know I could rebuild the kernel again without the PC Speaker module, but I would like a solution which avoids this.

Any ideas?.

Bill.
 
Old 11-02-2007, 05:31 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
You can run
Code:
/bin/setterm -blength 0
to stop pc speaker from beeping
 
Old 11-02-2007, 05:49 AM   #3
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Can't you 'rmmod pcspkr' ?
 
Old 11-02-2007, 06:03 AM   #4
Toods
Member
 
Registered: Dec 2005
Location: UK
Distribution: Slackware 12.1
Posts: 249

Original Poster
Rep: Reputation: 32
Quote:
Can't you 'rmmod pcspkr' ?
Yes, of course that works, but I would have to manually issue this command at each boot wouldn't I?.
 
Old 11-02-2007, 07:30 AM   #5
Dinithion
Member
 
Registered: Oct 2007
Location: Norway
Distribution: Slackware 14.1
Posts: 446

Rep: Reputation: 59
You could add it to /etc/modprobe.d/blacklist
 
Old 11-02-2007, 07:39 AM   #6
Toods
Member
 
Registered: Dec 2005
Location: UK
Distribution: Slackware 12.1
Posts: 249

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by Dinithion View Post
You could add it to /etc/modprobe.d/blacklist
Yes, but see my opening message. It doesn't seem to work when I add the module to the 'blacklist'. Apparently this behaviour was noted by others with v111 of UDEV, but was supposed to be cured in version 116.

Bill.
 
Old 11-02-2007, 08:49 AM   #7
PJBrs
Member
 
Registered: Oct 2006
Distribution: Slackware 14.2 / -current
Posts: 76

Rep: Reputation: 33
Code:
# grep -R pcspkr /etc/
/etc/rc.d/rc.modules:  /sbin/modprobe pcspkr
/etc/rc.d/rc.local:modprobe -r pcspkr
/etc/rc.d/rc.modules-2.6.21.5-smp:  /sbin/modprobe pcspkr
/etc/modprobe.d/isapnp:# alias pnp:dPNP0800 pcspkr
/etc/modprobe.d/blacklist:# also need to comment the pcspkr alias in /etc/modprobe.d/isapnp.
/etc/modprobe.d/blacklist:blacklist pcspkr
/etc/udev/rules.d/50-udev.rules:DRIVERS=="pcspkr", ENV{ID_CLASS}="spkr"
(No, usually I'm not logged in as root )

Apparently the pcspkr module gets loaded by rc.modules, so you'd need to comment it out there too.

Tell me if that helps; I've been trying to prevent pcspkr from loading too, and ended unloading it in rc.local (as you probably noticed ).
 
Old 11-02-2007, 09:05 AM   #8
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
This in why I always don't compile it into the kernel, because it is something that only pisses me off and serves no useful purpose whatsoever.
 
Old 11-02-2007, 09:23 AM   #9
Toods
Member
 
Registered: Dec 2005
Location: UK
Distribution: Slackware 12.1
Posts: 249

Original Poster
Rep: Reputation: 32
A Solution

Putting the following code into '/etc/modprobe.d/blacklist' works:

Quote:
install pcspkr /bin/true
I still feel however that this line:

Quote:
DRIVERS=="pcspkr",ENV{ID_CLASS)="spkr"
in '/etc/udev/rules.d/60-persistent-input.rules' has something to do with it being loaded and difficult to blacklist. However, changing or creating udev rules are currently beyond my ability.

Bill.
 
Old 11-02-2007, 10:23 AM   #10
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
Post the output of this:
Code:
grep pcspkr /etc/rc.d/rc.modules*
Then this:
Code:
grep pcspkr /etc/modprobe.d/*
 
Old 11-02-2007, 10:51 AM   #11
Toods
Member
 
Registered: Dec 2005
Location: UK
Distribution: Slackware 12.1
Posts: 249

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by rworkman View Post
Post the output of this:
Code:
grep pcspkr /etc/rc.d/rc.modules*
Then this:
Code:
grep pcspkr /etc/modprobe.d/*
These are the outputs respectively:

Quote:
/etc/rc.d/rc.modules:#/sbin/modprobe pcspkr
and

Quote:
/etc/modprobe.d/blacklist:blacklist pcspkr
/etc/modprobe.d/isapnp:#alias pnp:dPNP0800 pcspkr
Bill.
 
Old 11-02-2007, 11:28 AM   #12
wadsworth
Member
 
Registered: Aug 2007
Distribution: Slackware64 13.37
Posts: 215

Rep: Reputation: 65
Have you tried editing /etc/inputrc ?
Uncomment the line:
set bell-style none

Worked for me.
 
Old 11-02-2007, 12:04 PM   #13
Toods
Member
 
Registered: Dec 2005
Location: UK
Distribution: Slackware 12.1
Posts: 249

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by wadsworth View Post
Have you tried editing /etc/inputrc ?
Uncomment the line:
set bell-style none

Worked for me.
No, I haven't tried that one, but I'm currently using 'install pcspkr /bin/true' added to the '/etc/modprobe.d/blacklist' file and this is working for me.

Bill.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How could I make USB speaker as default/master speaker ? czy11421 Linux - Hardware 1 09-02-2007 10:59 AM
Disable PC Speaker iXneonXi DamnSmallLinux 4 03-16-2007 05:58 AM
dbx command for corrosponding commands disable or disable on gdb bshankha AIX 0 09-26-2006 09:38 AM
Left speaker does not speak - not speaker issue. Hardware or software issue? Svip Linux - Hardware 3 05-03-2006 11:22 AM
disable motherboard speaker? newuser455 Linux - Hardware 3 07-27-2005 02:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration