LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices

Reply
 
Search this Thread
Old 04-02-2005, 11:21 AM   #1
itsjustme
Senior Member
 
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571

Rep: Reputation: 45
/dev/dsp busy, killall esd


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

Thanks...

Last edited by itsjustme; 04-02-2005 at 11:30 AM.
 
Old 04-02-2005, 06:48 PM   #2
TomaCzar
Member
 
Registered: Dec 2003
Location: Roc City (Rochester-NY)
Distribution: Slacker 4 Life
Posts: 125

Rep: Reputation: 15
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.
 
Old 04-03-2005, 04:54 PM   #3
itsjustme
Senior Member
 
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571

Original Poster
Rep: Reputation: 45
.
Well, I found this :
Quote:
3. Sound and third party software

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:
Code:
bs@bsubuntu:/etc$ lsof | grep esd
x-session 7515         bs  mem       REG        3,3   32472     843619 /usr/lib/libesd.so.0.2.35
esd       7571         bs  cwd       DIR        3,3    4096     655362 /home/bs
esd       7571         bs  rtd       DIR        3,3    4096          2 /
esd       7571         bs  txt       REG        3,3   39320     844175 /usr/bin/esd
esd       7571         bs  mem       REG        3,3   73304     901327 /lib/tls/i686/cmov/libnsl-2.3.2.so
esd       7571         bs  mem       REG        3,3 1222116     901322 /lib/tls/i686/cmov/libc-2.3.2.so
esd       7571         bs  mem       REG        3,3  130432     901325 /lib/tls/i686/cmov/libm-2.3.2.so
esd       7571         bs  mem       REG        3,3  142408     843616 /usr/lib/libaudiofile.so.0.0.2
esd       7571         bs  mem       REG        3,3   32472     843619 /usr/lib/libesd.so.0.2.35
esd       7571         bs  mem       REG        3,3   28656     901475 /lib/libwrap.so.0.7.6
esd       7571         bs  mem       REG        3,3   88936     901160 /lib/ld-2.3.2.so
esd       7571         bs    0r      CHR        1,3               1247 /dev/null
esd       7571         bs    1w     FIFO        0,5              11640 pipe
esd       7571         bs    2w     FIFO        0,5              11640 pipe
esd       7571         bs    3u     unix 0xf1d3bac0              11909 socket
esd       7571         bs    4u     unix 0xf1d3b640              11910 /tmp/.esd/socket
esd       7571         bs    6u     unix 0xf1d3b4c0              11913 /tmp/.esd/socket
esd       7571         bs    7u     unix 0xf1248680              11993 /tmp/.esd/socket
esd       7571         bs    8u     unix 0xef3bb980              12146 /tmp/.esd/socket
esd       7571         bs    9u     unix 0xee0d1dc0              12213 /tmp/.esd/socket
esd       7571         bs   10u     unix 0xecee0200              12293 /tmp/.esd/socket
esd       7571         bs   11u     unix 0xebedab40              12338 /tmp/.esd/socket
esd       7571         bs   12u     unix 0xebbff0a0              12439 /tmp/.esd/socket
esd       7571         bs   13u     unix 0xeb150ac0              12505 /tmp/.esd/socket
esd       7571         bs   14u     unix 0xea016500              12546 /tmp/.esd/socket
esd       7571         bs   15u     unix 0xea2599c0              12580 /tmp/.esd/socket
gnome-set 7575         bs  mem       REG        3,3   32472     843619 /usr/lib/libesd.so.0.2.35
gnome-smp 7610         bs  mem       REG        3,3   32472     843619 /usr/lib/libesd.so.0.2.35
gnome-vol 7614         bs  mem       REG        3,3   32472     843619 /usr/lib/libesd.so.0.2.35
nautilus  7616         bs  mem       REG        3,3   32472     843619 /usr/lib/libesd.so.0.2.35
gnome-pan 7618         bs  mem       REG        3,3   32472     843619 /usr/lib/libesd.so.0.2.35
gnome-cup 7620         bs  mem       REG        3,3   32472     843619 /usr/lib/libesd.so.0.2.35
gnome-ter 7622         bs  mem       REG        3,3   32472     843619 /usr/lib/libesd.so.0.2.35
gaim      7626         bs  mem       REG        3,3   32472     843619 /usr/lib/libesd.so.0.2.35
gaim      7626         bs  mem       REG        3,3    5564     967889 /usr/lib/ao/plugins-2/libesd.so
update-no 7628         bs  mem       REG        3,3   32472     843619 /usr/lib/libesd.so.0.2.35
evolution 7632         bs  mem       REG        3,3   32472     843619 /usr/lib/libesd.so.0.2.35
wnck-appl 7642         bs  mem       REG        3,3   32472     843619 /usr/lib/libesd.so.0.2.35
evolution 7658         bs  mem       REG        3,3   32472     843619 /usr/lib/libesd.so.0.2.35
trashappl 7663         bs  mem       REG        3,3   32472     843619 /usr/lib/libesd.so.0.2.35
evolution 7673         bs  mem       REG        3,3   32472     843619 /usr/lib/libesd.so.0.2.35
mixer_app 7695         bs  mem       REG        3,3   32472     843619 /usr/lib/libesd.so.0.2.35
notificat 7697         bs  mem       REG        3,3   32472     843619 /usr/lib/libesd.so.0.2.35
firefox-b 7741         bs  mem       REG        3,3   32472     843619 /usr/lib/libesd.so.0.2.35
 
Old 06-15-2005, 12:12 PM   #4
jugjogee
LQ Newbie
 
Registered: May 2005
Posts: 2

Rep: Reputation: 0
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.

Jugjogee
 
Old 06-15-2005, 01:08 PM   #5
angkor
Member
 
Registered: Mar 2005
Location: Amsterdam
Distribution: Debian => Ubuntu => Mac Osx
Posts: 165

Rep: Reputation: 31
Have you tried this?

I do have full duplex sound on Hoary but can't quite remember how I did it, but maybe the method described above gets you the same result. Good luck.
 
Old 06-15-2005, 03:55 PM   #6
jugjogee
LQ Newbie
 
Registered: May 2005
Posts: 2

Rep: Reputation: 0
angkor,

Many thanks, 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'.

I have made a note of the URL, as it has other things that could be of use to me later.

Jugjogee
 
Old 06-15-2005, 04:15 PM   #7
itsjustme
Senior Member
 
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571

Original Poster
Rep: Reputation: 45
Quote:
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.
 
  


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
/dev/dsp & esd h3xis Linux - Software 7 07-16-2005 04:51 AM
VMware + sound (/dev/dsp busy) tisam Linux - Software 0 02-17-2005 04:19 AM
Why is my /dev/dsp always busy ? mnguyen Linux - Software 1 03-22-2004 02:13 AM
/dev/dsp + device busy/no audio + esd mghere Linux - Newbie 7 12-11-2003 11:51 PM
Quake 3 , /dev/dsp busy :( juby Linux - Software 3 03-28-2003 11:19 PM


All times are GMT -5. The time now is 12:38 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