Bluetooth audio not working (with GDM(3))

Bug #1489651 reported by Linus
68
This bug affects 14 people
Affects Status Importance Assigned to Milestone
PulseAudio
Confirmed
Medium
Ubuntu GNOME
Confirmed
Medium
Unassigned
gdm3 (Debian)
New
Unknown
gdm3 (Ubuntu)
Fix Released
Medium
Unassigned
pulseaudio (Ubuntu)
Incomplete
Medium
Unassigned

Bug Description

I'm having problems with a Marshall Stanmore bluetooth speaker in Ubuntu GNOME 15.10 Beta. It pairs fine and is listed as a bluetooth device but won't show up in the audio settings as a device nor will it show up with pactl list. I also had this problem in Ubuntu GNOME 15.04 with the gnome-staging 3.16 ppa. It works fine with stock Ubuntu GNOME 15.04.

Revision history for this message
Tim Lunn (darkxst) wrote :

Maybe related to the Bluez5 transition?

Changed in ubuntu-gnome:
milestone: none → wily
Revision history for this message
metchebe (metchebe) wrote :

So after some investigation, I found out that this is a known problem that occurs with GDM and Pulseaudio. Basically it seems that GDM starts a pulseaudio instance and it "captures" the bluetooth a2dp sink. Unfortunately from what I could gather from some forums and some mailing lists, nobody seems to consider this a proper bug.

I've seen three workarounds:
1) Stop GDM from starting a pulseaudio instance.
2) Disable the pulseaudio bluetooth discovery module and load it after starting the user session.
3) Use another display manager, for example lightdm

I have chosen the second option, disabling 'module-bluetooth-discover' in /etc/pulse/default.pa and then running 'pacmd load-module module-bluetooth-discover && pacmd load-module module-switch-on-connect' in a terminal after I start GNOME.

Some references:
https://bbs.archlinux.org/viewtopic.php?pid=1526534#p1526534
https://wiki.archlinux.org/index.php/Bluetooth_headset#Connecting_works.2C_but_I_cannot_play_sound
https://wiki.debian.org/BluetoothUser/a2dp

Revision history for this message
James King (bassbase-jk) wrote :

Just as a note for anyone who has this issue, I found a workaround that seems to persist well. basically not allowing the user access to the bluetooth control so GDM's pulseaudio cannot start and take over.

found here: https://wiki.archlinux.org/index.php/Bluetooth_headset

open terminal and run: setfacl -m u:gdm:r /usr/bin/pulseaudio (may have to run as sudo depending on current rights)

then restart pulseaudio

sudo pkill pulseaudio

This has worked for me and now shows up as expected.

Revision history for this message
Mozzy Mozbourne (kmhusseini) wrote :

Thanks James, that worked well. Couldn't list my Bose Sound Mini in my sound devices but after setting the access did the trick

Changed in ubuntu-gnome:
milestone: wily → xenial
status: New → Confirmed
Revision history for this message
Tom Bailey (tom-bailey) wrote :

For some reason making pulseaudio non-executable by hte gdm user didn't work for me, but metchebe's second workaround got bluetooth audio working.

Another way to achieve the same thing is to remove these lines from /etc/pulse/default.pa

.ifexists module-bluetooth-discover.so
load-module module-bluetooth-discover
.endif

And then create ~/.config/pulse/default.pa with this content

.include /etc/pulse/default.pa

.ifexists module-bluetooth-discover.so
load-module module-bluetooth-discover
.endif

Revision history for this message
Prashant L Rao (prashant-rao) wrote :

I faced this same issue on Ubuntu Gnome 16.04. The bluetooth connection to my Logitech Bluetooth adapter kept dropping. Using the tip from James King above worked for me.

Revision history for this message
Yura (ykuchinskiy) wrote :

Same issue here, Ubuntu 15.10, Gnome Shell 3.18.2.

James' workaround from post #3 fixed the problem.

