UbuntuThis forum is for the discussion of Ubuntu 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.
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.
Quote:
bs@bsubuntu:/etc$ cat ./esound/esd.conf
[esd]
auto_spawn=0
#spawn_options=-terminate -nobeeps -as 5
default_options=-terminate -nobeeps -as 2
spawn_wait_ms=100
# default options are used in spawned and non-spawned mode
#default_options=
Before I did that, esd was 'bound' to /dev/dsp. After I did that and then run amaroK, I get:
Code:
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
bs@bsubuntu:/etc$
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:
Many thanks for the fix.
I have been trying very hard to find a solution to /dev/dsp busy, with no success, no I can use both mplayer and realplayer to listen to the BBC, amongst other things.
Originally posted by jugjogee I have re-read my post and it should have read
"now I can use both mplayer and realplayer to listen to the BBC" and not 'no'.
Look at the the bottom right of your post and there's an Edit button. You can click that to fix typos. Also, most people will have read that as 'now', I think, anyway.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.