LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 08-23-2016, 10:45 AM   #1
Radiotubes
LQ Newbie
 
Registered: Jun 2009
Posts: 28

Rep: Reputation: 12
No Beep, system bell


OS: Slackware 14.2
machine: Lenovo ThInkPad 64bit CORE i5

I've been using Slackware for years. I'm very familiar with its features and configuration. I recently installed it on the machine above. I have it configured the way I like it accept the system bell / beep. Using a live distro (old version of Gparted) with a 2.6.* kernel, the system bell works fine. The following are the outputs of various messages showing all seems in order:

dmesg shows

Code:
bash-4.3# dmesg | grep pcs
[    7.416052] input: PC Speaker as /devices/platform/pcspkr/input/input6
lsmod shows

Code:
bash-4.3# lsmod | grep pcspkr
pcspkr                  2350  0
alsamixer does not have an option for "PC Speaker" or system bell (whatever they call it), so I don't believe that alsa is muting the beeper.

I checked inputrc:

Code:
bash-4.3# cat /etc/inputrc | grep bell
# Configure the system bell.  Options are none, visible, and audible.
# set bell-style none
no problems there.

I have exhausted all options at this point. Anyone else lost or doesn't have their beeper? ;P Any suggestions?
 
Old 08-23-2016, 11:02 AM   #2
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Member response

Hi,

On my system there is a option for System speaker and I have mine set to max output <100>.

Try running 'alsamixer' from the cli to check the settings.

Hope this helps.
Have fun & enjoy!
 
Old 08-23-2016, 11:46 AM   #3
Radiotubes
LQ Newbie
 
Registered: Jun 2009
Posts: 28

Original Poster
Rep: Reputation: 12
Quote:
Originally Posted by onebuck View Post
Hi,

On my system there is a option for System speaker and I have mine set to max output <100>.

Try running 'alsamixer' from the cli to check the settings.

Hope this helps.
Have fun & enjoy!
As stated in my initial post, alsamixer (cli) does not have an option for System speaker. Thnx
 
Old 08-23-2016, 04:47 PM   #4
jmccue
Member
 
Registered: Nov 2008
Location: US
Distribution: slackware
Posts: 687
Blog Entries: 1

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Hi Radiotubes

You can issue this command to enable the speaker:

Code:
# /sbin/modprobe pcspkr
Seems some changes between 14.1/14.2 I would add this to file /etc/rc.d/rc.modules.local to activate it on reboot.

John
 
Old 08-23-2016, 05:03 PM   #5
USUARIONUEVO
Senior Member
 
Registered: Apr 2015
Posts: 2,335

Rep: Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930
Quote:
/lib/modprobe.d/pcspkr.conf
have

##############################################################################
# Do not edit this file; instead, copy it to /etc/modprobe.d/ and edit that
##############################################################################

# PC Speaker support:
# This one is loaded by /etc/rc.d/rc.modules. If you don't like
# the beeps and buzz from speaker, edit /etc/rc.d/rc.modules.
blacklist pcspkr


im not sure if need de kernel module inside the initrd ..i think "yes"
 
Old 08-23-2016, 05:48 PM   #6
Radiotubes
LQ Newbie
 
Registered: Jun 2009
Posts: 28

Original Poster
Rep: Reputation: 12
When I initially setup the machine I copied pcspkr.conf from /lib/modprobe.d to /etc/modprobe.d and commented out the part about blacklisting pcspkr. Otherwise the module would not load. Slackware has blacklisted pcspkr since about 13.* or so. Since I am one who has always enjoyed the beep and use tab completion often, I am familiar with this procedure.

Code:
bash-4.3# cat /etc/modprobe.d/pcspkr.conf 
##############################################################################
# Do not edit this file; instead, copy it to /etc/modprobe.d/ and edit that
##############################################################################

# PC Speaker support:
# This one is loaded by /etc/rc.d/rc.modules. If you don't like
# the beeps and buzz from speaker, edit /etc/rc.d/rc.modules.
# blacklist pcspkr
Once this file was in place and edited, the kernel automatically loads the pcspkr module. I did wonder if it would make a difference if the module were loaded sooner, or manually so YES I did edit rc.modules.local to this:

Code:
bash-4.3# cat /etc/rc.d/rc.modules.local 
#!/bin/sh

# /etc/rc.d/rc.modules.local

# The Linux kernel source is the best place to look for documentation
# for the many available kernel modules.  This can be found under
# /usr/src/linux-$VERSION/Documentation/.

# Almost all necessary modules are automatically loaded when needed,
# but there are a few exceptions.  Here's a (not all-inclusive) list,
# so uncomment any of the below entries or add others as needed:
# Note that you could also create/edit rc.modules-$version if you
# only wanted specific modules loaded for particular kernels.

#/sbin/modprobe tun            # Universal TUN/TAP device driver
#/sbin/modprobe sg             # Generic SCSI support for SATA DVD-RW
/sbin/modprobe pcspkr          # Activate the annoying "beep" from the computer :p
Loading it manually rather than having the kernel do it made no difference. All these things I tried prior to posting my question here.
 
Old 08-23-2016, 05:51 PM   #7
USUARIONUEVO
Senior Member
 
Registered: Apr 2015
Posts: 2,335

Rep: Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930
2 ways

add module inside initrd
recompile kernel with pcspker Y --> then vmlinux can do
 
Old 08-23-2016, 06:22 PM   #8
STDOUBT
Member
 
Registered: May 2010
Location: Stumptown
Distribution: Slackware64
Posts: 583

Rep: Reputation: 242Reputation: 242Reputation: 242
Did you not try:
Code:
bash-4.3# cat /etc/inputrc | grep bell
# Configure the system bell.  Options are none, visible, and audible.
set bell-style audible
Also, surprised nobody yet mentioned: Slackware 14.2 defaults to pulseaudio.
ALSA is not used by default.
 
Old 08-24-2016, 08:39 AM   #9
Radiotubes
LQ Newbie
 
Registered: Jun 2009
Posts: 28

Original Poster
Rep: Reputation: 12
Quote:
Originally Posted by STDOUBT View Post
Did you not try:
Code:
bash-4.3# cat /etc/inputrc | grep bell
# Configure the system bell.  Options are none, visible, and audible.
set bell-style audible
Also, surprised nobody yet mentioned: Slackware 14.2 defaults to pulseaudio.
ALSA is not used by default.
Yes I did edit inputrc prior to posting my question, however if you look at my initial post, I quoted inputrc to show the default setting which will give an audible bell despite the "bell style" line being commented out. Additionally I did notice that pulseaudio was the default in a asound.conf. I'm not sure if it makes any difference, but I'll edit asound.conf and see what happens.
 
Old 08-24-2016, 03:38 PM   #10
ndr
LQ Newbie
 
Registered: Aug 2009
Location: World
Distribution: Slackware
Posts: 11

Rep: Reputation: 8
Please report back if you succeed, because I haven't been able to get the damn speaker to beep since after Slackware 12.2, and no amount of hacking fixed it.

Now I don't remember the details, but years ago I even tried modifying the source of the pcspkr module and recompiling it to get the stupid thing to work, all in vain: ALSA simply doesn't give me the "PC speaker" output any more. Maybe we're seeing ALSA developers' idea of progress.
 
Old 08-25-2016, 12:14 PM   #11
Radiotubes
LQ Newbie
 
Registered: Jun 2009
Posts: 28

Original Poster
Rep: Reputation: 12
Quote:
Originally Posted by USUARIONUEVO View Post
2 ways

add module inside initrd
recompile kernel with pcspker Y --> then vmlinux can do
No love... I recompiled the kernel with pcspkr=y and still don't have my beeper . I don't think the initrd will make a difference.

I edited asound.conf and removed pulse as the default as well. Still no workie.

I know this thing has a beeper as I mentioned it worked on an earlier distro with a 2.6.* kernel.
 
Old 08-25-2016, 12:48 PM   #12
STDOUBT
Member
 
Registered: May 2010
Location: Stumptown
Distribution: Slackware64
Posts: 583

