UbuntuThis forum is for the discussion of Ubuntu Linux.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
After I loaded amarok, and previously when I tried to get mplayer to work, I got an error message that /dev/dsp was busy. I was told that 'killall esd' could fix that. So, I tried it and it -did- work.
Why is /dev/dsp busy?
Why did I have to issue 'killall esd'?
Where can I set it so that esd doesn't come into play, without having to write a little script that runs 'killall esd', unless that's the only choice?
This is the latest hoary release, hoary-rc-install-i386.iso
root@bsubuntu:/proc # cat version
Linux version 2.6.10-5-386 (buildd@terranova) (gcc version 3.3.5 (Debian 1:3.3.5-8ubuntu2)) #1 Wed Mar 30 19:46:52 BST 2005
root@bsubuntu:/proc # uname -a
Linux bsubuntu 2.6.10-5-386 #1 Wed Mar 30 19:46:52 BST 2005 i686 GNU/Linux
Okay, first things first, I run Slackware and am completely unfamiliar with Unbuntu so "grain of salt" and all that.
Now on to the show. Next on the agenda, a broad brush of how sound is handled. Sound as a device has a file in /dev that can be owned by an application, therefore there is a restriction of one application at a time to use the sound.
The way to counter act this is to use a sound daemon. ARTs is the daemon that comes with KDE and Esound is anpther daemon that's out there. There maybe more, however, so if you're interested take a look see.
Why anyone would tell you to 'killall esd' I don't know since that would effectively kill your Esound daemon thereby only allowing one application at a time to use the sound card UNLESS you're also running ARTs, in which case it would make sense however IMHO they could have given you a little background versus just handing out orders. Give a man a fish ...
Now, the easiest way to find out if you are running arts or not is a 'ps aux | grep arts'. 'ps' gives a list of running processes with aux being options ('man' it if you don't understand it) while the pipe symbol '|' takes the output from the first command and pipes it into the second command with 'grep' searching for whatever comes next (in this case 'arts')
The same can be done with esd. 'lsof' gives a list of open files soooooooo if you want to know what application has /dev/dsp open you can do a 'lsof | grep /dev/dsp'. The best path forward here for you (again IMHO) is to figure out which sound daemon you wish to use, read the documentation on the proper installation/configuration and then configure your applications to speak to the sound daemon instead of trying to control the sound directly. Best of luck.
Ubuntu uses a program called esd to allow multiple applications to access the sound card at one time. However, many third party applications not in Ubuntu main aren't designed to use esd to access the card. On some sound cards, this causes these applications to not produce sound. To work around this problem, esd must be configured to release the sound card when it is not using it. To do this, edit /etc/esound/esd.conf and change the line that begins with spawn_options to begin with default_options. Then, change the -as 5 to -as 2. Finally, remove the two bottom lines about default_options (they are unnecessary).
Note: this problem only occurs on the Ubuntu Hoary release and newer, Warty is not affected by this.
bs@bsubuntu:/etc$ cat ./esound/esd.conf
#spawn_options=-terminate -nobeeps -as 5
default_options=-terminate -nobeeps -as 2
# default options are used in spawned and non-spawned mode
Before I did that, esd was 'bound' to /dev/dsp. After I did that and then run amaroK, I get:
bs@bsubuntu:/etc$ lsof | grep /dev/dsp
amarokapp 7708 bs 20w CHR 14,3 6919 /dev/dsp
(and then after I kill amarok)
bs@bsubuntu:/etc$ lsof | grep /dev/dsp
I did that and rebooted and now I can play amaroK without doing the killall esd.
esd is intermixed among almost everything that produces sound: