LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
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

Reply
 
Search this Thread
Old 09-13-2012, 02:58 PM   #1
tarverator
LQ Newbie
 
Registered: Sep 2012
Location: Toronto, Canada
Distribution: Linux Mint Mate
Posts: 14

Rep: Reputation: Disabled
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
 
Old 09-15-2012, 08:50 AM   #2
suttiwit
Member
 
Registered: Aug 2012
Location: Chiang Mai, Thailand
Distribution: Kubuntu 12.10 x86_64
Posts: 192
Blog Entries: 2

Rep: Reputation: 22
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:
Code:
gcc test.c
If things went well, you should see nothing.
5. Type this in terminal:
Code:
./a.out
Please quote my post whether you hear a beep or not.
 
Old 09-15-2012, 09:03 AM   #3
tarverator
LQ Newbie
 
Registered: Sep 2012
Location: Toronto, Canada
Distribution: Linux Mint Mate
Posts: 14

Original Poster
Rep: Reputation: Disabled
I added this step:
Code:
chmod +x a.out
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;
}
 
Old 09-15-2012, 09:15 AM   #4
tarverator
LQ Newbie
 
Registered: Sep 2012
Location: Toronto, Canada
Distribution: Linux Mint Mate
Posts: 14

Original Poster
Rep: Reputation: Disabled
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.
 
Old 09-15-2012, 09:52 PM   #5
tarverator
LQ Newbie
 
Registered: Sep 2012
Location: Toronto, Canada
Distribution: Linux Mint Mate
Posts: 14

Original Poster
Rep: Reputation: Disabled
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 $
 
Old 09-15-2012, 11:48 PM   #6
suttiwit
Member
 
Registered: Aug 2012
Location: Chiang Mai, Thailand
Distribution: Kubuntu 12.10 x86_64
Posts: 192
Blog Entries: 2

Rep: Reputation: 22
Let me confirm this: Did GRUB really beep the internal Speaker?
 
Old 09-16-2012, 06:14 AM   #7
tarverator
LQ Newbie
 
Registered: Sep 2012
Location: Toronto, Canada
Distribution: Linux Mint Mate
Posts: 14

Original Poster
Rep: Reputation: Disabled
I wish I knew. Something beeps long before the OS is loaded.
 
Old 09-16-2012, 09:26 AM   #8
suttiwit
Member
 
Registered: Aug 2012
Location: Chiang Mai, Thailand
Distribution: Kubuntu 12.10 x86_64
Posts: 192
Blog Entries: 2

Rep: Reputation: 22
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...
 
Old 09-16-2012, 05:30 PM   #9
tarverator
LQ Newbie
 
Registered: Sep 2012
Location: Toronto, Canada
Distribution: Linux Mint Mate
Posts: 14

Original Poster
Rep: Reputation: Disabled
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?
 
Old 09-17-2012, 06:58 AM   #10
suttiwit
Member
 
Registered: Aug 2012
Location: Chiang Mai, Thailand
Distribution: Kubuntu 12.10 x86_64
Posts: 192
Blog Entries: 2

Rep: Reputation: 22
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.
 
Old 09-17-2012, 07:03 AM   #11
tarverator
LQ Newbie
 
Registered: Sep 2012
Location: Toronto, Canada
Distribution: Linux Mint Mate
Posts: 14

Original Poster
Rep: Reputation: Disabled
Frankly, I would prefer if "beep" just beeped.
 
Old 09-17-2012, 07:05 AM   #12
suttiwit
Member
 
Registered: Aug 2012
Location: Chiang Mai, Thailand
Distribution: Kubuntu 12.10 x86_64
Posts: 192
Blog Entries: 2

Rep: Reputation: 22
I think the beep command asked something in the computer to translate it to vibrations. Maybe the 'something' doesn't like taking orders.
 
Old 09-17-2012, 07:20 AM   #13
jamesf
Member
 
Registered: Dec 2004
Location: USA
Distribution: Slackware 12 and higher
Posts: 229

Rep: Reputation: 51
Quote:
Originally Posted by tarverator View Post
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/
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Flash Videos beep-beep-beep Audio Quantumstate Linux - Desktop 1 07-24-2011 08:57 AM
beep, beep ... waring on java code thuan1975 Linux - Software 0 01-24-2011 01:27 AM
LXer: beep-beep from Brazil! LXer Syndicated Linux News 0 11-11-2010 08:00 PM
Can't get 2.6.20 working on thinkpad T43 Murkhadh Slackware 4 02-18-2007 03:03 PM
acpi nearly working IBM thinkpad R40e 2684HVG no Fn key working, throttling OK Emmanuel_uk Linux - Laptop and Netbook 2 05-31-2006 01:41 AM


All times are GMT -5. The time now is 10:57 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration