Update.<br><br>System restart brings back the builtin soundcard.<br>But apparently I can&#39;t do this all day...<br><br>Beinan<br><br><div class="gmail_quote">On Wed, Dec 10, 2008 at 4:15 AM, Colin Guthrie <span dir="ltr">&lt;<a href="mailto:gmane@colin.guthr.ie">gmane@colin.guthr.ie</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">&#39;Twas brillig, and Beinan Li at 10/12/08 07:00 did gyre and gimble:<br>
<div class="Ih2E3d">&gt; Running Ubuntu 8.04 on my HP Pavilion dv6000 laptop.<br>
&gt; I have a USB SB Live! soundcard and a builtin AC97.<br>
&gt; Everytime when I unplugged my USB soundcard, pulseaudio connection is<br>
&gt; broken,<br>
&gt; and I had to restart X to bring it back (pulseaudio -k &amp;&amp; pulseaudio -D<br>
&gt; doesn&#39;t do the trick).<br>
<br>
</div>Sounds like pulse has deadlocked somehow. After pulseaudio -k, can you<br>
check to see if pulse is still running (ps aux| grep pulseaudio). If it<br>
is then you can try a killall -9 pulseaudio to really nuke it, but it<br>
would be good to get some debug out of it.<br>
<br>
What really needs to happen tho&#39; is to get a backtrace out of this.<br>
<br>
Do the following in your shell (each block is one line):<br>
<br>
export LD_BIND_NOW=1<br>
<br>
gdb pulseaudio<br>
<br>
handle SIGXCPU SIGPWR SIG33 SIG34 SIG42 SIG43 SIG44 SIG45 SIG46 SIG47<br>
SIG48 SIG49 SIG50 SIG51 SIG52 SIG53 SIG63 SIG62 SIG61 SIG60 SIG59 SIG58<br>
nostop noprint<br>
<br>
run<br>
<br>
<br>
This will run pulse under GDB (please note that you need to install<br>
debugging symbols - don&#39;t know how that is done in Ubuntu).<br>
<br>
Leave this terminal open and then make pulse crash. When it does go back<br>
to this terminal and you should be at a prompt again. Type:<br>
thread apply all bt full<br>
<br>
Then copy the output to a file and attach it to a bug report on<br>
<a href="http://www.pulseaudio.org/" target="_blank">http://www.pulseaudio.org/</a><br>
<br>
It would also help to say what version of PA you are using. As it&#39;s an<br>
older Ubuntu, I&#39;d guess it&#39;s the stock 0.9.10 version?<br>
<div class="Ih2E3d"><br>
&gt; And sometimes flash for Firefox doesn&#39;t give sound, whether I install<br>
&gt; libflashsupport or flashplugin-nonfree.<br>
<br>
</div>What version of the flash plugin are you using. With version 9 there are<br>
deadlocks in the audio API that adobe expose. There is nothing we can do<br>
about that as it&#39;s not open software. They have fixed a lot of the<br>
issues with their version 10 so you should try that if you are not<br>
already (in theory libflashsupport is not needed there but it may still<br>
be nicer to use it - there is a nicer name for the audio stream but<br>
that&#39;s trivial!).<br>
<div class="Ih2E3d"><br>
&gt; And I constantly get message saying resource busy when I restart<br>
&gt; pulseaudio by -k -D.<br>
<br>
</div>Chances are the first pulseaudio is not dying properly with -k as I<br>
noted above. If that&#39;s the case it will still be hogging the sound<br>
device and the second version cannot access it (although the second<br>
version should not run really - but perhaps at this point some other app<br>
- e.g. flash has started using ALSA directly and that&#39;s why it&#39;s busy).<br>
<div class="Ih2E3d"><br>
&gt; HELP!!!!!!<br>
&gt;<br>
&gt;<br>
&gt; I pasted my `pulseaudio -vv` command output below.<br>
&gt;<br>
&gt;<br>
&gt; E: alsa-util.c: Error opening PCM device hw:0: Device or resource busy<br>
&gt; E: module.c: Failed to load &nbsp;module &quot;module-alsa-sink&quot; (argument:<br>
&gt; &quot;device_id=0<br>
&gt; sink_name=alsa_output.pci_8086_284b_sound_card_0_alsa_playback_0&quot;):<br>
&gt; initialization failed.<br>
<br>
<br>
</div>Yeah this basically means that something is using the device.<br>
<br>
The output from the following command should tell you what application<br>
is using the alsa device:<br>
<br>
Here is the output on my machine when pulse is playing a track.<br>
<br>
[colin@jimmy ~]$ sudo lsof | grep /dev/snd<br>
kmix &nbsp; &nbsp; &nbsp;7080 &nbsp; &nbsp; &nbsp;colin &nbsp; 10u &nbsp; &nbsp; &nbsp;CHR &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;116,0 &nbsp; &nbsp; &nbsp; &nbsp;0t0<br>
 &nbsp; &nbsp; &nbsp;3836 /dev/snd/controlC0<br>
pulseaudi 7730 &nbsp; &nbsp; &nbsp;colin &nbsp;mem &nbsp; &nbsp; &nbsp; CHR &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 116,16<br>
 &nbsp; &nbsp; &nbsp;3735 /dev/snd/pcmC0D0p<br>
pulseaudi 7730 &nbsp; &nbsp; &nbsp;colin &nbsp; 17u &nbsp; &nbsp; &nbsp;CHR &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;116,0 &nbsp; &nbsp; &nbsp; &nbsp;0t0<br>
 &nbsp; &nbsp; &nbsp;3836 /dev/snd/controlC0<br>
pulseaudi 7730 &nbsp; &nbsp; &nbsp;colin &nbsp; 18u &nbsp; &nbsp; &nbsp;CHR &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 116,16 &nbsp; &nbsp; &nbsp; &nbsp;0t0<br>
 &nbsp; &nbsp; &nbsp;3735 /dev/snd/pcmC0D0p<br>
pulseaudi 7730 &nbsp; &nbsp; &nbsp;colin &nbsp; 19u &nbsp; &nbsp; &nbsp;CHR &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;116,0 &nbsp; &nbsp; &nbsp; &nbsp;0t0<br>
 &nbsp; &nbsp; &nbsp;3836 /dev/snd/controlC0<br>
pulseaudi 7730 &nbsp; &nbsp; &nbsp;colin &nbsp; 26u &nbsp; &nbsp; &nbsp;CHR &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;116,0 &nbsp; &nbsp; &nbsp; &nbsp;0t0<br>
 &nbsp; &nbsp; &nbsp;3836 /dev/snd/controlC0<br>
<br>
HTHs you debug some more.<br>
<br>
Col<br>
<br>
--<br>
<br>
Colin Guthrie<br>
gmane(at)<a href="http://colin.guthr.ie" target="_blank">colin.guthr.ie</a><br>
<a href="http://colin.guthr.ie/" target="_blank">http://colin.guthr.ie/</a><br>
<br>
Day Job:<br>
 &nbsp; Tribalogic Limited [<a href="http://www.tribalogic.net/" target="_blank">http://www.tribalogic.net/</a>]<br>
Open Source:<br>
 &nbsp; Mandriva Linux Contributor [<a href="http://www.mandriva.com/" target="_blank">http://www.mandriva.com/</a>]<br>
 &nbsp; PulseAudio Hacker [<a href="http://www.pulseaudio.org/" target="_blank">http://www.pulseaudio.org/</a>]<br>
 &nbsp; Trac Hacker [<a href="http://trac.edgewall.org/" target="_blank">http://trac.edgewall.org/</a>]<br>
<br>
_______________________________________________<br>
pulseaudio-discuss mailing list<br>
<a href="mailto:pulseaudio-discuss@mail.0pointer.de">pulseaudio-discuss@mail.0pointer.de</a><br>
<a href="https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss" target="_blank">https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss</a><br>
</blockquote></div><br>