LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   *BSD (https://www.linuxquestions.org/questions/%2Absd-17/)
-   -   How to disable pc speaker in openBSD? (https://www.linuxquestions.org/questions/%2Absd-17/how-to-disable-pc-speaker-in-openbsd-767332/)

toledano 11-06-2009 10:28 AM

How to disable pc speaker in openBSD?
 
hi,

I just installed openBSD on my laptop.
how do i disable the pcspeaker without the GUI?
thanks,

danny.

ocicat 11-06-2009 12:11 PM

Quote:

Originally Posted by toledano (Post 3747195)
how do i disable the pcspeaker without the GUI?

Study Section 5.9 of the FAQ:

http://openbsd.org/faq/faq5.html#BootConfig

...as this explains how drivers can be disabled. Of course, you will also need to study the output of dmesg(8) to find what driver is associated with your speaker.

custangro 11-06-2009 01:23 PM

Quote:

Originally Posted by toledano (Post 3747195)
hi,

I just installed openBSD on my laptop.
how do i disable the pcspeaker without the GUI?
thanks,

danny.

I did this on Linux...it may work on BSD

Code:

root@host# rmmod pcspkr
-C

ocicat 11-06-2009 01:27 PM

Quote:

Originally Posted by custangro (Post 3747391)
I did this on Linux...it may work on BSD

It won't. OpenBSD does not have a rmmod command.

custangro 11-06-2009 05:26 PM

Quote:

Originally Posted by ocicat (Post 3747400)
It won't. OpenBSD does not have a rmmod command.

Well then I'm all out of ideas

toledano 11-08-2009 02:23 PM

hi,

by using the dmesg I see:
midi0 at pcppi0: <PC speaker>
spkr0 at pcppi0

I used the command "sudo config -e /bsd" (and also "sudo config -e -u -o bsd.new /bsd")
and disabled midi,spkr and pcppi(i am not sure which one to disable so I disabled all).
the pc speaker still works..
what else could I try?

ocicat 11-09-2009 01:23 PM

Quote:

Originally Posted by toledano (Post 3749539)
the pc speaker still works..
what else could I try?

Given that this is turning into a fishing expedition, you may want to made a copy of /bsd which has not been altered. Although I don't see that the disabling the drivers discussed may be problematic later, it is good to have the insurance that you can easily return to a default configuration if necessary.

In the dmesg(8) output, I suspect you will also see audio(4) drivers listed. You may want to disable all of these as well.

If this does not disable speaker output, you will need to post the output of dmesg(8). The drivers discussed thus far are generic, but without knowledge of your exact hardware, I will not be able to help you further.

GazL 11-10-2009 05:08 PM

Is "mixerctl outputs.spkr_mute=on" not suitable?

bigearsbilly 11-10-2009 05:09 PM

wirecutters?

:-)

why?

X: xset -b
vim: set visualbell

personally I love morse -p

ocicat 11-10-2009 07:52 PM

Quote:

Originally Posted by GazL (Post 3752163)
Is "mixerctl outputs.spkr_mute=on" not suitable?

This is actually a good question to raise.

I guess I had dismissed this in my own mind is because some beeps go directly to the speaker; somehow the audio subsystem is bypassed, but I may be vaguely recalling hardware-specific information. I don't routinely gut the system.

But the OP should try this suggestion. It may very well be a viable answer for the hardware used.

toledano 11-11-2009 01:25 AM

hey,

@GazL : you are half right :) thanks for the suggestion.
@ocicat : thanks for your help.

the command : "mixerctl inputs.spkr.mute=on" WORKS!

GazL 11-11-2009 03:35 AM

Quote:

Originally Posted by toledano (Post 3752557)
@GazL : you are half right :) thanks for the suggestion.
the command : "mixerctl inputs.spkr.mute=on" WORKS!

You're welcome. My hardware doesn't create mixerctl entries under inputs for spkr only under outputs. Sounds (forgive the pun) like your sound hardware is layed out differently to mine.

Anyway, Glad you resolved it. :)

ofaring 12-17-2009 12:18 AM

Old topic, but I couldn't resist. Using the mixer/mute option gets the job done, unless you want your pc speaker (sometimes a tiny speaker on the motherboard as opposed to the audio speakers) to give notice of other things. For instance, on my laptop I get a nice beeping to warn me when my battery is at 3%. And since I'm running Fluxbox with a minimum of glitter, that's handy.

So, in either your ~/.xinitrc (if you start X with the "startx" command), or your ~/.fluxbox/startup (there are other ways), add what was mentioned above:
Code:

xset -b
That takes care of beeping in X terminals. And for the console...

Edit /etc/wsconsctl.conf and make sure that you have this:
Code:

keyboard.bell.volume=0
Gotta love the quiet.

rndm_luser 01-26-2010 10:10 AM

Just for reference, to disable the console bell on NetBSD you can put the following in /etc/wscons.conf:
Code:

setvar wskbd bell.pitch 0


All times are GMT -5. The time now is 02:05 AM.