Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Unable to connect bluetooth headset to pipewire
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
KhoDialga
n00b
n00b


Joined: 25 Jun 2024
Posts: 6

PostPosted: Tue Jun 25, 2024 3:52 am    Post subject: Unable to connect bluetooth headset to pipewire Reply with quote

I just got a new install of Gentoo, and I've been stuck trying to connect my bluetooth headset for hours how, it pairs just fine, but as soon as I try connecting it, it spews out the following
Code:

[bluetooth]# connect 30:53:C1:B3:74:8A
Attempting to connect to 30:53:C1:B3:74:8A
[bluetooth]# Failed to connect: org.bluez.Error.Failed br-connection-profile-unavailable

I've tried connecting the headphones while I have a video playing on firefox, but that doesn't change anything.

Here's the output of emerge --info:
Code:

Portage 3.0.63 (python 3.12.3-final-0, default/linux/amd64/23.0, gcc-13, glibc-2.39-r6, 6.6.32-gentoo-dist x86_64)
=================================================================
System uname: Linux-6.6.32-gentoo-dist-x86_64-AMD_Ryzen_5_2400G_with_Radeon_Vega_Graphics-with-glibc2.39
KiB Mem:    22485164 total,  19566236 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Mon, 24 Jun 2024 23:30:00 +0000
Head commit of repository gentoo: 03b6ee1b1bfaa15ec62770dc98d5507a99112214
Timestamp of repository gentoo-zh: Mon, 24 Jun 2024 14:19:01 +0000
Head commit of repository gentoo-zh: e4d7022d71dee135e2d2ba8a47822e4321d4ea58

Timestamp of repository guru: Thu, 20 Jun 2024 07:34:05 +0000
Head commit of repository guru: bd4646a0393c6ab31559edbdf78d5f604b70892d

Timestamp of repository kzd: Fri, 21 Jun 2024 19:48:54 +0000
Head commit of repository kzd: 94686144e24f1fd6742b9367df5acae45eb0b218

Timestamp of repository mv: Thu, 20 Jun 2024 07:33:59 +0000
Head commit of repository mv: ab284eb93675a067e4ea8582bca795deb20d5bde

Timestamp of repository steam-overlay: Mon, 17 Jun 2024 09:48:55 +0000
Head commit of repository steam-overlay: 35b2e4df390d79636ff6480e802f556814085aa2

Head commit of repository the-anime-team: 779839b20a7ea8359d0275a9941ba6119e48c107

sh bash 5.2_p26-r5
ld GNU ld (Gentoo 2.42 p3) 2.42.0
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p26-r5::gentoo
dev-build/autoconf:        2.71-r7::gentoo
dev-build/automake:        1.16.5-r2::gentoo
dev-build/cmake:           3.28.5::gentoo
dev-build/libtool:         2.4.7-r4::gentoo
dev-build/make:            4.4.1-r1::gentoo
dev-build/meson:           1.4.0-r1::gentoo
dev-lang/perl:             5.38.2-r3::gentoo
dev-lang/python:           3.11.9-r1::gentoo, 3.12.3-r1::gentoo
dev-lang/rust-bin:         1.77.1::gentoo
sys-apps/baselayout:       2.15::gentoo
sys-apps/openrc:           0.54::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-devel/binutils:        2.42-r1::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/gcc:             13.2.1_p20240210::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/llvm:            17.0.6::gentoo
sys-kernel/linux-headers:  6.6-r1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.39-r6::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    volatile: False
    sync-rsync-extra-opts:
    sync-rsync-verify-max-age: 3
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes

gentoo-zh
    location: /var/db/repos/gentoo-zh
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo-zh.git
    masters: gentoo
    volatile: False

guru
    location: /var/db/repos/guru
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/guru.git
    masters: gentoo
    volatile: False

kzd
    location: /var/db/repos/kzd
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/kzd.git
    masters: gentoo steam-overlay
    volatile: False

mv
    location: /var/db/repos/mv
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/mv.git
    masters: gentoo
    volatile: False

steam-overlay
    location: /var/db/repos/steam-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/steam-overlay.git
    masters: gentoo
    volatile: False

Binary Repositories:

gentoobinhost
    priority: 1
    sync-uri: https://distfiles.gentoo.org/releases/amd64/binpackages/23.0/x86-64

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=znver1 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /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/revdep-rebuild /etc/sandbox.d"
CXXFLAGS="-march=znver1 -O2 -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE 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="-march=znver1 -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=znver1 -O2 -pipe"
GENTOO_MIRRORS="https://gentoo.osuosl.org/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
MAKEOPTS="-j8 -l9"
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/zsh"
USE="acl amd64 bluetooth bzip2 cet crypt dbus elogind ffmpeg flac gdbm iconv ipv6 jpeg libtirpc mp3 mp4 multilib ncurses nls openmp opus pam pcre pipewire png pulseaudio readline seccomp sound-server ssl test-rust unicode wayland webp xattr zip zlib" ABI_X86="64" ADA_TARGET="gcc_12" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio 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="mmx mmxext sse sse2 aes avx avx2 f16c fma3 pclmul popcnt rdrand sha sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12" RUBY_TARGETS="ruby31 ruby32" VIDEO_CARDS="amdgpu radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS

