Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Pulseaudio + Bluetooth maddness
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
SumDog
n00b
n00b


Joined: 16 Dec 2005
Posts: 20
Location: Chicago, USA

PostPosted: Wed Nov 19, 2014 11:30 pm    Post subject: Pulseaudio + Bluetooth maddness Reply with quote

So for the longest time I've simply masked all new versions of PulseAudio/Bluez and have been running pulseaudio-2 and bluez-4 because anything above that will crash either bluetoothd or pulseaudio on a pairing. I did a few bug reports on it at the time and will dig them up and append them to this post.

So here is the process of trying to connect my Velodyne vFree headphones using bluetoothctl:

Code:
bluetoothctl
[NEW] Controller 00:02:72:35:41:B4 sumblue [default]
[NEW] Device 00:18:6B:71:B4:E5 LG HBS900
[NEW] Device 34:DF:2A:09:A5:D0 Velodyne vFree
[bluetooth]# connect 34:DF:2A:09:A5:D0
Attempting to connect to 34:DF:2A:09:A5:D0
[CHG] Device 34:DF:2A:09:A5:D0 Connected: yes
Connection successful
[DEL] Controller 00:02:72:35:41:B4 sumblue [default]
[bluetooth]#


and here is the resulting output in my system logs:

Code:

Nov 20 12:16:00 [bluetoothd] /org/bluez/hci0/dev_34_DF_2A_09_A5_D0/fd0: fd(22) ready
Nov 20 12:16:00 [kernel] [845519.733284] input: 34:DF:2A:09:A5:D0 as /devices/virtual/input/input13
Nov 20 12:16:02 [kernel] [845521.846687] bluetoothd[6177]: segfault at 0 ip 00007f86c3f048db sp 00007fff75f122a0 error 4 in bluetoothd[7f86c3ecf000+e0000]


I will then run
Code:
/etc/init.d/bluetooth restart
and try this again:

Code:

bluetoothctl
[NEW] Controller 00:02:72:35:41:B4 sumblue [default]
[NEW] Device 34:DF:2A:09:A5:D0 Velodyne vFree
[NEW] Device 00:18:6B:71:B4:E5 LG HBS900
[bluetooth]# connect 34:DF:2A:09:A5:D0
Attempting to connect to 34:DF:2A:09:A5:D0
Failed to connect: org.bluez.Error.Failed
[bluetooth]#


This time I'll see the following in my logs

Code:

Nov 20 12:17:46 [/etc/init.d/bluetooth] status: crashed
Nov 20 12:17:48 [/etc/init.d/bluetooth] start-stop-daemon: no matching processes found
Nov 20 12:17:48 [bluetoothd] Bluetooth daemon 5.21
Nov 20 12:17:48 [bluetoothd] Starting SDP server
Nov 20 12:17:48 [bluetoothd] Bluetooth management interface 1.3 initialized
Nov 20 12:17:48 [bluetoothd] Sap driver initialization failed.
Nov 20 12:17:48 [bluetoothd] sap-server: Operation not permitted (1)
Nov 20 12:17:48 [pulseaudio] [pulseaudio] bluez5-util.c: Properties changed in unknown adapter
                - Last output repeated 2 times -
Nov 20 12:18:00 [bluetoothd] a2dp-sink profile connect failed for 34:DF:2A:09:A5:D0: Protocol not available


I found this Arch post https://wiki.archlinux.org/index.php/Bluetooth_headset