Rep: Reputation: 242Reputation: 242Reputation: 242
Radiotubes,
This page gave me some clues.
http://unix.stackexchange.com/questi...c-speaker-beep

Apparently, running
Code:
echo -e "\a"
while the pcspkr module is loaded results in the old school speaker beep.
I am not sure if the above command line will work as a scripted element, but
it works from the command line.
Let us know what solution if any you settle on!

Actually just realized: subsequently reloading the pcspkr module results in activation of the system bell without having to re-issue the above echo command! Not sure why....if you figure that much out let us know please :-)

Another EDIT: I doubt it's relevant, but I'm using ALSA. BUT, I am quite sure it shouldn't matter since it seems pcspkr runs independently of the "sound system", i.e., I cannot change the system bell volume with either my on-board volume buttons (laptop) nor the alsamixer.

Last edited by STDOUBT; 08-25-2016 at 12:56 PM. Reason: ADDED: Realization.
 
Old 08-25-2016, 01:00 PM   #13
ndr
LQ Newbie
 
Registered: Aug 2009
Location: World
Distribution: Slackware
Posts: 11

Rep: Reputation: 8
Quote:
Originally Posted by STDOUBT View Post
Apparently, running
Code:
echo -e &quot;\a&quot;
while the pcspkr module is loaded results in the old school speaker beep.
That's clearly not going to work, or there wouldn't be a problem.
 
Old 08-25-2016, 01:25 PM   #14
STDOUBT
Member
 
Registered: May 2010
Location: Stumptown
Distribution: Slackware64
Posts: 583

Rep: Reputation: 242Reputation: 242Reputation: 242
Quote:
That's clearly not going to work, or there wouldn't be a problem.
Well, that's pretty weird. Presumeably Radiotubes is using the same kernel as I am:
Code:
grep -i SPKR /boot/config-generic-smp-4.4.19-smp 
CONFIG_HAVE_PCSPKR_PLATFORM=y
CONFIG_PCSPKR_PLATFORM=y
CONFIG_INPUT_PCSPKR=m
Not sure what to make of it, but it's working here :-\
 
Old 08-25-2016, 01:50 PM   #15
Radiotubes
LQ Newbie
 
Registered: Jun 2009
Posts: 28

Original Poster
Rep: Reputation: 12
Thanks guys for the suggestions,

Code:
bash-4.3# echo -e \\a
is my goto command to test the pcspkr. I also use a terminal quite often and the beeper beeps on tab completion (another simple test). When I'm in terminal (no X) I run the pine email program. It beeps when I receive a new email. It is like an old friend to me and useful in applications I use. Here are a few more experiments I have tried:
  • I disabled alsa altogether at boot time so it wouldn't load the daemon.
  • I changed setterm blength and bfreq (1000 and 250 respectively)
  • I removed the motherboard from the laptop to make certain there is in fact a beeper speaker.
  • I decided to consult a therapist, because I have spent WAY too much time on this problem

Its confounding....

My Kernel is the stock Slackware 14.2 huge kernel which is: 4.4.16
My test kernel has one change in the build where pcspkr is not a module, but built-in.

Code:
bash-4.3# cat /usr/src/linux/.config|grep -i pcsp
CONFIG_HAVE_PCSPKR_PLATFORM=y
CONFIG_PCSPKR_PLATFORM=y
CONFIG_INPUT_PCSPKR=y
# CONFIG_SND_PCSP is not set

Last edited by Radiotubes; 08-25-2016 at 01:56 PM.
 
  


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
LXer: Use alsamixer to turn off the annoying, loud beep (aka system bell) in Debian Squeeze when you LXer Syndicated Linux News 0 01-18-2012 07:40 PM
Flash Videos beep-beep-beep Audio Quantumstate Linux - Desktop 1 07-24-2011 08:57 AM
Make system bell/beep play through sound card wilson47 Linux - General 5 05-05-2009 03:17 PM
Beep/Bell in computer with no speaker crxssi Linux - Hardware 2 01-05-2007 09:01 PM
route system bell (system beep) through ALSA... mr.v. Linux - Software 1 07-03-2006 07:26 AM

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

All times are GMT -5. The time now is 02:36 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