Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
09-13-2012, 02:58 PM
|
#1
|
|
LQ Newbie
Registered: Sep 2012
Location: Toronto, Canada
Distribution: Linux Mint Mate
Posts: 14
Rep: 
|
beep(1) not working on ThinkPad X230
beep(1), that formerly trusty little program that beeps the pc speaker, isn't working on my ThinkPad X230.
The modules "pcspkr" and "snd_pcsp" are blacklisted by default in Linux Mint Mate Maya. I un-blacklisted both, rebooted even, and still no joy.
Is this a hardware rather than a Linux Mint issue? GRUB beeps at boot time.
Last edited by tarverator; 09-13-2012 at 03:15 PM.
Reason: also tried de-blacklisting snd_pcsp as well as pcspkr
|
|
|
|
09-15-2012, 08:50 AM
|
#2
|
|
Member
Registered: Aug 2012
Location: Chiang Mai, Thailand
Distribution: Kubuntu 12.10 x86_64
Posts: 190
Rep:
|
I heard there is a simpler way to do it in the command-line but I couldn't remember so, as far as i know... there is another way to beep. You will need a C compiler (gcc), /usr/include/stdio.h and nano. (These are already in Mint 13).
We are going to use the Bell escape code technique, Follow these steps:
1. Open up terminal.
2. Type "nano test.c" and paste this code in to the text editor.
Code:
#include <stdio.h>
int main()
{
puts("\a");
return 0;
}
3. Press CTRL+O and Enter and CTRL+X (CTRL = Control Key).
4. Type this in terminal:
If things went well, you should see nothing.
5. Type this in terminal:
Please quote my post whether you hear a beep or not.
|
|
|
|
09-15-2012, 09:03 AM
|
#3
|
|
LQ Newbie
Registered: Sep 2012
Location: Toronto, Canada
Distribution: Linux Mint Mate
Posts: 14
Original Poster
Rep: 
|
I added this step: It compiled and ran fine, but there was no sound. I even added some debug code to make completely sure it was running:
Code:
#include <stdio.h>
int main()
{
puts("\a");
printf("Beep, damn it!\n");
return 0;
}
|
|
|
|
09-15-2012, 09:15 AM
|
#4
|
|
LQ Newbie
Registered: Sep 2012
Location: Toronto, Canada
Distribution: Linux Mint Mate
Posts: 14
Original Poster
Rep: 
|
This is interesting... I un-blacklisted pcspkr and got this when I tried to load it:
Code:
thinx ~ # modprobe pcspkr
FATAL: Error inserting pcspkr (/lib/modules/3.2.0-30-generic/kernel/drivers/input/misc/pcspkr.ko): Device or resource busy
This is after loading snd_pcsp.
|
|
|
|
09-15-2012, 09:52 PM
|
#5
|
|
LQ Newbie
Registered: Sep 2012
Location: Toronto, Canada
Distribution: Linux Mint Mate
Posts: 14
Original Poster
Rep: 
|
If not beep(1), what is the "normal" way to make a sound from within a script running as root?
cvlc at least works as a normal user, notwithstanding that it takes ctrl-c to get the prompt back; but it refuses to run as root.
paplay doesn't work (as expected at least) at all.
Code:
tarver ~/Audio/Sounds $ paplay b-tone.mp3
Failed to open audio file.
tarver ~/Audio/Sounds $ cvlc b-tone.mp3
VLC media player 2.0.3 Twoflower (revision 2.0.2-93-g77aa89e)
[0x95c01c8] dummy interface: using the dummy interface module...
^Ctarver ~/Audio/Sounds $
|
|
|
|
09-15-2012, 11:48 PM
|
#6
|
|
Member
Registered: Aug 2012
Location: Chiang Mai, Thailand
Distribution: Kubuntu 12.10 x86_64
Posts: 190
Rep:
|
Let me confirm this: Did GRUB really beep the internal Speaker?
|
|
|
|
09-16-2012, 06:14 AM
|
#7
|
|
LQ Newbie
Registered: Sep 2012
Location: Toronto, Canada
Distribution: Linux Mint Mate
Posts: 14
Original Poster
Rep: 
|
I wish I knew. Something beeps long before the OS is loaded.
|
|
|
|
09-16-2012, 09:26 AM
|
#8
|
|
Member
Registered: Aug 2012
Location: Chiang Mai, Thailand
Distribution: Kubuntu 12.10 x86_64
Posts: 190
Rep:
|
Hey, dude. I know what beeped before the OS... It's your BIOS! BIOS = Basic Input Output System.
It runs everytime you boot. Most computers have BIOS. The beeps from BIOS mean something too! 
If it beeps weirdly then it means your computer has a problem, etc.
If it beeps like what you hear everyday, your computer is OK.
Also, On some modern laptops. The Internal PC Speaker isn't installed. So, You just can't get it to beep because there is no speaker... 
|
|
|
|
09-16-2012, 05:30 PM
|
#9
|
|
LQ Newbie
Registered: Sep 2012
Location: Toronto, Canada
Distribution: Linux Mint Mate
Posts: 14
Original Poster
Rep: 
|
The official X230 manual talks about the usual IBM/Lenovo beep codes that go back more than half way to the dawn of computing. What I don't know is if there is a separate tiny little buzzer tucked away somewhere, or if BIOS has a way of activating the same speakers that an OS later uses for routine sound. Either way, both BIOS at POST (power on self test) time and GRUB at boot time evidently have some way of activating something that vibrates and makes a sound.
What I am trying to figure out is what to call in a script running as root in a Linux environment, that does something similar. Specifically -- since beep(1) appears not to be supported -- I am broadening my question to ask, what would be the usual way to get root to send an audible signal in Linux Mint Mate 13 Maya? Getting such a script to su to a non-root user to run a complex media codec just strikes me as weirdly over-complicated. Is there a simple "normal" way to do this?
|
|
|
|
09-17-2012, 06:58 AM
|
#10
|
|
Member
Registered: Aug 2012
Location: Chiang Mai, Thailand
Distribution: Kubuntu 12.10 x86_64
Posts: 190
Rep:
|
I guess you have to learn lots and lots of science about sound, sound, etc. And also learn how to impliment that in to a computer.
|
|
|
|
09-17-2012, 07:03 AM
|
#11
|
|
LQ Newbie
Registered: Sep 2012
Location: Toronto, Canada
Distribution: Linux Mint Mate
Posts: 14
Original Poster
Rep: 
|
Frankly, I would prefer if "beep" just beeped.
|
|
|
|
09-17-2012, 07:05 AM
|
#12
|
|
Member
Registered: Aug 2012
Location: Chiang Mai, Thailand
Distribution: Kubuntu 12.10 x86_64
Posts: 190
Rep:
|
I think the beep command asked something in the computer to translate it to vibrations. Maybe the 'something' doesn't like taking orders.
|
|
|
|
09-17-2012, 07:20 AM
|
#13
|
|
Member
Registered: Dec 2004
Location: USA
Distribution: Slackware 12 and higher
Posts: 190
Rep:
|
Quote:
Originally Posted by tarverator
Frankly, I would prefer if "beep" just beeped.
|
Someone was just talking about the visible bell over in the Slackware forum.
Have you configured your bell to be visible or audible? Also, here's the link:
http://www.linuxquestions.org/questi...le-4175427273/
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 03:52 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.
|
Latest Threads
LQ News
|
|