Metchebe's workaround from post #2 fixed the problem as well, but it requires running command manually, so not too practical...

Tom's workaround from post #5 didn't work for me...

Changed in ubuntu-gnome:
milestone: xenial → yakkety
tags: added: gnome-3.16 gnome-3.18 wily xenial
Revision history for this message
Augustin (g-u-s-g-u-s) wrote :

James's post (#3) made the bloody thing finally work for me! Dunno if it'll hold through reboots but at least, now, I entertain the hope to no completely lose my sanity.

So, to recap, after changing the user rights, I pkilled, then paired my device and was able to switch its "audio profile" to A2DP, something which had systematically failed until then.

Thanks James!

Revision history for this message
Jean-Pierre Rupp (xenog) wrote :

Fix from comment #3 worked for me.

Jeremy Bícha (jbicha)
Changed in gdm3 (Ubuntu):
importance: Undecided → Medium
status: New → Confirmed
Changed in ubuntu-gnome:
importance: Undecided → Medium
Jeremy Bícha (jbicha)
summary: - Bluetooth audio not working
+ Bluetooth audio not working (with GDM?)
Revision history for this message
Launchpad Janitor (janitor) wrote : Re: Bluetooth audio not working (with GDM?)

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in pulseaudio (Ubuntu):
status: New → Confirmed
Changed in pulseaudio (Ubuntu):
importance: Undecided → Medium
Changed in gdm3 (Debian):
status: Unknown → New
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thank you for reporting this bug to Ubuntu.
Ubuntu 15.10 (wily) reached end-of-life on July 28, 2016.

See this document for currently supported Ubuntu releases:
https://wiki.ubuntu.com/Releases

We appreciate that this bug may be old and you might not be interested in discussing it any more. But if you are then please upgrade to the latest Ubuntu version and re-test.

Changed in pulseaudio (Ubuntu):
status: Confirmed → Incomplete
Changed in gdm3 (Ubuntu):
status: Confirmed → Incomplete
Changed in ubuntu-gnome:
status: Confirmed → Incomplete
Revision history for this message
Doug McMahon (mc3man) wrote : Re: Bluetooth audio not working (with GDM(3)

Still not working in 17.10 dev (gdm3
Workaround by James does allow audio but you all need to fix this if you're dumping lightdm

tags: added: aardvark
tags: added: gnome-3.24
Changed in gdm3 (Ubuntu):
status: Incomplete → New
status: New → Confirmed
summary: - Bluetooth audio not working (with GDM?)
+ Bluetooth audio not working (with GDM(3)?)
summary: - Bluetooth audio not working (with GDM(3)?)
+ Bluetooth audio not working (with GDM(3)
Changed in ubuntu-gnome:
status: Incomplete → New
status: New → Confirmed
tags: added: a2dp
summary: - Bluetooth audio not working (with GDM(3)
+ Bluetooth audio not working (with GDM(3))
Changed in pulseaudio:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
Doug McMahon (mc3man) wrote :

For 17.10 fresh install the best solution was just the "disable pulseaudio's bluetooth in gdm", i.e.
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

Nothing more needed...

It almost seems the Debian upstream bug assumes one would get audio thru bluetooth, just not A2DP.
Here on my speaker it's A2DP or nothing so as it stands now there is nothing..

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gdm3 - 3.24.2-1ubuntu9

---------------
gdm3 (3.24.2-1ubuntu9) artful; urgency=medium

  * debian/default.pa
    - Added new file to disable Bluetooth audio devices in PulseAudio from
      gdm3. (LP: #1703415) (LP: #1489651)
  * debian/gdm3.install
    - Added details of the default.pa file
  * debian/gdm3.postinst
    - Added installation of default.pa and creation of dir if it doesn't
      exist.

 -- Will Cooke <email address hidden> Thu, 13 Jul 2017 12:14:34 +0100

Changed in gdm3 (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.