Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 888207 - media-video/pipewire as a pulseaudio replacement does not work with bluetooth anymore (it used to work)
Summary: media-video/pipewire as a pulseaudio replacement does not work with bluetooth...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sam James
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-25 06:06 UTC by schmitt953
Modified: 2023-01-27 22:03 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description schmitt953 2022-12-25 06:06:02 UTC
I originally had a working pipewire system that did bluetooth perfectly on my old system. I then ran into the error parker bluetoothd[13279]: src/service.c:btd_service_connect() a2dp-sink profile connect failed for 60:AB:D2:29:BD:7C: Protocol not available. (I know I'm giving away my bose mac address, if any of the gentoo devs want to mess with it and are in close enough range let's grab dinner/beers instead...klondike/zero_chaos)
 https://www.guyrutenberg.com/2021/03/11/replacing-pulseaudio-with-pipewire/ shows the same error and they say it is a libspa issue. In a previous build I noticed libspa_bluez5 gets built. I know we changed a lot of the use flags for pulseaudio/pipewire but the old guide did work and I'm assuming it's just an oversight. I will find more info once I get home as I'm out of town and using new laptop.

The docs mention 

Reproducible: Always

Steps to Reproduce:
1. emerge pipewire with pulseaudio and bluetooth use flag
2. try to add headphones
3. /var/log/messages will show that a2dp is not supported
4. ls /
Actual Results:  
a2dp missing

parker@parker /usr/lib64/spa-0.2 $ ls -R |grep libspa
libspa-aec-null.so
libspa-aec-webrtc.so
libspa-alsa.so
libspa-audioconvert.so
libspa-audiomixer.so
libspa-audiotestsrc.so
libspa-avb.so
libspa-control.so
libspa-support.so
libspa-v4l2.so
libspa-videoconvert.so
libspa-videotestsrc.so
libspa-volume.so


libspa-bluez5.so

Expected Results:  
On my previous laptop with pipewire my headphones worked and with pavucontrol I could switch between a2dp and hfp, it was awesome! My NC700 worked great on those.

https://bugs.gentoo.org/710796 shows 17/157] x86_64-pc-linux-gnu-gcc  -o spa/plugins/bluez5/libspa-bluez5.so so I know that library should exist. Other distros seem to have libspa packages but use flags make sense.


I understand pipewire is experimental but this feels like a regression.

