SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
##############################################################################
# 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"
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.
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.