Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 506024 - net-wireless/bluez-5.16 with media-sound/pulseaudio-5.0 - Bluetooth failures for A2DP headphone connection
Summary: net-wireless/bluez-5.16 with media-sound/pulseaudio-5.0 - Bluetooth failures ...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Pacho Ramos
URL: https://bugzilla.kernel.org/show_bug....
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-28 03:33 UTC by Sumit Khanna
Modified: 2014-06-26 14:42 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Kernel config (/proc/config.gz) in case it's kernel related (config.gz,20.01 KB, application/gzip)
2014-03-28 03:34 UTC, Sumit Khanna
Details
btmon logs (btmon.log,56.99 KB, text/plain)
2014-03-30 22:36 UTC, Sumit Khanna
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sumit Khanna 2014-03-28 03:33:10 UTC
I had a problem with pulseaudio-4 and A2DP so I kept it masked until recently; decided to get everything current. I'm mostly in amd64, but I pulled bluez from ~amd64 in hopes of fixing this issue. 

If I try the following:

$ bluetoothctl 
[NEW] Controller 00:02:72:35:41:B4 sumblue [default]
[NEW] Device 34:DF:2A:09:A5:D0 Velodyne vFree
[bluetooth]# power on
[CHG] Controller 00:02:72:35:41:B4 Class: 0x0c0104
Changing power on succeeded
[CHG] Controller 00:02:72:35:41:B4 Powered: yes
[bluetooth]# paired-devices
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

It says successful, but no more commands will run and if I look at the klog, 

[  174.634534] input: 34:DF:2A:09:A5:D0 as /devices/virtual/input/input8
[  176.748020] bluetoothd[2143]: segfault at 0 ip 00007fca1706037b sp 00007fffe876b050 error 4 in bluetoothd[7fca1702a000+d8000]

and syslog:

Mar 28 15:48:49 [bluetoothd] /org/bluez/hci0/dev_34_DF_2A_09_A5_D0/fd0: fd(22) ready
Mar 28 15:48:50 [kernel] [  174.634534] input: 34:DF:2A:09:A5:D0 as /devices/virtual/input/input8
Mar 28 15:48:52 [kernel] [  176.748020] bluetoothd[2143]: segfault at 0 ip 00007fca1706037b sp 00007fffe876b050 error 4 in bluetoothd[7fca1702a000+d8000]
Mar 28 15:49:25 [dbus] [system] Activating service name='org.freedesktop.NetworkManager' (using servicehelper)
Mar 28 15:49:25 [dbus] [system] Activated service 'org.freedesktop.NetworkManager' failed: Launch helper exited with unknown return code 1

If I /etc/init.d/bluetooth restart while leaving bluetoothctl open:

[DEL] Controller 00:02:72:35:41:B4 sumblue [default]
[NEW] Controller 00:02:72:35:41:B4 sumblue [default]
[NEW] Device 34:DF:2A:09:A5:D0 Velodyne vFree
[CHG] Controller 00:02:72:35:41:B4 Class: 0x000104
[CHG] Controller 00:02:72:35:41:B4 UUIDs has unsupported type
[CHG] Controller 00:02:72:35:41:B4 UUIDs has unsupported type
[bluetooth]# quit
[DEL] Controller 00:02:72:35:41:B4 sumblue [default]



I recompiled my kernel with uinput and tried both vmlinuz-3.13.7-gentoo and vmlinuz-3.12.13-gentoo. I've searched countless forums about this in Gentoo, Ubuntu and Arch and nothing I've found seems to work. I continually get the segfault. This did work with pulseaudio-2.1-r1 and the older net-wireless/bluez-4.101-r8 (was using blueman, but unmerged that since there is no bluez-5 version; pretty much the same as bluetoothctl with GUI so no big deal...similar results with Bluedevil which serves the same purpose)

This might be totally unrelated, but gdm never started for me either. I get a blank screen occasionally a screen with a clock I can't interact with. A few months back I just switched to xdm, but I'm wondering of the "Activated service 'org.freedesktop.NetworkManager' failed: Launch helper exited with unknown return code 1" is somehow related (saw things in various forum posts). 

Also in case needed, my Bluetooth adapter info:

T:  Bus=02 Lev=02 Prnt=02 Port=01 Cnt=01 Dev#=  3 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=0a5c ProdID=2198 Rev=03.91
S:  Manufacturer=Broadcom Corp
S:  Product=Broadcom Bluetooth 3.0 Device
S:  SerialNumber=0002723541B4
C:  #Ifs= 4 Cfg#= 1 Atr=a0 MxPwr=100mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
I:  If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
I:  If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
I:  If#= 3 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=01 Driver=(none)

and a Kernel bugzilla post in case it's at the kernel layer (some people report these types of errors going away if dropping back to 3.11.x, but I haven't tried that yet):