And tried loading all the pa modules (some fail because they're already loaded)

Code:

pactl load-module module-bluetooth-discover
Failure: Module initialization failed
$ pactl load-module module-bluetooth-policy
27
$ pactl load-module module-bluez5-discover
Failure: Module initialization failed
$ pactl load-module module-bluez5-device
Failure: Module initialization failed


Syslog:

Code:

Nov 20 12:17:46 [/etc/init.d/bluetooth] status: crashed
Nov 20 12:17:48 [/etc/init.d/bluetooth] start-stop-daemon: no matching processes found
Nov 20 12:17:48 [bluetoothd] Bluetooth daemon 5.21
Nov 20 12:17:48 [bluetoothd] Starting SDP server
Nov 20 12:17:48 [bluetoothd] Bluetooth management interface 1.3 initialized
Nov 20 12:17:48 [bluetoothd] Sap driver initialization failed.
Nov 20 12:17:48 [bluetoothd] sap-server: Operation not permitted (1)
Nov 20 12:17:48 [pulseaudio] [pulseaudio] bluez5-util.c: Properties changed in unknown adapter
                - Last output repeated 2 times -
Nov 20 12:18:00 [bluetoothd] a2dp-sink profile connect failed for 34:DF:2A:09:A5:D0: Protocol not available
Nov 20 12:20:01 [cron] (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons)
Nov 20 12:20:21 [pulseaudio] [pulseaudio] module.c: Module "module-bluetooth-discover" should be loaded once at most. Refusing to load.
                - Last output repeated twice -
Nov 20 12:22:03 [pulseaudio] [pulseaudio] module.c: Module "module-bluez5-discover" should be loaded once at most. Refusing to load.
Nov 20 12:22:07 [pulseaudio] [pulseaudio] module-bluez5-device.c: Failed to get device path from module arguments
Nov 20 12:22:07 [pulseaudio] [pulseaudio] module.c: Failed to load module "module-bluez5-device" (argument: ""): initialization failed.


That last one, when I search for Failed to load module module-bluez5-device initialization failed, the only results I get are from the source code and patches/mailing list stuff that doesn't seem to be relevant.

Here are the bugs I've filed previously:

https://bugs.gentoo.org/show_bug.cgi?id=506024
https://bugzilla.kernel.org/show_bug.cgi?id=73061#c3
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2569

PostPosted: Thu Nov 20, 2014 1:28 am    Post subject: Reply with quote

Sorry if i don't have specific information about your problem.

Im posting to say that almost all my linux audio problems go away if i remove pulseaudio. Have you given that a try?

Not trying to tell you what to put on your box but pulseaudio is probably the most uselessly complicated software on Linux.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Thu Nov 20, 2014 7:08 pm    Post subject: Reply with quote

You say you're running PulseAudio 2 and BlueZ 4.

The bluez5 module — as its name implies — doesn't support bluez4's interface, so getting error messages when you try to load it is expected behaviour.

However, that leaves the small detail that the bluez5 module doesn't *exist* in PA 2.x. It was added in 5.0. Which leaves me wondering... what code *are* you executing there? That might explain your random crashes...
Back to top
View user's profile Send private message
SumDog
n00b
n00b


Joined: 16 Dec 2005
Posts: 20
Location: Chicago, USA

PostPosted: Sun Nov 23, 2014 10:31 pm    Post subject: Reply with quote

Quote:
You say you're running PulseAudio 2 and BlueZ 4.


No I was running those two. That's when everything worked. I upgraded to PulseAudio 5 and Bluez 5. That's why everything broke. I masked all the new version of pulse/bluez for months, but now they're no longer in the tree so I decided to update and everything broke again.

Quote:
Im posting to say that almost all my linux audio problems go away if i remove pulseaudio. Have you given that a try?


At home I don't use Pulseaudio at all; just alsa. But at work I'm still on PA because I use bluetooth headphones. I wasn't sure if Bluez would work directly with Alsa. I suppose I could give that a shot, but I'm guessing by the way it's crashing that it's actually a Bluez issues and not a Pulseaudio one.

I'm just going to buy another bluetooth adaptor later today; BT4 adaptor. My headphones work fine on my laptop's bluetooth (I've got Pulseaudio streaming to it from my desktop for now) and it's on a later version. I'm guessing it might be a bug with dealing with my specific hardware between bluez-4 and 5 and I don't really want to bother installing all the debugging symbols to try and figure it out. [/quote]
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2569

PostPosted: Mon Nov 24, 2014 1:25 am    Post subject: Reply with quote

I hate to be the 'don't do that' guy but why not try wired headphones? IMO bluetooth anything sounds like you're yelling through a pillow. That said I can't say I ever went crazy on high quality bluetooth gear, I have no problems with spending USD $300 or more for a headset but it's gotta have wires.

I really, really don't want to come across as telling you what to do. It's a free world, and if you're set on bluetooth then that's how it is, I won't keep pestering you about it.

I can see the attraction of wireless headsets in the sense of not being tethered but I can't see the attraction of horribly distorted sound. I wear a headset all day, I have to spend real money to get one that doesn't give me a splitting headache by the end of the day.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum