module-bluetooth-discover does not load on login

Bug #1274613 reported by Paul Natsuo Kishimoto
218
This bug affects 49 people
Affects Status Importance Assigned to Milestone
pulseaudio (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

The following lines appear in /etc/pulse/default.pa, which I have not modified:

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

Expected: module-bluetooth-discover is loaded on login, as configured.

Observed: pulseaudio's module-bluetooth-discover does not load on login. My system does not detect and set up sinks when I connect to Bluetooth devices (including an A2DP speaker and a headset).

If I issue, in a terminal window:

$ pactl load-module module-bluetooth-discover
24

…then the devices are detected and sinks set up correctly.

$ lsb_release -rd && apt-cache policy pulseaudio-module-bluetooth
Description: Ubuntu 13.10
Release: 13.10
pulseaudio-module-bluetooth:
  Installed: 1:4.0-0ubuntu6
  Candidate: 1:4.0-0ubuntu6
  Version table:
 *** 1:4.0-0ubuntu6 0
        500 http://mirrors.mit.edu/ubuntu/ saucy/main amd64 Packages
        100 /var/lib/dpkg/status

ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: pulseaudio 1:4.0-0ubuntu6
ProcVersionSignature: Ubuntu 3.11.0-17.30-generic 3.11.10.3
Uname: Linux 3.11.0-17-generic x86_64
ApportVersion: 2.12.5-0ubuntu2.2
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: khaeru 2051 F.... pulseaudio
Date: Thu Jan 30 12:18:50 2014
EcryptfsInUse: Yes
InstallationDate: Installed on 2012-10-29 (457 days ago)
InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Release amd64 (20121017.5)
MarkForUpload: True
SourcePackage: pulseaudio
UpgradeStatus: Upgraded to saucy on 2013-09-11 (140 days ago)
dmi.bios.date: 05/15/2013
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A09
dmi.board.name: 085VR5
dmi.board.vendor: Dell Inc.
dmi.board.version: A00
dmi.chassis.type: 8
dmi.chassis.vendor: Dell Inc.
dmi.chassis.version: 0.1
dmi.modalias: dmi:bvnDellInc.:bvrA09:bd05/15/2013:svnDellInc.:pnDellSystemXPSL322X:pvr:rvnDellInc.:rn085VR5:rvrA00:cvnDellInc.:ct8:cvr0.1:
dmi.product.name: Dell System XPS L322X
dmi.sys.vendor: Dell Inc.

Revision history for this message
Paul Natsuo Kishimoto (khaeru) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in pulseaudio (Ubuntu):
status: New → Confirmed
Revision history for this message
David Roberts (dave-roberts20) wrote :

When logging on or restarting pulse audio this message appears in my syslog

pulseaudio[2727]: [pulseaudio] module.c: Module "module-bluetooth-discover" should be loaded once at most. Refusing to load

The discover module is not loaded though.

Manually loading it later with pactl works fine.

Revision history for this message
gvlists (gvlists) wrote :

If it helps, here is some additional information. I observed this problem with my Samsung HS-3000 headset when used with a bluetooth USB dongle which has a CSR LE chip in it. I did not have the same problem previously when I used a Nokia BH-100 headset with Samsung NC20 netbook.

Revision history for this message
Jim Ford (jaford) wrote :

I don't even have module-bluetooth-discover on my Xubuntu 13.10 system!

Revision history for this message
Anthony (p-ubuntu-t) wrote :

Same issue, and workaround applies on 14.04.

Revision history for this message
Tim Passingham (tim-8aw3u04umo) wrote :

This is driving me potty.

It seems I first have to attempt to connect the sink using Blueman, which fails with "Connection Failed: Stream setup failed"

I then use pactl to load the module-bluetooth-discover, and attempt reconnection, which usually works.

If I do these two thing the other way round it does not work.

This is horrible. All I want to do is listen to something. It should 'just work' once all the right software is installed and the device is paired.

Revision history for this message
Pouer (pierre-lalouer) wrote :

Same problem and same ,long to apply, workaround on Xunbuntu 14.04
This bug is reported as "unassigned" does it means that nobody is dealing with it?

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

module-bluetooth-discover is installed by default on most Ubuntu installs, and as such should be working out of the box. If it's not loading on startup but loads if you manually try to load it, then there must be an issue in pulseaudio as the transfer is done between the lightdm pulseaudio and the user pulseaudio, or something like that.

Since there are multiple people seeing this bug, and it seems very much related to pulse, I'm setting this bug to Triaged.

Changed in pulseaudio (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → High
Revision history for this message
Timo Verbrugghe (3-timo) wrote :

Hi everyone!

This is the first time that I ever post anything on launchpad.net, so here goes!

I too am experiencing this bug, but I also noticed that this bug only happens on an x86_64 machine, not on an i386 machine.

Am using an intel NUC (64 bit install) and an old HP laptop (32 bit install) and a trust USB bluetooth dongle. On the HP laptop, module-bluetooth-discover is loading at startup. On the nuc side, I have to load it manually.

Hopefully this helps you to narrow down the problem.

Revision history for this message
Cristiano Fraga G. Nunes (cfgnunes) wrote :

I have same problem here with:

lsb_release -rd && apt-cache policy pulseaudio-module-bluetooth

Description: Ubuntu 14.04 LTS
Release: 14.04
pulseaudio-module-bluetooth:
  Instalado: 1:4.0-0ubuntu11
  Candidato: 1:4.0-0ubuntu11
  Tabela de versão:
 *** 1:4.0-0ubuntu11 0
        500 http://br.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status

Revision history for this message
Hartwig Kolbe (kolbeb) wrote :

for me bluetooth also does not find my devices.
lsb_release -rd && apt-cache policy pulseaudio-module-bluetooth
Description: Ubuntu 14.04 LTS
Release: 14.04
pulseaudio-module-bluetooth:
  Installed: 1:4.0-0ubuntu11
  Candidate: 1:4.0-0ubuntu11
  Version table:
 *** 1:4.0-0ubuntu11 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/main i386 Packages
        100 /var/lib/dpkg/status

but:
pactl load-module module-bluetooth-discover
Failure: Module initialization failed

Everything worked just fine in 13.10, before upgrade to 14.04.

Revision history for this message
Hartwig Kolbe (kolbeb) wrote :

It seems to work if the command
   pactl load-module module-bluetooth-discover
is executed directly after startup/login

But, then, don't use Blueman.

Revision history for this message
David Henningsson (diwic) wrote : Blueman unloads module-bluetooth-discover

Hi Blueman developers,

This is an outreach for help - let me know if this is the right channel
or not. We seem to have a lot of people claiming that pulseaudio's
module-bluetooth-discover is not loaded on startup on 14.04. This causes
problems with bluetooth headsets.

Reading the code I can see that blueman deliberately unloads
module-bluetooth-discover. Do you have a better idea than just removing
those lines of code, which probably are there for a reason?

Here are some related bugs:

https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1274613
https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1283003

--
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic

Revision history for this message
Sebastian F (sf-lp) wrote :

I created an upstream bugreport for blueman:
https://github.com/blueman-project/blueman/issues/64

Revision history for this message
Esko Kauppinen (esko-kauppinen-y) wrote :

I have a Mint Mate 17.1 64 bit system which pairs the bluetooth HP mouse but it doesnt work.
From syslog:

Bluetooth Management interface initialized
Adapter /org/bluez/26447/hci0 has been enabled
Endpoint registered: sender=:1.1523 path=/MediaEndpoint/HFPAG
Endpoint registered: sender=:1.1523 path=/MediaEndpoint/HFPHS
Endpoint registered: sender=:1.1523 path=/MediaEndpoint/A2DPSource
Endpoint registered: sender=:1.1523 path=/MediaEndpoint/A2DPSink
hci0: Load Long Term Keys (0x0013) failed: Not Supported (0x0c)
[pulseaudio] module.c: Module "module-bluetooth-discover" should be loaded once at most. Refusing to load.
F0:65:DD:66:29:97: error updating services: Host is down (112)

Revision history for this message
Jacek Kluza (jacek-kluza+ubuntu1) wrote :

I fixed the issue simply by moving part:

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

...to the end of file (/etc/pulse/default.pa).
Hope it's working for you too. :)

Revision history for this message
oldgranola (marken-john206) wrote :

I tried Jacek Kluza's fix to no avail. Didn't work in Linux Mint 17.1 XFCE. I have a Linux Mint 17.1 Cinnamon desktop computer which uses 'cinnamon-bluetooth' applet instead of blueman which does work. I looked at bluez and pulse stuff and the default.pa file in that machine and compared to the one with blueman (with above problem requiring the manual modual load workaround). At the surface, all seems pretty much the same except the bluetooth controller cinnamon-bluetooth vs blueman. So I believe the problem is specific to blueman. BTW, to even get the missing module-bluetooth-discover to load from the command line, I had to un install the blueman which I had loaded via an application manager and install blueman from the command line.

Revision history for this message
Jacek Kluza (jacek-kluza+ubuntu1) wrote :

update: well... the fix with loading module-bluetooth-discover, as last module - works... just sometimes...

I added to startup:

pactl list modules | grep -q bluetooth-discover || pactl load-module module-bluetooth-discover

Revision history for this message
Cristiano Fraga G. Nunes (cfgnunes) wrote :

The problem is in "blueman-applet".

For more details, see:
https://github.com/blueman-project/blueman/issues/64

I solved the problem, installing the new version of this package (for Trusty), in:
ppa:cschramm/blueman

(https://launchpad.net/~cschramm/+archive/ubuntu/blueman)

Revision history for this message
Ang Bongsong (notinsideofhereiamnotinside) wrote :

Can confirm that this is currently occurring with pulseaudio 1:4.0 and the default Blueman package under Xubuntu 14.04.2 and Xfce 4.12.

Even though "load-module module-bluetooth-discover" is present by default in /etc/pulse/default.pa, it is not loaded at all on startup. It always must be manually loaded via entering "pactl load-module module-bluetooth-discover" in a terminal prompt, or running a script which does that on startup (after a roughly 8 second sleep period). Without the module loading at startup by default, it makes using devices like Bluetooth speakers a real hassle, and I strongly doubt the average user would be able to figure out an easy resolution to this issue.

P.S. Installing the newer Blueman package as mentioned in comment 20, does resolve the issue though, and I no longer need to have the aforementioned script run at startup.

Revision history for this message
Luke Schlather (luke2760) wrote :

The complete set of steps for the workaround are:

* In a terminal, run `pactl load-module module-bluetooth-discover`
* Right-click on the device in blueman, select "connect to audio sink"
* Open Puleseaudio volume control (pavucontrol), browse to "configuration" , use the dropdown to turn the Built-in audio profile "off"
* use the other dropdown to set the bluetooth device to use A2DP

I think the desirable behavior is you would hit "connect to audio sink" and audio would start flowing through the bluetooth device, and then if you hit disconnect it would start flowing through the default profile again.

However, there's an additional bug here, which is that after disconnecting (and manually switching the sink back on,) the default profile seems altered. I'm a little confused by what the underlying configuration change is, but xfce4-volumed can't control the volume of the built-in audio until I kill it and restart it:

killall xfce4-volumed
xfce4-volumed

Revision history for this message
sparr (sparr0) wrote :

This problem seems to persist in Xubuntu 15.04. The PPA mentioned in comment #20 does not have packages for vivid, only trusty.

Revision history for this message
Cerin (chrisspen) wrote :

After a recent update, Luke's solution no longer works for me. Trying to load the module just gives me an error:

    ~$ sudo pactl load-module module-bluetooth-discover
    Failure: Module initialization failed

and bluetooth never connects nor does any audio interface get registered. This is really frustrating. Bluetooth worked perfectly in 10/12 and now almost doesn't work at all in 14. How could this regress so badly?

Revision history for this message
Chorca (chorca) wrote :

Same issue here, I am unable to run the pactl load-module module-bluetooth-discover after some latest updates (over the past week). I verified the module is installed, and it is shown in a 'list modules', so should be loadable, but it refuses to load properly.

This issue has persisted through at least 3 released Ubuntu versions.

Revision history for this message
ikedagus (ikedagus) wrote :

I was able to have that fixed by disabling the Pulseaudio plug-in on blueman.

Revision history for this message
rik kleinsmit (rkleinsmit) wrote :

Ikedagus: what do you mean by "disabling the Pulseaudio plug-in on blueman"?

David Henningsson (diwic):
"Reading the code I can see that blueman deliberately unloads
module-bluetooth-discover. Do you have a better idea than just removing
those lines of code, which probably are there for a reason?"

Yes, you might ask the writers of blueman what the code is doing there and how to fix this. The writers are: Valmantas Palikša <email address hidden> and Tadas Dailyda <email address hidden>.

I think in the meantime, I will just remove those lines of code :-)

Revision history for this message
Paula Thomas (paula11thomas) wrote :

Xubunu version 14.04.1. Kernel 3.13.0-83-generic

This is most odd! Until yesterday afternoon the workaround of manually loading module-bluetooth-discover worked. Then it suddenly stopped and further attempts to load the module on reboot have been met with "ailure: Module initialisation failed" which is somewhat uninformative.

The following is an extract from syslog from my latest reboot I hope it is helpfull

Mar 24 17:00:00 Franklin dbus[684]: [system] Activating service name='org.blueman.Mechanism' (using servicehelper)
Mar 24 17:00:01 Franklin blueman-mechanism: Starting blueman-mechanism
Mar 24 17:00:01 Franklin dbus[684]: [system] Successfully activated service 'org.blueman.Mechanism'
Mar 24 17:00:02 Franklin blueman-mechanism: loading RfKill
Mar 24 17:00:02 Franklin blueman-mechanism: loading Ppp
Mar 24 17:00:02 Franklin blueman-mechanism: loading Config
Mar 24 17:00:02 Franklin blueman-mechanism: loading Network
Mar 24 17:00:04 Franklin bluetoothd[829]: Endpoint unregistered: sender=:1.43 path=/MediaEndpoint/HFPAG
Mar 24 17:00:04 Franklin bluetoothd[829]: Endpoint unregistered: sender=:1.43 path=/MediaEndpoint/HFPHS
Mar 24 17:00:04 Franklin bluetoothd[829]: Endpoint unregistered: sender=:1.43 path=/MediaEndpoint/A2DPSource
Mar 24 17:00:04 Franklin bluetoothd[829]: Endpoint unregistered: sender=:1.43 path=/MediaEndpoint/A2DPSink
Mar 24 17:00:04 Franklin bluetoothd[829]: hci0: Remove UUID (0x0011) failed: Busy (0x0a)
Mar 24 17:00:16 Franklin pulseaudio[2228]: [pulseaudio] module-bluetooth-discover.c: Failed to parse module arguments
Mar 24 17:00:16 Franklin pulseaudio[2228]: [pulseaudio] module.c: Failed to load module "module-bluetooth-discover" (argument: "start"): initialization failed.
Mar 24 17:00:31 Franklin blueman-mechanism: Exiting

Revision history for this message
Paula Thomas (paula11thomas) wrote :

I can also confirm that the solution mentioned at #20 works in xubuntu 14.04.4

Revision history for this message
Jeremy (wa113y3s) wrote :
Revision history for this message
Luke Yelavich (themuso) wrote : Re: [Bug 1274613] Re: module-bluetooth-discover does not load on login

We use bluez5 now since Xenial at least, and maybe even vivid. Check to make sure module-bluez5-discover is loaded.

Revision history for this message
Jarno Suni (jarnos) wrote :

Why isn't this SRUed in Trusty?

Revision history for this message
Jarno Suni (jarnos) wrote :

After installing the solution of #20:

In blueman: Devices..., search, Setup..., proceed without pairing, connect to A2DP Sink

$ pactl list modules short|grep bluetooth-device
29 module-bluetooth-device address="08:DF:1F:D9:93:80" path="/org/bluez/4093/hci0/dev_08_DF_1F_D9_93_80"
30 module-bluetooth-device address=08:DF:1F:D9:93:80 profile=a2dp

Oddly 2 devices.

Revision history for this message
Jarno Suni (jarnos) wrote :

Also, when using #20, bluetoothd crashes on startup.

Revision history for this message
Adrian Merrill (metalchef) wrote :

confirmed that the resolution posted by cfgnunes works on 14.04 LTS:

sudo apt-add-repository ppa:cschramm/blueman -y && sudo apt-get dist-upgrade -y

I'm using an MSi u-100 netbook with an upgraded intel 7260 network card; and I was going insane trying to get a2dp working. I no longer have to manually load the bluetooth module even though it was listed in /etc/pulse/default.pa.

Thanks!

tags: added: trusty
Changed in pulseaudio (Ubuntu):
importance: High → Medium
tags: added: a2dp
Revision history for this message
Sergio Arboleda (sergiogeek7) wrote :

I got the same problem, Ubuntu 16.04.
When I run
-pactl load-module module-bluetooth-discover
Failure: Module initialization failed

and the file of answer 20 doesn not work either.

Revision history for this message
fragargon (fragargon) wrote :
Download full text (3.2 KiB)

I got the same problem today. Worked fine before problem started 2 days ago
(no more profile a2dp available through pulseAudio)

I reinstall bluez packages as pulseAudio-mudule-bluetooth, remove cinnamon-bluetooth and give a try with blueman.

I ran into the error "setup stream sound error" untill a manually launch pulseaudio-module-bluetooth.
So I remove the blueman and reiinstall cinnamon bluetooth (which depend on gnoma-bluetooth)
Since it connect as soon as I fireup my bluetooth headset senheizer HD 4.40BT

here is the setup:

System: Host: Malez Kernel: 3.19.0-32-generic x86_64 (64 bit gcc: 4.8.2)
           Desktop: Cinnamon 2.8.8 (Gtk 3.10.8~8+qiana) Distro: Linux Mint 17.3 Rosa
Machine: Mobo: ASUSTeK model: M4A79T Deluxe v: Rev 1.xx Bios: American Megatrends v: 3503 date: 05/06/2011

~ $ lsusb
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 04e8:1f05 Samsung Electronics Co., Ltd S2 Portable [JMicron] (500GB)
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 003: ID 050d:0081 Belkin Components F8T001v2 Bluetooth
Bus 004 Device 002: ID 046d:c534 Logitech, Inc. Unifying Receiver
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 06f8:3004 Guillemot Corp. Hercules Classic Silver
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
~ $ dpkg -l | grep blue
ii bluetooth 4.101-0ubuntu13.3 all Bluetooth support
ii bluez 4.101-0ubuntu13.3 amd64 Bluetooth tools and daemons
ii bluez-alsa:amd64 4.101-0ubuntu13.3 amd64 Bluetooth ALSA support
ii bluez-alsa:i386 4.101-0ubuntu13.3 i386 Bluetooth ALSA support
ii bluez-audio 4.101-0ubuntu13.3 all Transitional package
ii bluez-btsco 1:0.50-0ubuntu4 amd64 Bluez Bluetooth SCO tool
ii bluez-cups 4.101-0ubuntu13.3 amd64 Bluetooth printer driver for CUPS
ii bluez-dbg 4.101-0ubuntu13.3 amd64 Bluetooth tools and daemons (with debugging symbols)
ii bluez-gstreamer 4.101-0ubuntu13.3 amd64 Bluetooth GStreamer support
ii bluez-hcidump 2.5-1 amd64 Analyses Bluetooth HCI packets
ii bluez-tools 0.1.38+git662e-3 amd64 Set of tools to manage Bluetooth devices for linux
ii bluez-utils 4.101-0ubuntu13.3 all Transitional package
ii cinnamon-bluetooth 3.8.11+rosa amd64 Gnome Bluetooth support for the Cinnamon desktop
ii gir1.2-gnomebluetooth-1.0 3.8.2.1-0ubuntu4.2 amd64 Introspection data for GnomeBluetooth
ii gnome-bluetooth 3.8.2.1-0ubuntu4.2 amd64 GNOME Bluetooth tools
ii indicator-bluetooth 0.0.6+14.04.20140207-0ubuntu2 amd64 System bluetooth indicator.
ii libbluetooth-dev 4.101-0ubuntu13.3 amd64 Development files for using the BlueZ Linux Bluetooth library
ii libbluetooth3:amd64 4.101-0ubuntu13.3 amd64 Library to use the BlueZ Linux Bluetooth stack
ii libbluetooth3-dbg 4.101-0ubuntu13.3 amd64 Library to use the BlueZ Linux Bluetooth stack with debugging symbols
ii libgnome-bluetooth11 3.8.2.1-0ubuntu4.2 amd64 GNOME Bluetooth tools - support library
ii pulseaud...

Read more...

tags: added: xenial
removed: saucy trusty
Revision history for this message
Alex Caswell (pileofamoebas) wrote :

I still have this problem :(

module-bluetooth-discover module initialization failed.

It's instructed to load in /etc/pulse/default.pa, but is not loaded when the system is started up. It's also not able to be manually loaded. Help!! D:

Revision history for this message
Mykyta (mykyt) wrote :

Same problem still persists on focal. module-bluetooth-discover is not loaded when the system is started up and can`t be manually loaded too. Please reach out if you need more info.

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.