https://bugzilla.kernel.org/show_bug.cgi?id=73061



Reproducible: Always




 # emerge --info
Portage 2.2.8-r1 (default/linux/amd64/13.0, gcc-4.7.3, glibc-2.17, 3.13.7-gentoo x86_64)
=================================================================
System uname: Linux-3.13.7-gentoo-x86_64-Intel-R-_Core-TM-_i7-2600_CPU_@_3.40GHz-with-gentoo-2.2
KiB Mem:     8127988 total,   6111220 free
KiB Swap:   16777212 total,  16777212 free
Timestamp of tree: Thu, 27 Mar 2014 13:00:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
app-shells/bash:          4.2_p45
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.5-r3, 3.2.5-r3, 3.3.3
dev-util/cmake:           2.8.12.2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.10.3, 1.11.1, 1.12.6, 1.13.4
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.7.3-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo rebutia sublime-text sunrise gentoo-scala-tools penguindreams-org
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O3 -pipe -march=nocona"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.0/conf /usr/share/maven-bin-3.1/conf /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O3 -pipe -march=nocona"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j7"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/rebutia /var/lib/layman/sublime-text /var/lib/layman/sunrise /var/lib/layman/gentoo-scala-tools /usr/local/portage"
USE="X a52 aac aalib acl acpi aim alsa amd64 audiofile avahi berkdb bluetooth browserplugin bzip2 cairo cdinstall cdparanoia cdr cleartype cli corefonts cracklib crypt cups cxx daap dbus dri dts dvd dvdr dvdread emacs emul-linux-x86 exif fam ffmpeg firefox flac fortran ftp gdbm gif gnome gpm gstreamer gtk gtk2 gtkhtml gudev hal hwdb iconv ipv6 jack java jpeg ldap libcaca lm_sensors log4j mad matroska mmx modules mono mp3 mp4 mpd mpeg msn multilib mysql ncurses nls nptl nptlonly nsplugin offensive ogg oggvorbis opengl openmp pam pcre pdf png pulseaudio qt3support quicktime readline real rtc samba sdl seamonkey session spell sse sse2 ssl svg tcpd theora tiff tracker truetype type1 unicode usb vcd vorbis win32codecs wmf xinerama xmms xscreensaver xvid yahoo zeroconf zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir uusertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="dummy fbdev glint intel vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON
Comment 1 Sumit Khanna 2014-03-28 03:34:08 UTC
Created attachment 373698 [details]
Kernel config (/proc/config.gz) in case it's kernel related
Comment 2 Pacho Ramos gentoo-dev 2014-03-30 07:30:13 UTC
Running bluetoothd -d as suggested in https://bugzilla.kernel.org/show_bug.cgi?id=73061#c3 would help. Also, you could probably take a better backtrace:
https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces

Additionally, you could install abrt to let it catch the backtrace for you (once enough packages are recompiled with debugging symbols)
Comment 3 Sumit Khanna 2014-03-30 22:36:23 UTC
Created attachment 373936 [details]
btmon logs
Comment 4 Sumit Khanna 2014-03-30 22:50:04 UTC
I tried stopping the bluetooth service and running it manually with -d, but there was no debugging output or new stuff in the system/kernel log that I could see. 

I ended up getting everything working by removing the bluetooth USE flag from all the gnome packages I use, masking Pulseaudio-5 (going back to Puselaudio-2, bluez-4 and blueman).

I know that's a bad fix, but I'm going to keep kicking the can.
Comment 5 Pacho Ramos gentoo-dev 2014-03-31 20:09:08 UTC
Please forward the btmon output to upstream too as they requested it and will surely give them more usefulness than me ;)
Comment 6 Sumit Khanna 2014-03-31 21:17:19 UTC
btmon logs have been added upstream.
Comment 7 pille 2014-04-01 06:21:36 UTC
i have a working A2DP experience using bluez-5.15 and pulseaudio-5.0.
Comment 8 Pacho Ramos gentoo-dev 2014-04-27 08:04:04 UTC
+*pulseaudio-5.0-r1 (27 Apr 2014)
+
+  27 Apr 2014; Pacho Ramos <pacho@gentoo.org> +pulseaudio-5.0-r1.ebuild:
+  Support bluez-4 too (#505474, #506744, 506024)
+
Comment 9 Pacho Ramos gentoo-dev 2014-06-12 17:46:51 UTC
How does pulseaudio-5.0-r2 work with bluez-5 and bluez-4?
Comment 10 Pacho Ramos gentoo-dev 2014-06-26 14:42:33 UTC
(In reply to Pacho Ramos from comment #9)
> How does pulseaudio-5.0-r2 work with bluez-5 and bluez-4?