Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Multimedia
  • Search

Bluetooth headphones and pipewire [solved]

Help with creation, editing, or playback of sounds, images, or video. Amarok, audacious, mplayer, grip, cdparanoia and anything else that makes a sound or plays a video.
Post Reply
Advanced search
10 posts • Page 1 of 1
Author
Message
mv
Watchman
Watchman
User avatar
Posts: 6795
Joined: Wed Apr 20, 2005 12:12 pm

Bluetooth headphones and pipewire [solved]

  • Quote

Post by mv » Sat Jun 29, 2024 9:03 pm

I know that there is a similar thread, but my problem is a bit different:

As in the mentioned thread, I also have sometimes the problem that I cannot connect, but for some unknown reason it succeeds after a few retries, so I guess that this is unrelated.

However, pipewire seems to be completely unaware of the bluetooth device: The output of e.g. mplayer -ao pulse goes straight to my connected loudspeaker, and wpctl status does not show anything related to bluetooth. Also restarting wireplumber does not display anything related to bluetooth.

I have also bluez-alsa installed, and if I set the corresponding asound.conf, the output goes to the bluetooth headphones, so they are indeed working and properly paired/connected and can receive sound.

Versions and active USE-flags:

wireplumber: 0.5.3(systemd -elogind -system-service)
pipewire 1.0.7(X bluetooth dbus sound-server ssl systemd)

Note that I have USE=systemd enabled and also systemd (hence udev) installed, but I boot with openrc.
This means that logind is not really running, but so far this was never a problem, because I am using wlroots w/ seatd-0.8.0(server -elogind -systemd).
Last edited by mv on Sun Jun 30, 2024 8:04 am, edited 2 times in total.
Top
Anon-E-moose
Watchman
Watchman
User avatar
Posts: 6566
Joined: Fri May 23, 2008 7:31 pm
Location: Dallas area

  • Quote

Post by Anon-E-moose » Sat Jun 29, 2024 9:26 pm

Are you just using whatever default config files for pipewire/wireplumber there are.
Or do you have config files in .config/pipewire and/or .config/wireplumber?
UM780 xtx, 6.18 zen kernel, gcc 15, openrc, wayland
minixforum m1-s1 max -- same software as above but used for ai learning


Zealots are gonna be zealots, just like haters are gonna be haters
Top
ormorph
n00b
n00b
Posts: 27
Joined: Tue Jun 18, 2024 6:51 pm

  • Quote

Post by ormorph » Sun Jun 30, 2024 4:09 am

Code: Select all

$ bluetoothctl
[bluetooth]# scan on
#out
...
[bluetooth]# [CHG] Device xx:xx:xx:xx:xx:xx
...
# run
[bluetooth]# connect xx:xx:xx:xx:xx:xx
Is the connection working? If not, what is the output after executing the command: connect xx:xx:xx:xx:xx:xx
Top
mv
Watchman
Watchman
User avatar
Posts: 6795
Joined: Wed Apr 20, 2005 12:12 pm

  • Quote

Post by mv » Sun Jun 30, 2024 6:01 am

Anon-E-moose wrote:Are you just using whatever default config files for pipewire/wireplumber there are.
Or do you have config files in .config/pipewire and/or .config/wireplumber?
I add the files
/etc/pulseaudio/client.pulse wrote:autospawn = no
and added or modified
/etc/pipewire/pipewire-pulse.conf.d/pipewire-pulse.conf wrote:pulse.properties = {
server.address = [
"unix:native"
"tcp:127.0.0.1:4713"
]
vm.overrides = {
pulse.min.quantum = 1024/48000
}
}
I also added for bluealsa the /etc/dbus-1/system.d/bluealsa.conf and etc/alsa/conf.d/20-bluealsa.conf from https://wiki.gentoo.org/wiki/Bluetooth_headset (with MAC addresses adapted; this is perhaps a bit too long to repost here), and
/etc/asound.conf wrote:defaults.bluealsa {
interface "hci0" # host Bluetooth adapter
device "41:42:FF:B3:D8:93" # Bluetooth headset MAC address
profile "a2dp"
}
(which takes only effect if I use the alsa device bluealsa; changing the alsa output to bluealsa in asound.conf unsurprisingly has only effect if e.g. mplayer outputs to alsa).

There were by default the symlink /etc/alsa/c onf.d/dca -> ../../../usr/share/alsa/pcm/dca.conf and
/etc/wireplumber/wireplumber.conf.d/entoo-sound-server-enable-audio-bluetooth.conf wrote:wireplumber.profiles = {
main = {
hardware.audio = required
hardware.bluetooth = required
}
}
Top
mv
Watchman
Watchman
User avatar
Posts: 6795
Joined: Wed Apr 20, 2005 12:12 pm

  • Quote

Post by mv » Sun Jun 30, 2024 6:11 am

ormorph wrote:

Code: Select all

$ bluetoothctl
[bluetooth]# scan on
#out
...
[bluetooth]# [CHG] Device xx:xx:xx:xx:xx:xx
...
# run
[bluetooth]# connect xx:xx:xx:xx:xx:xx
Is the connection working? If not, what is the output after executing the command: connect xx:xx:xx:xx:xx:xx
As mentioned, sometimes it is as in the other thread:
Attempting to connect to xx:xx:xx:xx:xx:xx
[bluetooth]# Failed to connect: org.bluez.Error.Failed br-connection-profile-unavailable
However, eventually (either after sufficiently many retries or sufficiently many attempts), I get
hci0 xx:xx:xx:xx:xx:xx type BR/EDR connected eir_len 5
[CHG] Device xx:xx:xx:xx:xx:xx Connected: yes
[B8]# [NEW] Endpoint /org/bluez/hci0/dev_xx_xx_xx_xx_xx_xx/sep1
[B8]# [NEW] Endpoint /org/bluez/hci0/dev_xx_xx_xx_xx_xx_xx/sep2
[B8]# [NEW] Transport /org/bluez/hci0/dev_xx_xx_xx_xx_xx_xx/sep1/fd2
[B8]# Connection successful
[B8]# [CHG] Transport /org/bluez/hci0/dev_xx_xx_xx_xx_xx_xx/sep1/fd2 Volume: 0x0058 (88)
[B8]# [CHG] Device xx:xx:xx:xx:xx:xx ServicesResolved: yes
B8 is the bluetooth name of my headphone (when I pair it with my smartphone).

Edit: Unrelated, but maybe somebody knows: I have to enable USE="extra-tools deprecated" for bluez to have bluetoothctl and hciconfig, and the descriptions of these USE-flags contain that the tools are intentionally not installed and should not be used. Do I have to be afraid that they go away? I found no alternatives. For instance, blueman showed only an error that a headphone icon is missing instead of presumably showing something that I could click for pairing, and the gnome tool is only a library which I cannot use as I do not use gnome. Similarly, the dependencies of the kde tool are horrible if you are not a kde user, anyway.
Top
ormorph
n00b
n00b
Posts: 27
Joined: Tue Jun 18, 2024 6:51 pm

  • Quote

Post by ormorph » Sun Jun 30, 2024 6:36 am

mv wrote:
Attempting to connect to xx:xx:xx:xx:xx:xx
[bluetooth]# Failed to connect: org.bluez.Error.Failed br-connection-profile-unavailable
However, eventually (either after sufficiently many retries or sufficiently many attempts), I get
It may be necessary to first remove the device and then reconnect it. You can also see the latest message here, тhis also solves the problem.
You can also add a line to the /etc/bluetooth/main.conf file:

Code: Select all

ControllerMode = bredr
Often, if I connected previously on a different OS, then I have to delete the device after that and connect again.

Code: Select all

[bluetooth]# devices
Device xx:xx:xx:xx:xx:xx name
[bluetooth]# remove xx:xx:xx:xx:xx:xx
Perhaps one of these options will help you.
Top
mv
Watchman
Watchman
User avatar
Posts: 6795
Joined: Wed Apr 20, 2005 12:12 pm

  • Quote

Post by mv » Sun Jun 30, 2024 7:55 am

ControllerMode = bredr
This did not really improve the situation, perhaps it made it even worse. (There were some messages that connection with bredr failed.) Perhaps I had no success at all with this option. (I tried so much that it is hard to say.)
ormorph wrote:You can also see the latest message here, тhis also solves the problem.
That did the trick! Adding the line monitor.bluez.seat-monitoring = disabled to the main section of /etc/wireplumber/wireplumber.conf.d/gentoo-sound-server-enable-audio-bluetooth.conf and restarting pipewire+wireplumber helped.

I just did not realize this first, because I almost did not hear anything: Under pipewire, the volume is much lower, and I do not know a way to control the volume (e.g. modifying with pavucontrol has no effect). With bluealsa, there exists the option --initialvolume=[0-100]. Does something similar exist for wireplumber?

I will open a separate thread for the volume.
Top
Anon-E-moose
Watchman
Watchman
User avatar
Posts: 6566
Joined: Fri May 23, 2008 7:31 pm
Location: Dallas area

  • Quote

Post by Anon-E-moose » Sun Jun 30, 2024 9:51 am

I had problems with bluetooth connecting occasionally with the dongle I was using (tp-link ub500) where I might have to disconnect/connect
a few times till it decided to connect. Because of that I did start doing things like making the connect mode only bredr, I don't really have
any true BLE devices so no harm on my end.
But I bought a new minipc with onboard bluetooth, and it works like a charm, never a problem with connection.
So sometimes it's the bluetooth controller that might be the problem.

I had forgotten about the monitor settings, I turn those off.

Code: Select all

    monitor.alsa.reserve-device = disabled
    monitor.bluez.seat-monitoring = disabled
UM780 xtx, 6.18 zen kernel, gcc 15, openrc, wayland
minixforum m1-s1 max -- same software as above but used for ai learning


Zealots are gonna be zealots, just like haters are gonna be haters
Top
mv
Watchman
Watchman
User avatar
Posts: 6795
Joined: Wed Apr 20, 2005 12:12 pm

  • Quote

Post by mv » Sun Jun 30, 2024 12:09 pm

Anon-E-moose wrote:So sometimes it's the bluetooth controller that might be the problem.
This might very well be. I paid << 2 bucks for this no-name dongle, but once it is connected it seems to work pretty well.
Top
x86demon
n00b
n00b
Posts: 1
Joined: Wed Feb 05, 2025 12:06 am

  • Quote

Post by x86demon » Wed Feb 05, 2025 12:11 am

Anon-E-moose wrote: I had forgotten about the monitor settings, I turn those off.

Code: Select all

    monitor.alsa.reserve-device = disabled
    monitor.bluez.seat-monitoring = disabled
Registered to say Thank you! This helped, after a year with unworkable BT headphones!

My Echo Dot still keeps disconnecting, but this does not seem critical. Tried dual and bredr controller mode, did not help.

Code: Select all

bluetooth]# hci0 *** type BR/EDR connected eir_len 14
[Echo Dot]# [CHG] Device *** Connected: yes
[Echo Dot]# hci0 *** auth failed with status 0x05 (Authentication Failed)
[Echo Dot]# hci0 *** type BR/EDR disconnected with reason 2
[bluetooth]# [CHG] Device *** Connected: no
Top
Post Reply

10 posts • Page 1 of 1

Return to “Multimedia”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic