<div dir="ltr"><div><div>Hi,<br><br></div>Once the bluetooth headset was reconneted to pulseaudio, this issue has occurred. <br></div>So, is there a way to prevent the Bluetooth module (module-bluez5-*) from being deleted when the Bluetooth headset is disconnected?<br><div class="gmail_extra">Or Do I need to modify code?<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Best Regards,</div><div class="gmail_extra">Shinnosuke Suzuki<br><div class="gmail_quote">2017-11-13 18:01 GMT+09:00 Shinnosuke Suzuki <span dir="ltr"><<a href="mailto:suzukisn@gmail.com" target="_blank">suzukisn@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">As I posted before, Pulseaudio is stuck following point, So I put the additional log on to it.<span class="gmail-"><br>D: [pulseaudio] module-bluez5-discover.c: Loading module-bluez5-device path=/org/bluez/hci0/dev_00_<wbr>14_BE_8A_7B_FE<br><br></span>module-bluez5-discover.c : <br>static pa_hook_result_t device_connection_changed_cb(<wbr>pa_bluetooth_discovery *y, const pa_bluetooth_device *d, struct userdata *u) {<br>...<br> pa_log_debug("Loading module-bluez5-device %s", args);<br> m = pa_module_load(u->module-><wbr>core, "module-bluez5-device", args);<br> pa_log_debug("Loading module-bluez5-device end"); <- I added this, but didn't displayed.<br> pa_xfree(args);<br>...<br><br>It didn't return from pa_module_load() in device_connection_changed_cb()<wbr>.So I searched in pa_module_load().<br><br>module.c :<br>pa_module* pa_module_load(pa_core *c, const char *name, const char *argument) {<br>...<br>    if (!(m->dl = lt_dlopenext(name))) {<br>        /* We used to print the error that is returned by lt_dlerror(), but<br>         * lt_dlerror() is useless. It returns pretty much always "file not<br>         * found". That's because if there are any problems with loading the<br>         * module with normal loaders, libltdl falls back to the "preload"<br>         * loader, which never finds anything, and therefore says "file not<br>         * found". */<br>        pa_log("Failed to open module \"%s\".", name);<br>        goto fail;<br>    }<br>...<br><br>It didn't return from lt_dlopenext. I think pulseaudio get infinity loop in lt_dlopenext().<br>So I searched in pulseaudio-disscuss list again, I found the following post:<br>[pulseaudio-discuss] Arduino Tian issue changing card profile to A2DP with bluetooth headset<br><br>This post seems to be similar to my situation.<br>However, this post remain open issue.<br><br>I added boot parameter --disallow-module-loading as a trial. However, When I connect the bluetooth headset, I got error:<br>W: [pulseaudio] module-bluez5-discover.c: Failed to load module for device /org/bluez/hci0/dev_00_14_BE_<wbr>8A_7B_FE<br><br>Any suggestions?<br><div class="gmail_extra"><div class="gmail_quote"><br></div><div class="gmail_quote">Best Regards,</div><div class="gmail_quote">Shinnosuke Suzki<br></div><div><div class="gmail-h5"><div class="gmail_quote">2017-10-30 20:23 GMT+09:00 Tanu Kaskinen <span dir="ltr"><<a href="mailto:tanuk@iki.fi" target="_blank">tanuk@iki.fi</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-m_-1323226351901474537gmail-">On Sat, 2017-10-28 at 14:30 +0900, Shinnosuke Suzuki wrote:<br>
> > Your attached log ends at this message:<br>
> ><br>
> >    D: [pulseaudio] module-always-sink.c: Autoloading null-sink as no other sinks detected.<br>
> ><br>
> > Is that the last message that you see, and after that PulseAudio is<br>
> > stuck? If so, then it should be possible to find the infinite loop by<br>
> > adding extra logging to the code that follows that message. Or if you<br>
> > know how to use some profiling tool, that should do the trick as well.<br>
><br>
><br>
> I there any logging option to the pulseaudio?<br>
> I know only the way to get logging info by adding boot argument -vvvv.<br>
> Should I have to add a extra logging code to the pulseaudio?<br>
> Or Should I use a debug tool like gdb to find a stuck point?<br>
<br>
</span>Using gdb is a good idea, it will probably be effective at finding the<br>
looping part of the code.<br>
<br>
Regarding logging, I meant adding new log statements to the pulseaudio<br>
code. With -vvvv the log verbosity is already at the maximum, so the<br>
current logging isn't sufficient to find the looping code.<br>
<span class="gmail-m_-1323226351901474537gmail-HOEnZb"><font color="#888888"><br>
--<br>
Tanu<br>
<br>
<a href="https://www.patreon.com/tanuk" rel="noreferrer" target="_blank">https://www.patreon.com/tanuk</a><br>
</font></span></blockquote></div><br><br clear="all"><br></div></div>-- <br><span class="gmail-"><div class="gmail-m_-1323226351901474537gmail_signature">--<br>Shinnosuke Suzuki<br>E-mail : <a href="mailto:suzukisn@gmail.com" target="_blank">suzukisn@gmail.com</a></div>
</span></div></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">--<br>Shinnosuke Suzuki<br>E-mail : <a href="mailto:suzukisn@gmail.com" target="_blank">suzukisn@gmail.com</a></div>
</div></div>