Any help is appreciated.
Back to top
View user's profile Send private message
netfab
Veteran
Veteran


Joined: 03 Mar 2005
Posts: 1926
Location: 127.0.0.1

PostPosted: Wed Jun 26, 2024 9:33 pm    Post subject: Reply with quote

Hi,

From the wiki :
Quote:

When you have minimal setup, you may encounter :
Code:

user $ bluetoothctl

[bluetooth]# connect <MAC>
Attempting to connect to <MAC>
Failed to connect: org.bluez.Error.Failed br-connection-profile-unavailable

This is due to PulseAudio not running [1], so start some audio playback first to trigger PA server startup and then try again to connect with BT headset.

Please check your pipewire useflags configuration by following instructions from the pipewire wiki page.
Back to top
View user's profile Send private message
KhoDialga
n00b
n00b


Joined: 25 Jun 2024
Posts: 6

PostPosted: Thu Jun 27, 2024 7:47 pm    Post subject: Reply with quote

netfab wrote:
Hi,

From the wiki :
Quote:

When you have minimal setup, you may encounter :
Code:

user $ bluetoothctl

[bluetooth]# connect <MAC>
Attempting to connect to <MAC>
Failed to connect: org.bluez.Error.Failed br-connection-profile-unavailable

This is due to PulseAudio not running [1], so start some audio playback first to trigger PA server startup and then try again to connect with BT headset.

Please check your pipewire useflags configuration by following instructions from the pipewire wiki page.


equery uses media-video/pipewire:
Code:

[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for media-video/pipewire-1.0.5:
 U I
 - - X             : Enable audible bell for X11
 + + abi_x86_32    : 32-bit (x86) libraries
 + + bluetooth     : Enable Bluetooth Support
 + + dbus          : Enable dbus support for anything that needs it (gpsd, gnomemeeting, etc)
 - - doc           : Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally
 - - echo-cancel   : Enable WebRTC-based echo canceller via media-libs/webrtc-audio-processing
 + + extra         : Build pw-cat/pw-play/pw-record
 + + ffmpeg        : Enable ffmpeg/libav-based audio/video codec support
 - - flatpak       : Enable Flatpak support
 - - gsettings     : Use gsettings (dev-libs/glib) to read/save used modules (useful for e.g. media-sound/paprefs
 - - gstreamer     : Add support for media-libs/gstreamer (Streaming media)
 - - ieee1394      : Enable FireWire/iLink IEEE1394 support (dv, camera, ...)
 - - jack-client   : Install a plugin for running PipeWire as a JACK client
 - - jack-sdk      : Use PipeWire as JACK replacement
 - - liblc3        : Allow loading LC3 plugins via media-sound/liblc3
 - - lv2           : Allow loading LV2 plugins via media-libs/lv2
 - - man           : Build and install man pages
 - - modemmanager  : Combined with USE=bluetooth, allows PipeWire to perform telephony on mobile devices.
 - - pipewire-alsa : Replace PulseAudio's ALSA plugin with PipeWire's plugin
 + + readline      : Enable support for libreadline, a GNU line-editing library that almost everyone wants
 - - roc           : Enable roc support for real-time audio streaming over the network, using media-libs/roc-toolkit. See
                     https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/Network#roc
 + + sound-server  : Provide sound server using ALSA and bluetooth devices
 + + ssl           : Enable raop-sink support (needs dev-libs/openssl)
 - - systemd       : Enable use of systemd-specific libraries and features like socket activation or session tracking
 - - test          : Enable dependencies and/or preparations necessary to run tests (usually controlled by FEATURES=test but can be toggled independently)
 - - v4l           : Enable support for video4linux (using linux-headers or userspace libv4l libraries)
 - - zeroconf      : Support for DNS Service Discovery (DNS-SD)
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6109
Location: Dallas area

PostPosted: Thu Jun 27, 2024 8:59 pm    Post subject: Reply with quote

What does "bluetoothctl info 30:53:C1:B3:74:8A" show?
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
KhoDialga
n00b
n00b


Joined: 25 Jun 2024
Posts: 6

PostPosted: Thu Jun 27, 2024 9:23 pm    Post subject: Reply with quote

Anon-E-moose wrote:
What does "bluetoothctl info 30:53:C1:B3:74:8A" show?

bluetoothctl 30:53:C1:B3:74:8A info:
Code:

Device 30:53:C1:B3:74:8A (public)
   Name: WH-CH520
   Alias: WH-CH520
   Class: 0x00240404 (2360324)
   Icon: audio-headset
   Paired: yes
   Bonded: yes
   Trusted: yes
   Blocked: no
   Connected: no
   LegacyPairing: no
   UUID: Vendor specific           (00000000-deca-fade-deca-deafdecacaff)
   UUID: Headset                   (00001108-0000-1000-8000-00805f9b34fb)
   UUID: Audio Sink                (0000110b-0000-1000-8000-00805f9b34fb)
   UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
   UUID: Advanced Audio Distribu.. (0000110d-0000-1000-8000-00805f9b34fb)
   UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
   UUID: A/V Remote Control Cont.. (0000110f-0000-1000-8000-00805f9b34fb)
   UUID: Handsfree                 (0000111e-0000-1000-8000-00805f9b34fb)
   UUID: Headset HS                (00001131-0000-1000-8000-00805f9b34fb)
   UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
   UUID: Vendor specific           (8901dfa8-5c7e-4d8f-9f0c-c2b70683f5f0)
   UUID: Vendor specific           (956c7b26-d49a-4ba8-b03f-b17d393cb6e2)
   UUID: Vendor specific           (df21fe2c-2515-4fdb-8886-f12c4d67927c)
   Modalias: usb:v054Cp0EADd1000

I should note that the headset works perfectly using just pulseaudio and not pipewire.
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6109
Location: Dallas area

PostPosted: Thu Jun 27, 2024 10:09 pm    Post subject: Reply with quote

What version of pipewire and wireplumber are you using?

Wireplumber is the part that actually does the talking to bluetooth.
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
KhoDialga
n00b
n00b


Joined: 25 Jun 2024
Posts: 6

PostPosted: Thu Jun 27, 2024 11:58 pm    Post subject: Reply with quote

I'm running pipewire 1.0.5 and wireplumber 0.4.17.
Back to top
View user's profile Send private message
netfab
Veteran
Veteran


Joined: 03 Mar 2005
Posts: 1926
Location: 127.0.0.1

PostPosted: Fri Jun 28, 2024 1:00 am    Post subject: Reply with quote

In your xorg session, do you have pipewire-pulse running ?
Back to top
View user's profile Send private message
KhoDialga
n00b
n00b


Joined: 25 Jun 2024
Posts: 6

PostPosted: Fri Jun 28, 2024 3:27 am    Post subject: Reply with quote

netfab wrote:
In your xorg session, do you have pipewire-pulse running ?


I should've specified that I'm using Wayland with Hyprland, my bad, but running pgrep -x pipewire-pulse doesn't yield any output. I have Hyprland set up so that it runs gentoo-pipewire-launcher when it starts.
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6109
Location: Dallas area

PostPosted: Fri Jun 28, 2024 8:57 am    Post subject: Reply with quote

When I had problems like that, I started bluetoothctl, and removed the device and rescanned, sync'd, trusted, etc, then try to connect again.

I assume you have dbus running, since that's the part that pops out the can't connect to org.bluez.* message
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
KhoDialga
n00b
n00b


Joined: 25 Jun 2024
Posts: 6

PostPosted: Fri Jun 28, 2024 9:01 am    Post subject: Reply with quote

I've already tried removing, re-adding and re-trusting the device, while audio is playing, and I still run onto the same problem. I'm almost sure I have dbus running as well as I launch Hyprland with dbus-launch, but I'll make sure by tomorrow.
Back to top
View user's profile Send private message
netfab
Veteran
Veteran


Joined: 03 Mar 2005
Posts: 1926
Location: 127.0.0.1

PostPosted: Fri Jun 28, 2024 9:04 am    Post subject: Reply with quote

You should try to get some debugging informations from pipewire. Maybe you will get something useful.
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6109
Location: Dallas area

PostPosted: Fri Jun 28, 2024 10:04 am    Post subject: Reply with quote

I've had to run bus-daemon --system as well as needing the session version for the compositor.

Code:
 1335 ?        /usr/bin/dbus-daemon --system
 1160 ?        /usr/bin/dbus-daemon --syslog --fork --print-pid 4 --print-address 6 --session


I don't remember whether it was the bluetooth trackpad or the headset that needed the --system flag.

From googling
Quote:
There are two types of buses in D-Bus: system and session. We’re only interested in talking on the system bus where the bluetooth service is perched on. There’s only one system bus on your machine, but there can be multiple session buses running on a system at the same time.


I do have the --system version starting from boot.

Edit to add: Ok, I double checked, pipewire/wireplumber don't need the system dbus, bluetooth does, ie bluez.

ETA2: How are you starting bluetooth?
The next time you try to start the headphones, do an "ps -afex | grep dbus" and "ps -afex | grep bluetoothd"
you should see dbus with the system flag and bluetoothd running.
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
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