I do have some weird CFlags (long story, they're going to get simplified again soon but I doubt it's an issue.

Once I get home I'll get a diff between this laptop and my old laptop.
Comment 1 schmitt953 2022-12-25 06:10:09 UTC
I looked and wireplumber seems to be installing this. I don't know if I did wireplubmer before and I will find out but it seems like the .so is mentioned in the wireplumber sources
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-25 18:38:37 UTC
https://www.guyrutenberg.com/2021/03/11/replacing-pulseaudio-with-pipewire/ is for another distribution and quite old in PipeWire terms.

As you note, we've changed quite a bit in Gentoo since, and upstream has changed a tonne too.

It would help to know which PipeWire version was bad and which version was good.

I suggest the following:
1. Move away any old configurations in /etc/pipewire and /etc/wireplumber
2. Move away any old configurations in ~/.config/pipewire & ~/.config/wireplumber
3. Follow https://wiki.gentoo.org/wiki/PipeWire

Please also provide:
1. Full output from wireplumber and pipewire
2. emerge --info media-video/pipewire media-video/wireplumber
Comment 3 schmitt953 2022-12-26 23:20:19 UTC
Will do! The other laptop has a power jack issue but I will grab that hard drive and go through it. I'll also go through emerge --info. My guess is we will need a use flag in wireplumber for bluetooth.
Comment 4 schmitt953 2022-12-27 01:01:57 UTC
media-video/pipewire-0.3.63::gentoo was built with the following:
USE="X bluetooth echo-cancel modemmanager pipewire-alsa readline sound-server ssl v4l -dbus -doc -extra -flatpak -gsettings -gstreamer -jack-client -jack-sdk -lv2 (-system-service) -systemd -test -udev -zeroconf"
CFLAGS="-O2 -march=native -fPIC -fstack-protector-strong -fstack-clash-protection -fomit-frame-pointer -pipe -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2"
CXXFLAGS="-O2 -march=native -fPIC -fstack-protector-strong -fstack-clash-protection -fomit-frame-pointer -pipe -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2"
FEATURES="sandbox strict pid-sandbox assume-digests xattr protect-owned qa-unresolved-soname-deps binpkg-dostrip binpkg-docompress usersync buildpkg-live userfetch unknown-features-warn ipc-sandbox parallel-fetch network-sandbox usersandbox userpriv merge-sync unmerge-orphans sfperms unmerge-logs fixlafiles ebuild-locks config-protect-if-modified multilib-strict binpkg-logs distlocks preserve-libs news"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -fuse-ld=gold -Wl,-z,now -Wl,-z,relro -Wl,--strip-debug"


media-video/wireplumber-0.4.13::gentoo was built with the following:
USE="elogind (-system-service) -systemd -test" LUA_SINGLE_TARGET="lua5-4 -lua5-3"
CFLAGS="-O2 -march=native -fPIC -fstack-protector-strong -fstack-clash-protection -fomit-frame-pointer -pipe -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2"
CXXFLAGS="-O2 -march=native -fPIC -fstack-protector-strong -fstack-clash-protection -fomit-frame-pointer -pipe -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2"
FEATURES="sandbox strict pid-sandbox assume-digests xattr protect-owned qa-unresolved-soname-deps binpkg-dostrip binpkg-docompress usersync buildpkg-live userfetch unknown-features-warn ipc-sandbox parallel-fetch network-sandbox usersandbox userpriv merge-sync unmerge-orphans sfperms unmerge-logs fixlafiles ebuild-locks config-protect-if-modified multilib-strict binpkg-logs distlocks preserve-libs news"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -fuse-ld=gold -Wl,-z,now -Wl,-z,relro -Wl,--strip-debug"
Comment 5 schmitt953 2022-12-27 01:03:53 UTC
Sorry for confusion, in expected results I accidentally put in libspa-bluez5.so that was not in there. 

arker@parker /usr/lib64/spa-0.2 $ ls -R
.:
aec  alsa  audioconvert  audiomixer  audiotestsrc  avb  control  support  v4l2  videoconvert  videotestsrc  volume

./aec:
libspa-aec-null.so  libspa-aec-webrtc.so

./alsa:
libspa-alsa.so

./audioconvert:
libspa-audioconvert.so

./audiomixer:
libspa-audiomixer.so

./audiotestsrc:
libspa-audiotestsrc.so

./avb:
libspa-avb.so

./control:
libspa-control.so

./support:
libspa-support.so

./v4l2:
libspa-v4l2.so

./videoconvert:
libspa-videoconvert.so

./videotestsrc:
libspa-videotestsrc.so

./volume:
libspa-volume.so
Comment 6 schmitt953 2022-12-27 01:06:15 UTC
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -fPIC -fPIE -fstack-protector-strong -fstack-clash-protection -fomit-frame-pointer -pipe -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php8.1/ext-active/ /etc/php/cgi-php8.1/ext-active/ /etc/php/cli-php8.1/ext-active/ /etc/php/fpm-php8.1/ext-active/ /etc/php/phpdbg-php8.1/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="-O2 -march=native -fPIC -fPIE -fstack-protector-strong -fstack-clash-protection -fomit-frame-pointer -pipe -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="https://gentoo.osuosl.org/"
LANG="C.UTF8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -O2 -march=native -fPIC -fPIE -fstack-protector-strong -fstack-clash-protection -fomit-frame-pointer -pipe -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -pie -fuse-ld=gold -Wl,-z,now -Wl,-z,relro -Wl,--strip-debug"
MAKEOPTS="-j16"
PKGDIR="/var/cache/binpkgs"
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 --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="X a52 aac aacs acl aio amd64 bdplus bluetooth bluray branding bzip2 caps cdda clang cli compiler-rt crypt cups d3d9 dav1d default-compiler-rt default-libcxx default-lld device-mapper dri drm dts dvd egl elogind ffmpeg filecaps flac fortran gallium gbm gdbm gles2 gold hardened hwaccel hwloc iconv introspection io-uring iproute2 kerberos libass libcxx libcxxabi libglvnd libsamplerate libtirpc libunwind llvm-libunwind lto matroska modemmanager mp3 mpeg native-headset ncurses nettle nls nptl nss offload ofono-headset ompt opengl openmp openssl opus pam pcre pgo pic pie policykit powermanagement pulseaudio qt5 readline rubberband screencast seccomp secure-delete smp split-usr ssl static-pie system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-llvm system-sqlite system-ssl test-rust threads truetype unicode upower usbredir v4l vaapi verify-sig vtv vulkan wayland wifi x264 x265 xattr xcb xinerama xv xvid xwayland zlib" ABI_X86="64" ADA_TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx f16c mmx mmxext pclmul popcnt sse sse2 sse3 ssse3 sse4_1 sse4_2" CURL_SSL="nss" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64 pc" INPUT_DEVICES="evdev synaptics libinput" KERNEL="linux" L10N="en en-US" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-4" LUA_TARGETS="lua5-4" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_10" RUBY_TARGETS="ruby27" USERLAND="GNU" VIDEO_CARDS="intel i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS

=================================================================
                        Package Settings
=================================================================

net-wireless/bluez-5.66::gentoo was built with the following:
USE="cups deprecated experimental mesh obex readline udev -btpclient -debug -doc -extra-tools -midi (-selinux) -systemd -test -test-programs" PYTHON_SINGLE_TARGET="python3_10 -python3_11 -python3_8 -python3_9"
FEATURES="multilib-strict strict qa-unresolved-soname-deps ipc-sandbox fixlafiles usersync userfetch binpkg-dostrip news sfperms network-sandbox preserve-libs merge-sync binpkg-logs userpriv usersandbox assume-digests unmerge-orphans config-protect-if-modified protect-owned pid-sandbox parallel-fetch sandbox ebuild-locks buildpkg-live binpkg-docompress unmerge-logs xattr distlocks unknown-features-warn"




Also got it for bluez
Comment 7 schmitt953 2022-12-27 05:34:42 UTC
Got some more info. I got the bluez libspa when removing modemmanager and adding dbus and gstreamer to my use flags. I'm going to do that globally and see what happens
Comment 8 schmitt953 2022-12-27 05:35:58 UTC
Current state I still see in /var/log/messages when connecting to bose nc700 Dec 26 23:32:49 parker bluetoothd[21910]: src/service.c:btd_service_connect() a2dp-sink profile connect failed for 60:AB:D2:29:BD:7C: Protocol not available

Might be able to see if the issue is also with bluez, I've seen people complaining about bluez issues too. Also I should restart pipewire. Will return with more info asap
Comment 9 schmitt953 2022-12-27 05:50:38 UTC
I have a full workaround! After nuking /etc/pipewire and /etc/wireplumber (rm -rf) I changed use flags in pipewire to: -modemmanager dbus gstreamer

Then I did etc-update and merged them (I'm old school and still use etc-update) then restarted the xorg session and headphones conencted. Pavucontrol let me change profile and all is well. These use changes likely should be mentioned in the bluetooth/bluetooth headset/pipewire wiki pages if that makes sense.

ofono is installed too if that does anything for the hfp/hsp
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-01-26 00:59:50 UTC
My guess is this was somehow related to bug 865673. I'm not sure how modemmanager should make a difference here.
Comment 11 Igor V. Kovalenko 2023-01-27 19:32:11 UTC
Yep it looks exactly like bug 865673, note
  USE= ... -dbus
here https://bugs.gentoo.org/888207#c4