Launchpad has imported 3 comments from the remote bug at https://bugs.freedesktop.org/show_bug.cgi?id=57167.
If you reply to an imported comment from within Launchpad, your comment will be sent to the remote bug automatically. Read more about Launchpad's inter-bugtracker facilities at https://help.launchpad.net/InterBugTracking. ------------------------------------------------------------------------ On 2012-11-15T19:31:15+00:00 Tanu Kaskinen wrote: In module-bluetooth-device.c in filter_cb() there's this piece of code: if (acquire) if (bt_transport_acquire(u, FALSE) >= 0) { if (u->source) pa_source_suspend(u->source, FALSE, PA_SUSPEND_IDLE|PA_SUSPEND_USER); if (u->sink) pa_sink_suspend(u->sink, FALSE, PA_SUSPEND_IDLE|PA_SUSPEND_USER); } The acquire variable is set to true if the bluetooth audio state changed to "playing". This can happen without pulseaudio requesting it, so if we want to have strict equivalence "sink/source suspended" == "audio state is 'playing'" (and I think we want that), then it makes sense that module-bluetooth-device unsuspends the sink/source. The problem here is that there's no clean "force unsuspend" mechanism in pulseaudio. pa_sink_suspend(u->sink, FALSE, PA_SUSPEND_IDLE|PA_SUSPEND_USER) may not actually unsuspend the sink, because there are also other suspend reasons than just IDLE and USER. So, depending on the situation, the sink may or may not get unsuspended. module-bluetooth-device could list all possible reasons in the pa_sink_suspend() call, but that would be ugly. When adding new suspend reasons, it would be very easy to forget to update the pa_sink_suspend() call in module-bluetooth-device, and besides, if those suspend reasons are originally set by some other code, the original reasons to suspend don't really disappear when module-bluetooth-device unsuspends the sink, the old reasons are just overridden. I think there should be a function for forcing unsuspending. The semantics would be such that the sink gets unsuspended regardless of any standing suspend reasons, but all standing suspend reasons would be remembered, and once a new suspend request would be made, the forced unsuspend would cease to have effect, the sink would suspend and things would return to normal. A related thing is that I would like to replace the single suspend reason bitfield in pa_sink with an individual suspend request object for each suspend request. The single suspend reason bitfield is prone to conflicts if multiple places use the same reason (for example, module- bluetooth-device uses the USER reason which is also used for other purposes). Reply at: https://bugs.launchpad.net/ubuntu/+source/gdm3/+bug/1703415/comments/0 ------------------------------------------------------------------------ On 2012-11-15T20:44:28+00:00 Tanu Kaskinen wrote: (In reply to comment #0) > The problem here is that > there's no clean "force unsuspend" mechanism in pulseaudio. > pa_sink_suspend(u->sink, FALSE, PA_SUSPEND_IDLE|PA_SUSPEND_USER) may not > actually unsuspend the sink, because there are also other suspend reasons > than just IDLE and USER. So, depending on the situation, the sink may or may > not get unsuspended. > > module-bluetooth-device could list all possible reasons in the > pa_sink_suspend() call, but that would be ugly. When adding new suspend > reasons, it would be very easy to forget to update the pa_sink_suspend() > call in module-bluetooth-device, and besides, if those suspend reasons are > originally set by some other code, the original reasons to suspend don't > really disappear when module-bluetooth-device unsuspends the sink, the old > reasons are just overridden. Correction: there is the PA_SUSPEND_ALL suspend cause. That looks like a good simple solution to this bug, even though it doesn't solve all the described problems. But at least it will reliably unsuspend the sink. Reply at: https://bugs.launchpad.net/ubuntu/+source/gdm3/+bug/1703415/comments/1 ------------------------------------------------------------------------ On 2018-07-30T10:19:12+00:00 Gitlab-migration wrote: -- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/340. Reply at: https://bugs.launchpad.net/ubuntu/+source/gdm3/+bug/1703415/comments/16 ** Changed in: pulseaudio Status: Confirmed => Unknown -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to pulseaudio in Ubuntu. https://bugs.launchpad.net/bugs/1703415 Title: Bluetooth audio devices/profiles are missing after logging in from GDM Status in gdm: Expired Status in PulseAudio: Unknown Status in gdm3 package in Ubuntu: Fix Released Status in pulseaudio package in Ubuntu: Triaged Status in gdm3 source package in Xenial: Triaged Status in pulseaudio source package in Xenial: Triaged Status in gdm3 source package in Zesty: Triaged Status in pulseaudio source package in Zesty: Triaged Status in gdm3 package in Debian: New Bug description: This is actually a PulseAudio bug, but the workaround is to disable Bluetooth audio in GDM. Further discussion (and the source of my understanding about this issue) upstream are here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=805414 To summarise: GDM opens the A2DP profile for a11y purposes to allow screenreaders to output over BT audio devices. However Pulse doesn't release those devices when no audio is being played and the upshot is that once in the users session A2DP is not available for any Bluetooth audio devices, this means that you can only use the low quality profile HSP/HFP. There is a proposed workaround, but this means that a11y tools which need to output audio won't be able to use Bluetooth devices within GDM. I think that for 17.10 shipping this work-around is acceptable, and we should revisit in the 18.04 cycle to try and get a proper fix in PA. The suggested PA bug is: https://bugs.freedesktop.org/show_bug.cgi?id=57167 but that hasn't seen movement since 2012. = The work around = From the Debian wiki: https://wiki.debian.org/BluetoothUser/a2dp Disable the Bluetooth sink in the GDM PA daemon. Add this to /var/lib/gdm3/.config/pulse/default.pa #!/usr/bin/pulseaudio -nF # # load system wide configuration .include /etc/pulse/default.pa ### unload driver modules for Bluetooth hardware .ifexists module-bluetooth-policy.so unload-module module-bluetooth-policy .endif .ifexists module-bluetooth-discover.so unload-module module-bluetooth-discover .endif I have tested this, and I can confirm that it allows access to A2DP again in the user session. To manage notifications about this bug go to: https://bugs.launchpad.net/gdm/+bug/1703415/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp