LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   setting beep on linux system (https://www.linuxquestions.org/questions/fedora-35/setting-beep-on-linux-system-709360/)

girish_hilage 03-05-2009 07:39 AM

setting beep on linux system
 
Hi,

I have a query about turning on the beep on the Linux Fedora 8 machine.

I gave following commands to turn the beep on :

$ xset b on
$ xset b 100 2000 100

and tried to test it while tab completion, but its not producing any beep at all.
Output of "xset q" does show settings getting accepted properly :
bell percent: 100 bell pitch: 2000 bell duration: 100

Does anybody know any reason for beep not working?
Also, can I know which application make use of various settings shown by "xset q"?

Regards,
Girish

bathory 03-05-2009 08:10 AM

If you want to set the system beep in CLI you should use setterm:
Code:

setterm -blength 100
xset is used to control the various Xserver settings, so any changes you do using xset will affect application running on X.

girish_hilage 03-05-2009 10:58 PM

Hi,

Thanks for the reply.
I want to set the beep on the X server itself.
What I want is, when I keep on pressing <TAB> key on the xterm then it gives me a list of commands but it should also give me a beep at least once.

I tried 'setterm -blength 100' and 'setterm -bfreq 100' on the terminal but it's also not giving me any sound.
I also tried to set the System beep through UI (System-->Preferences-->Hardware-->Sound-->System Beep) but it's not producing any beep.

I checked on Redhat 9 system and both 'setterm' and 'xset' are working as expected.

Is there any reason why same commands are not working on FC8?

Regards,
Girish

bathory 03-06-2009 01:53 AM

Make sure the speaker is working and it's connected to the mainboard.
Check if the pcspkr module is loaded into the kernel
Code:

lsmod|grep pcspkr
and if it isn't load it manually:
Code:

modprobe pcspkr
Also make sure it's not blacklisted so it's not loaded at system startup
Code:

grep pcspkr /etc/modprobe.d/blacklist

girish_hilage 03-06-2009 07:57 AM

On RH9,
even though 'pcspkr' is not there I can hear the sound.

But, on FC8,
I inserted 'pcspkr' but still I am not able to hear any sound.
I did check the speaker connection on FC8 machine and it is fine.
'pcspkr' is not there in /etc/modprobe.d/blacklist

Regards,
Girish

bathory 03-06-2009 08:15 AM

Check /etc/inputrc to see if you have "set bell-style none" and change it to "set bell-style audible".
Also if you're using gnome or kde you can use their tools to setup system bell.

girish_hilage 03-07-2009 05:35 AM

Hi,

In the morning today I boot the system and the sound is working when I open/close any application on X-server. I noticed that 'pcspkr' is already inserted automatically.
In /etc/inputrc, following line was still commented :
#set bell-style none

But, still Ctrl-G (I think this produces a beep when pressed on xterm) is not working.
Also, even if I change values using "xset b ...." then it is not affecting the sound.
OR if I use "xset b 0 0 0" then it is also not turning off the beep.
I even tried "rmmod pcspkr" or uncommented above line in /etc/inputrc to turn off the beep, but beep is still there.

I am not able to make it clear which thing exactly affects the beep and also turns it on/off.
I am using Gnome and if I use the checkbox (System-->Preferences-->Hardware-->Sound-->System Beep-->Enable System beep) to enable or disable then this is also not affecting beep in any way.

Regards,
Girish

bathory 03-07-2009 09:21 AM

It might worth trying the solution posted here:
Quote:

This is embaressing, I finally noticed that the "AUX" setting was turned off (but the strength value
made it appear like it was active...) Enabling the AUX column in Alsamixer gave me the "Beep".

girish_hilage 03-09-2009 01:53 AM

Thanks for the link.
On my FC8 system enabling/disabling PCM from gnome-volume-control (version 2.20.1, System->Preferences->Hardware->Volume Control) turns the beep on/off.
Now I am not sure if it is a beep or the sound files that are being played when I open/close applications on X-server because Ctrl-G on xterm is still not able to give me any sound, or 'xset b ....' or 'xset b 0 0 0' does not have any effect on this sound.

I did not select AUX.
Also presence of 'pcspkr' does not seem to matter.

david_ross 03-26-2009 05:40 AM

Moved: This thread is more suitable in Fedora and has been moved accordingly to help your thread/question get the exposure it deserves.


All times are GMT -5. The time now is 11:07 PM.