Profile switching is not working for me either.
Reading through the comments and issues, my understanding is the configuration file that is supposed to trigger the switching is located at:
.config/wireplumber/policy.lua.d/10-default-policy.lua
The contents of that file on my system is as follows:
default_policy = {}
default_policy.endpoints = {}
default_policy.policy = {
["move"] = true, -- moves session items when metadata target.node changes
["follow"] = true, -- moves session items to the default device when it has changed
-- Set to 'true' to disable channel splitting & merging on nodes and enable
-- passthrough of audio in the same format as the format of the device.
-- Note that this breaks JACK support; it is generally not recommended
["audio.no-dsp"] = false,
-- how much to lower the volume of lower priority streams when ducking
-- note that this is a linear volume modifier (not cubic as in pulseaudio)
["duck.level"] = 0.3,
}
bluetooth_policy = {}
bluetooth_policy.policy = {
-- Whether to store state on the filesystem.
["use-persistent-storage"] = true,
-- Whether to use headset profile in the presence of an input stream.
["media-role.use-headset-profile"] = true,
-- Application names correspond to application.name in stream properties.
-- Applications which do not set media.role but which should be considered
-- for role based profile switching can be specified here.
["media-role.applications"] = { "Firefox", "Chromium input", "Google Chrome input", "Brave input", "Microsoft Edge input", "Vivaldi input", "ZOOM VoiceEngine", "Telegram Desktop", "Signal" },
}
function default_policy.enable()
-- Session item factories, building blocks for the session management graph
-- Do not disable these unless you really know what you are doing
load_module("si-node")
load_module("si-audio-adapter")
load_module("si-standard-link")
load_module("si-audio-endpoint")
-- API to access default nodes from scripts
load_module("default-nodes-api")
-- API to access mixer controls, needed for volume ducking
load_module("mixer-api")
-- Create endpoints statically at startup
load_script("static-endpoints.lua", default_policy.endpoints)
-- Create items for nodes that appear in the graph
load_script("create-item.lua", default_policy.policy)
-- Link nodes to each other to make media flow in the graph
load_script("policy-node.lua", default_policy.policy)
-- Link client nodes with endpoints to make media flow in the graph
load_script("policy-endpoint-client.lua", default_policy.policy)
load_script("policy-endpoint-client-links.lua", default_policy.policy)
-- Link endpoints with device nodes to make media flow in the graph
load_script("policy-endpoint-device.lua", default_policy.policy)
-- Switch bluetooth profile based on media.role
load_script("policy-bluetooth.lua", bluetooth_policy.policy)
end
However, when using the app Signal, the switching has to be done manually.
Linux version:
Linux 5.18.10-1-MANJARO
Installed Packages:
wireplumber 0.4.11-1
pipewire-zeroconf 0.3.54-1
pipewire-x11-bell 0.3.54-1
pipewire-v4l2 0.3.54-1
pipewire-pulse 0.3.54-1.0
pipewire-media-session-docs 0.4.1-2
pipewire-jack 0.3.54-1.0
pipewire-docs 0.3.54-1
pipewire-alsa 0.3.54-1.0
pipewire 0.3.54-1
I have an issue that seems to be related. On Manjaro distro, pipewire got recently updated like so (1:0.3.40-1 -> 1:0.3.42-2). Ever since the update, my tcp streaming setup stopped working. Tried to install wireplumber-git from Arch AUR to replace pipewire-media-session, as seen in issue #1863 (closed) to no avail. I had to downgrade back to 3.40-1 to have working audio with tcp streaming.
First of all thanks everyone for this wonderful software.
This is my second time posting here, on the same subject of SBC XQ.
Versions, Distribution, Desktop Environment:
❯ pipewire --version
pipewire
Compiled with libpipewire 0.3.31
Linked with libpipewire 0.3.31
❯ bluetoothctl --version
bluetoothctl: 5.60
❯ uname -a
Linux computer 5.10.49-1-MANJARO #1 SMP PREEMPT Sun Jul 11 12:59:43 UTC 2021 x86_64 GNU/Linux
❯ gnome-shell --version
GNOME Shell 40.3
Description of Problem:
After the following pipewire upgrade, my Bose headphones do not connect in SBC XQ:
To upgrade (6):
pipewire 1:0.3.31-1 (1:0.3.30-1) extra
pipewire-media-session 1:0.3.31-1 (1:0.3.30-1) extra
pipewire-alsa 1:0.3.31-1 (1:0.3.30-1) extra
pipewire-docs 1:0.3.31-1 (1:0.3.30-1) extra
pipewire-jack 1:0.3.31-1 (1:0.3.30-1) extra
pipewire-pulse 1:0.3.31-1 (1:0.3.30-1) extra
Context:
Manjaro recently upgraded bluez from 5.58 to 5.60 and pipewire from 3.30.1 to 3.31.1 alongside latest kernel updates and various packages, and this issue appeared.
Initially thought this was an issue with bluez.
Since my system is running zfs, rolled back, upgraded manjaro packages excluding bluez and pipewire. SBC-XQ worked.
Then upgraded Pipewire only to 3.31, leaving bluez intact: SBC XQ not working.
Then downgraded Pipewire, SBC XQ was working fine.
Then upgraded bluez to 5.60, the issue did not appear, SBC XQ was working fine.
Then upgraded Pipewire to 3.31 again, the issue reappeared.
This is why I chose to file a bug report here instead of filing it with the Bluez team. Hope I am not mistaken
How Reproducible:
Always on my system. I did a couple of retries. I also tried to remove /var/lib/bluetooth and redo the pairing at various steps, did not change the results.
Steps to Reproduce:
Pair and connect Bose 700 or similar headphones with SBC XQ mode using pipewire 3.30.1 Then upgrade to pipewire 3.31.1 --->> SBC XQ is no longer working.
Actual Results: SBC XQ is no longer working. AAC and HSP/HFP do work.
Expected Results: SBC XQ is working.
Workaround: Reverting to Pipewire 3.30 for the time being
Logs:
I am attaching the following logs:
btmon showing working connection with SBC XQ with bluez 5.60 installed and pipewire 3.30.1
btmon showing failed connection with SBC XQ with bluez 5.60 installed and pipewire 3.31.1
In my pipewire settings AAC and regular SBC is disabled, so in this log it only connects in HSP/HFP instead of reverting to AAC. The Bose headphones do not support LDAC or AptX. Please note I did manage to connect in AAC with pipewire 31.1 in a previous attempt.
journal grep bluetooth before and after upgrade @ 17:41:53
Detailed pw logs (level 5)
Pipewire bluez-monitor.conf
Thank you.
Step 1, I reverted to the previous line:
bluez5.codecs = [ sbc_xq ldac aptx aptx_hd ]
Result: pavucontrol reports SBC XQ but btmon reports Joint Stereo not Dual Channel
--
Channel: 64 len 16 [PSM 25 mode Basic (0x00)] {chan 0}
AVDTP: Set Configuration (0x03) Command (0x00) type 0x00 label 5 nosp 0
ACP SEID: 7
INT SEID: 1
Service Category: Media Transport (0x01)
Service Category: Media Codec (0x07)
Media Type: Audio (0x00)
Media Codec: SBC (0x00)
Frequency: 48000 (0x10)
Channel Mode: Joint Stereo (0x01)
Block Length: 16 (0x10)
Subbands: 8 (0x04)
Allocation Method: Loudness (0x01)
Minimum Bitpool: 2
Maximum Bitpool: 53
Service Category: Delay Reporting (0x08)
< ACL Data TX: Handle 11 flags 0x02 dlen 6 #174 [hci0] 5.880289
I guess theoretically 48000 joint stereo > than 44100 dual channel ?
Step 2 Commented the line like so:
#bluez5.codecs = [ sbc aac ldac aptx aptx_hd ]
Result: it connects in AAC
Channel: 64 len 18 [PSM 25 mode Basic (0x00)] {chan 0}
AVDTP: Set Configuration (0x03) Command (0x00) type 0x00 label 8 nosp 0
ACP SEID: 6
INT SEID: 3
Service Category: Media Transport (0x01)
Service Category: Media Codec (0x07)
Media Type: Audio (0x00)
Media Codec: MPEG-2,4 AAC (0x02)
Object Type: MPEG-4 AAC LC (0x40)
Frequency: 48000 (0x80)
Channels: 2 (0x04)
Bitrate: 320000bps
VBR: Yes
Service Category: Delay Reporting (0x08)
< ACL Data TX: Handle 11 flags 0x02 dlen 6 #107 [hci0] 5.897399
Channel: 320 len 2 [PSM 25 mode Basic (0x00)] {chan 0}
AVDTP: Set Configuration (0x03) Response Accept (0x02) type 0x00 label 8 nosp 0
Step 3 I switched manually through pavucontrol, but btmon did not reflect the change.
Step 4 I disconnected and reconnected, and SBC-XQ did work as expected in Dual Channel :)
Hope it sticks (default-routes?)
Channel: 1859 len 16 [PSM 25 mode Basic (0x00)] {chan 2}
AVDTP: Set Configuration (0x03) Command (0x00) type 0x00 label 9 nosp 0
ACP SEID: 1
INT SEID: 8
Service Category: Media Transport (0x01)
Service Category: Media Codec (0x07)
Media Type: Audio (0x00)
Media Codec: SBC (0x00)
Frequency: 44100 (0x20)
Channel Mode: Dual Channel (0x04)
Block Length: 16 (0x10)
Subbands: 8 (0x04)
Allocation Method: Loudness (0x01)
Minimum Bitpool: 2
Maximum Bitpool: 43
Service Category: Delay Reporting (0x08)
> ACL Data RX: Handle 11 flags 0x02 dlen 6 #884 [hci0] 10.948005
Thanks again for your help. .
My config was stored as a user profile under .config after many manual tweaks. Should all the new config files be copied over from /usr/share and reedited one by one?
Thank you for taking the time to answer. I have copied over both bluez-monitor and bluez-hardware from /usr/share.
Then I edited bluez-monitor to restrict to sbc-xq and a couple of other tweaks. Here is the new config:
Hardware volume works. It can connect to AAC or vanilla SBC with this line:
bluez5.codecs = [ sbc aac ldac aptx aptx_hd ]
But not dual channel SBC XQ with this line:
bluez5.codecs = [ sbc-xq ldac aptx aptx_hd ]
Here is btmon, it reverts to HSP/HFP again.
What am I doing wrong?
First of all thanks everyone for this wonderful software.
This is my second time posting here, on the same subject of SBC XQ.
Versions, Distribution, Desktop Environment:
❯ pipewire --version
pipewire
Compiled with libpipewire 0.3.31
Linked with libpipewire 0.3.31
❯ bluetoothctl --version
bluetoothctl: 5.60
❯ uname -a
Linux computer 5.10.49-1-MANJARO #1 SMP PREEMPT Sun Jul 11 12:59:43 UTC 2021 x86_64 GNU/Linux
❯ gnome-shell --version
GNOME Shell 40.3
Description of Problem:
After the following pipewire upgrade, my Bose headphones do not connect in SBC XQ:
To upgrade (6):
pipewire 1:0.3.31-1 (1:0.3.30-1) extra
pipewire-media-session 1:0.3.31-1 (1:0.3.30-1) extra
pipewire-alsa 1:0.3.31-1 (1:0.3.30-1) extra
pipewire-docs 1:0.3.31-1 (1:0.3.30-1) extra
pipewire-jack 1:0.3.31-1 (1:0.3.30-1) extra
pipewire-pulse 1:0.3.31-1 (1:0.3.30-1) extra
Context:
Manjaro recently upgraded bluez from 5.58 to 5.60 and pipewire from 3.30.1 to 3.31.1 alongside latest kernel updates and various packages, and this issue appeared.
Initially thought this was an issue with bluez.
Since my system is running zfs, rolled back, upgraded manjaro packages excluding bluez and pipewire. SBC-XQ worked.
Then upgraded Pipewire only to 3.31, leaving bluez intact: SBC XQ not working.
Then downgraded Pipewire, SBC XQ was working fine.
Then upgraded bluez to 5.60, the issue did not appear, SBC XQ was working fine.
Then upgraded Pipewire to 3.31 again, the issue reappeared.
This is why I chose to file a bug report here instead of filing it with the Bluez team. Hope I am not mistaken
How Reproducible:
Always on my system. I did a couple of retries. I also tried to remove /var/lib/bluetooth and redo the pairing at various steps, did not change the results.
Steps to Reproduce:
Pair and connect Bose 700 or similar headphones with SBC XQ mode using pipewire 3.30.1 Then upgrade to pipewire 3.31.1 --->> SBC XQ is no longer working.
Actual Results: SBC XQ is no longer working. AAC and HSP/HFP do work.
Expected Results: SBC XQ is working.
Workaround: Reverting to Pipewire 3.30 for the time being
Logs:
I am attaching the following logs:
btmon showing working connection with SBC XQ with bluez 5.60 installed and pipewire 3.30.1
btmon showing failed connection with SBC XQ with bluez 5.60 installed and pipewire 3.31.1
In my pipewire settings AAC and regular SBC is disabled, so in this log it only connects in HSP/HFP instead of reverting to AAC. The Bose headphones do not support LDAC or AptX. Please note I did manage to connect in AAC with pipewire 31.1 in a previous attempt.
journal grep bluetooth before and after upgrade @ 17:41:53
Detailed pw logs (level 5)
Pipewire bluez-monitor.conf
Hello and thank you for the progress on this modern alternative to pulseaudio and jack. . I am posting this issue as a follow up on the below exchange some time ago, after trying several builds over time:
I installed pipewire on a fresh manjaro VM, as a test bed before transitioning from a forked version of pulseaudio (using pali's enhancements) from all my machines.
.
Did the required configuration (including setting bluez5.sbc-xq-support=true). My Bose 700 do connect in Joint Stereo however NOT in dual channel, not with the highest quality SBC XQ setting.
.
The same headphones are connected to the same dongle in SBC XQ Dual Channel using other software (bluez-alsa, pali's pulseaudio on manjaro, and also zenwalk) so it is not a hardware issue.
.
To help with diagnosing the problem I have just compiled the following files:
.
Attached file capabilitiesBose.txt is BTmon showing the Dual Channel capability is advertised by the headphones, and the successful SBC Dual Channel connection with other software solutions.
Attached file pwdump.txt is a pipewire dump.
Attached file journalctlentries.txt is a couple of easier to read logs (grep a2dp and grep blue).
Attached file failedDual-BTmon.txt shows the current bluetooth negotiation.
Attached file configs.txt shows the pipewire conf files.
Attached pwinfoall.txt shows the output of pw-cli.
Specs and software versions:
bluetoothctl --version
bluetoothctl: 5.58
uname -a
Linux testPC 5.10.41-1-MANJARO #1 SMP PREEMPT Fri May 28 19:10:32 UTC 2021 x86_64 GNU/Linux
Desktop env: XFCE
pipewire
Compiled with libpipewire 0.3.28
Linked with libpipewire 0.3.28
Bluetooth Radio
ID 046d:c709 Logitech, Inc. BT Mini-Receiver (HCI mode)
Bluetooth Headphones
Bose 700
As @pvir mentionned he can successfully use his headphones in Dual Channel mode, I am hoping this can be done as well with the Bose headphones, and would appreciate any guidance. Thank you.
Many Thanks !
Please note I had taken the time to read the Wiki and several tutorials online, and nowhere did I see that the codec sbc_xq has to be explicitly added.
.
It was not included in the default bluez-monitor.conf file included in my distribution, nor did I notice it when perusing here on Gitlab.
.
Maybe it would be worthwhile to include a snippet in the file to let users know how to turn on this feature.
.
At least documenting this issue here may help with filling the gap in the interim :)
.
Marking this issue as resolved, thanks again @pvir .
PS: Here is my new btmon connection:
Media Type: Audio (0x00)
SEP Type: SNK (0x01)
In use: No
< ACL Data TX: Handle 11 flags 0x02 dlen 20 #208 [hci0] 46.350401
Channel: 2627 len 16 [PSM 25 mode Basic (0x00)] {chan 2}
AVDTP: Set Configuration (0x03) Command (0x00) type 0x00 label 1 nosp 0
ACP SEID: 1
INT SEID: 8
Service Category: Media Transport (0x01)
Service Category: Media Codec (0x07)
Media Type: Audio (0x00)
Media Codec: SBC (0x00)
Frequency: 48000 (0x10)
Channel Mode: Dual Channel (0x04)
Block Length: 16 (0x10)
Subbands: 8 (0x04)
Allocation Method: Loudness (0x01)
Minimum Bitpool: 2
Maximum Bitpool: 39
Service Category: Delay Reporting (0x08)
> HCI Event: Number of Completed Packets (0x13) plen 5 #209 [hci0] 46.353239
And relevant logs, for anyone wishing to see them in the future.
Hello and thank you for the progress on this modern alternative to pulseaudio and jack. . I am posting this issue as a follow up on the below exchange some time ago, after trying several builds over time:
I installed pipewire on a fresh manjaro VM, as a test bed before transitioning from a forked version of pulseaudio (using pali's enhancements) from all my machines.
.
Did the required configuration (including setting bluez5.sbc-xq-support=true). My Bose 700 do connect in Joint Stereo however NOT in dual channel, not with the highest quality SBC XQ setting.
.
The same headphones are connected to the same dongle in SBC XQ Dual Channel using other software (bluez-alsa, pali's pulseaudio on manjaro, and also zenwalk) so it is not a hardware issue.
.
To help with diagnosing the problem I have just compiled the following files:
.
Attached file capabilitiesBose.txt is BTmon showing the Dual Channel capability is advertised by the headphones, and the successful SBC Dual Channel connection with other software solutions.
Attached file pwdump.txt is a pipewire dump.
Attached file journalctlentries.txt is a couple of easier to read logs (grep a2dp and grep blue).
Attached file failedDual-BTmon.txt shows the current bluetooth negotiation.
Attached file configs.txt shows the pipewire conf files.
Attached pwinfoall.txt shows the output of pw-cli.
Specs and software versions:
bluetoothctl --version
bluetoothctl: 5.58
uname -a
Linux testPC 5.10.41-1-MANJARO #1 SMP PREEMPT Fri May 28 19:10:32 UTC 2021 x86_64 GNU/Linux
Desktop env: XFCE
pipewire
Compiled with libpipewire 0.3.28
Linked with libpipewire 0.3.28
Bluetooth Radio
ID 046d:c709 Logitech, Inc. BT Mini-Receiver (HCI mode)
Bluetooth Headphones
Bose 700
As @pvir mentionned he can successfully use his headphones in Dual Channel mode, I am hoping this can be done as well with the Bose headphones, and would appreciate any guidance. Thank you.