You are not logged in.
So I am using "airdopes 141" (pipewire and wireplumber setup) which is a bluetooth earphone and I have `Built-in Audio Analog Stereo` which is the speaker of my computer. When I connect my computer to airdopes 141 everything works perfectly but after sometime like 1 or 2 hour I was not able to hear any sound in my computer. I tried to investigate the issue and so I opened pavucontrol and saw that my default audio profile for "airdopes 141" which was ""High Fidelity Playback (A2DP Sink, codec AAC)"" and the codec was AAC got changed to some other shit ""Headset head Unit (HSP/HFP, codec mSBC)"" the codec was mSBC. I tried to choose the default one by clicking on the drop down but there was no ""High Fidelity Playback (A2DP Sink, codec AAC)"" . I had to turn my airdopes off and turn it back on. It worked for a while but I am facing the same issue again and again. ![]()
Here is the output -
[rounak@archissexy 12:54 ~]$ pactl list sinks
Sink #60
State: IDLE
Name: alsa_output.pci-0000_00_1f.3.analog-stereo
Description: Built-in Audio Analog Stereo
Driver: PipeWire
Sample Specification: s32le 2ch 48000Hz
Channel Map: front-left,front-right
Owner Module: 4294967295
Mute: no
Volume: front-left: 33178 / 51% / -17.74 dB, front-right: 33178 / 51% / -17.74 dB
balance 0.00
Base Volume: 65536 / 100% / 0.00 dB
Monitor Source: alsa_output.pci-0000_00_1f.3.analog-stereo.monitor
Latency: 0 usec, configured 0 usec
Flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY
Properties:
alsa.card = "0"
alsa.card_name = "HDA Intel PCH"
alsa.class = "generic"
alsa.device = "0"
alsa.driver_name = "snd_hda_intel"
alsa.id = "ALC887-VD Analog"
alsa.long_card_name = "HDA Intel PCH at 0xf7220000 irq 130"
alsa.name = "ALC887-VD Analog"
alsa.resolution_bits = "16"
alsa.subclass = "generic-mix"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
api.alsa.card.longname = "HDA Intel PCH at 0xf7220000 irq 130"
api.alsa.card.name = "HDA Intel PCH"
api.alsa.path = "front:0"
api.alsa.pcm.card = "0"
api.alsa.pcm.stream = "playback"
audio.channels = "2"
audio.position = "FL,FR"
card.profile.device = "5"
device.api = "alsa"
device.class = "sound"
device.id = "49"
device.profile.description = "Analog Stereo"
device.profile.name = "analog-stereo"
device.routes = "2"
factory.name = "api.alsa.pcm.sink"
media.class = "Audio/Sink"
device.description = "Built-in Audio"
node.name = "alsa_output.pci-0000_00_1f.3.analog-stereo"
node.nick = "ALC887-VD Analog"
node.pause-on-idle = "false"
object.path = "alsa:pcm:0:front:0:playback"
priority.driver = "1009"
priority.session = "1009"
factory.id = "18"
clock.quantum-limit = "8192"
client.id = "35"
node.driver = "true"
factory.mode = "merge"
audio.adapt.follower = ""
library.name = "audioconvert/libspa-audioconvert"
object.id = "59"
object.serial = "60"
node.max-latency = "16384/48000"
api.alsa.period-size = "1024"
api.alsa.period-num = "32"
api.alsa.headroom = "0"
api.acp.auto-port = "false"
api.acp.auto-profile = "false"
api.alsa.card = "0"
api.alsa.use-acp = "true"
api.dbus.ReserveDevice1 = "Audio0"
device.bus = "pci"
device.bus_path = "pci-0000:00:1f.3"
device.enum.api = "udev"
device.form_factor = "internal"
device.icon_name = "audio-card-analog-pci"
device.name = "alsa_card.pci-0000_00_1f.3"
device.nick = "HDA Intel PCH"
device.plugged.usec = "4562738"
device.product.id = "0xa2f0"
device.product.name = "200 Series PCH HD Audio"
device.subsystem = "sound"
sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
device.vendor.id = "0x8086"
device.vendor.name = "Intel Corporation"
device.string = "0"
Ports:
analog-output-lineout: Line Out (type: Line, priority: 9000, availability group: Legacy 4, available)
analog-output-headphones: Headphones (type: Headphones, priority: 9900, availability group: Legacy 5, not available)
Active Port: analog-output-lineout
Formats:
pcm
Sink #197
State: RUNNING
Name: bluez_output.83_0E_58_0E_71_D4.1
Description: Airdopes 141
Driver: PipeWire
Sample Specification: s16le 2ch 48000Hz
Channel Map: front-left,front-right
Owner Module: 4294967295
Mute: no
Volume: front-left: 41296 / 63% / -12.03 dB, front-right: 41296 / 63% / -12.03 dB
balance 0.00
Base Volume: 65536 / 100% / 0.00 dB
Monitor Source: bluez_output.83_0E_58_0E_71_D4.1.monitor
Latency: 0 usec, configured 0 usec
Flags: HARDWARE HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY
Properties:
api.bluez5.address = "83:0E:58:0E:71:D4"
api.bluez5.codec = "aac"
api.bluez5.profile = "a2dp-sink"
api.bluez5.transport = ""
card.profile.device = "1"
device.id = "60"
device.routes = "1"
factory.name = "api.bluez5.a2dp.sink"
device.description = "Airdopes 141"
node.name = "bluez_output.83_0E_58_0E_71_D4.1"
node.pause-on-idle = "false"
priority.driver = "1010"
priority.session = "1010"
factory.id = "8"
clock.quantum-limit = "8192"
device.api = "bluez5"
media.class = "Audio/Sink"
media.name = "Airdopes 141"
node.driver = "true"
factory.mode = "merge"
audio.adapt.follower = ""
library.name = "audioconvert/libspa-audioconvert"
object.id = "85"
object.serial = "197"
client.id = "35"
api.bluez5.class = "0x240404"
api.bluez5.connection = "disconnected"
api.bluez5.device = ""
api.bluez5.icon = "audio-headset"
api.bluez5.path = "/org/bluez/hci1/dev_83_0E_58_0E_71_D4"
bluez5.auto-connect = "[ hfp_hf hsp_hs a2dp_sink ]"
bluez5.profile = "off"
device.alias = "Airdopes 141"
device.bus = "bluetooth"
device.form_factor = "headset"
device.icon_name = "audio-headset-bluetooth"
device.name = "bluez_card.83_0E_58_0E_71_D4"
device.product.id = "0x000a"
device.string = "83:0E:58:0E:71:D4"
device.vendor.id = "bluetooth:05d6"
Ports:
headset-output: Headset (type: Headset, priority: 0, available)
Active Port: headset-output
Formats:
pcm
[rounak@archissexy 12:54 ~]$ Last edited by RounakDutta (2023-04-14 07:28:52)
Offline
Some applications might be trying to use your microphone, which leads to Pipewire using the headset profile.
If you don't like this behavior, try turning off automatic profile selection as instructed in the Wiki
Offline
Some applications might be trying to use your microphone, which leads to Pipewire using the headset profile.
If you don't like this behavior, try turning off automatic profile selection as instructed in the Wiki
[rounak@archissexy 16:51 ~]$ cat /etc/wireplumber/policy.lua.d/11-bluetooth-policy.lua
cat: /etc/wireplumber/policy.lua.d/11-bluetooth-policy.lua: No such file or directory
[rounak@archissexy 16:51 ~]$ cat ~/.config/wireplumber/policy.lua.d/11-bluetooth-policy.lua
cat: /home/rounak/.config/wireplumber/policy.lua.d/11-bluetooth-policy.lua: No such file or directory
[rounak@archissexy 16:51 ~]$ It says no such file or directory so I have to make the file right ?
Offline
Some applications might be trying to use your microphone, which leads to Pipewire using the headset profile.
If you don't like this behavior, try turning off automatic profile selection as instructed in the Wiki
I did eveything but the problem still persists and my earphone automatically switches to HSP sMBC profile -
[rounak@archissexy 23:46 ~]$ cat /etc/wireplumber/policy.lua.d/11-bluetooth-policy.lua
bluetooth_policy.policy["media-role.use-headset-profile"] = false
[rounak@archissexy 23:46 ~]$ cat ~/.config/wireplumber/policy.lua.d/11-bluetooth-policy.lua
bluetooth_policy.policy["media-role.use-headset-profile"] = false
[rounak@archissexy 23:47 ~]$ Last edited by RounakDutta (2023-04-14 18:20:43)
Offline
Ok ok so long story short I am facing 2 problems one after the another.
1) I was facing this problem - https://wiki.archlinux.org/title/PipeWi … _selection . I fixed it and it was very easy.
2) Now I am facing this problem - https://wiki.archlinux.org/title/PipeWi … oth_device
How did I know that? Well because after running 'pactl set-default-sink 60' I immediately got my sound back. The problem is that the bash script that is mentioned in the arch wiki does not work. I am a linux beginner and I am trying to learn bash script so I tried running the script and got errors on my terminals which I am not being able to figure out. Is there an alternative for the bash script ?
I tried to run the modified version of the script and still got errors -
I modified the line 9 of the script.
[rounak@archissexy 19:32 ~]$ pactl list sinks
Sink #60
State: SUSPENDED
Name: alsa_output.pci-0000_00_1f.3.analog-stereo
Description: Built-in Audio Analog Stereo
Driver: PipeWire
Sample Specification: s32le 2ch 48000Hz
Channel Map: front-left,front-right
Owner Module: 4294967295
Mute: no
Volume: front-left: 48496 / 74% / -7.85 dB, front-right: 48496 / 74% / -7.85 dB
balance 0.00
Base Volume: 65536 / 100% / 0.00 dB
Monitor Source: alsa_output.pci-0000_00_1f.3.analog-stereo.monitor
Latency: 0 usec, configured 0 usec
Flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY
Properties:
alsa.card = "0"
alsa.card_name = "HDA Intel PCH"
alsa.class = "generic"
alsa.device = "0"
alsa.driver_name = "snd_hda_intel"
alsa.id = "ALC887-VD Analog"
alsa.long_card_name = "HDA Intel PCH at 0xf7220000 irq 130"
alsa.name = "ALC887-VD Analog"
alsa.resolution_bits = "16"
alsa.subclass = "generic-mix"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
api.alsa.card.longname = "HDA Intel PCH at 0xf7220000 irq 130"
api.alsa.card.name = "HDA Intel PCH"
api.alsa.path = "front:0"
api.alsa.pcm.card = "0"
api.alsa.pcm.stream = "playback"
audio.channels = "2"
audio.position = "FL,FR"
card.profile.device = "5"
device.api = "alsa"
device.class = "sound"
device.id = "48"
device.profile.description = "Analog Stereo"
device.profile.name = "analog-stereo"
device.routes = "2"
factory.name = "api.alsa.pcm.sink"
media.class = "Audio/Sink"
device.description = "Built-in Audio"
node.name = "alsa_output.pci-0000_00_1f.3.analog-stereo"
node.nick = "ALC887-VD Analog"
node.pause-on-idle = "false"
object.path = "alsa:pcm:0:front:0:playback"
priority.driver = "1009"
priority.session = "1009"
factory.id = "18"
clock.quantum-limit = "8192"
client.id = "34"
node.driver = "true"
factory.mode = "merge"
audio.adapt.follower = ""
library.name = "audioconvert/libspa-audioconvert"
object.id = "59"
object.serial = "60"
node.max-latency = "16384/48000"
api.alsa.period-size = "1024"
api.alsa.period-num = "32"
api.alsa.headroom = "0"
api.acp.auto-port = "false"
api.acp.auto-profile = "false"
api.alsa.card = "0"
api.alsa.use-acp = "true"
api.dbus.ReserveDevice1 = "Audio0"
device.bus = "pci"
device.bus_path = "pci-0000:00:1f.3"
device.enum.api = "udev"
device.form_factor = "internal"
device.icon_name = "audio-card-analog-pci"
device.name = "alsa_card.pci-0000_00_1f.3"
device.nick = "HDA Intel PCH"
device.plugged.usec = "4399132"
device.product.id = "0xa2f0"
device.product.name = "200 Series PCH HD Audio"
device.subsystem = "sound"
sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
device.vendor.id = "0x8086"
device.vendor.name = "Intel Corporation"
device.string = "0"
Ports:
analog-output-lineout: Line Out (type: Line, priority: 9000, availability group: Legacy 4, available)
analog-output-headphones: Headphones (type: Headphones, priority: 9900, availability group: Legacy 5, available)
Active Port: analog-output-headphones
Formats:
pcm
Sink #67
State: SUSPENDED
Name: bluez_output.83_0E_58_0E_71_D4.1
Description: Airdopes 141
Driver: PipeWire
Sample Specification: s16le 2ch 48000Hz
Channel Map: front-left,front-right
Owner Module: 4294967295
Mute: no
Volume: front-left: 46919 / 72% / -8.71 dB, front-right: 46919 / 72% / -8.71 dB
balance 0.00
Base Volume: 65536 / 100% / 0.00 dB
Monitor Source: bluez_output.83_0E_58_0E_71_D4.1.monitor
Latency: 0 usec, configured 0 usec
Flags: HARDWARE HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY
Properties:
api.bluez5.address = "83:0E:58:0E:71:D4"
api.bluez5.codec = "aac"
api.bluez5.profile = "a2dp-sink"
api.bluez5.transport = ""
card.profile.device = "1"
device.id = "60"
device.routes = "1"
factory.name = "api.bluez5.a2dp.sink"
device.description = "Airdopes 141"
node.name = "bluez_output.83_0E_58_0E_71_D4.1"
node.pause-on-idle = "false"
priority.driver = "1010"
priority.session = "1010"
factory.id = "8"
clock.quantum-limit = "8192"
device.api = "bluez5"
media.class = "Audio/Sink"
media.name = "Airdopes 141"
node.driver = "true"
factory.mode = "merge"
audio.adapt.follower = ""
library.name = "audioconvert/libspa-audioconvert"
object.id = "61"
object.serial = "67"
client.id = "34"
api.bluez5.class = "0x240404"
api.bluez5.connection = "disconnected"
api.bluez5.device = ""
api.bluez5.icon = "audio-headset"
api.bluez5.path = "/org/bluez/hci0/dev_83_0E_58_0E_71_D4"
bluez5.auto-connect = "[ hfp_hf hsp_hs a2dp_sink ]"
bluez5.profile = "off"
device.alias = "Airdopes 141"
device.bus = "bluetooth"
device.form_factor = "headset"
device.icon_name = "audio-headset-bluetooth"
device.name = "bluez_card.83_0E_58_0E_71_D4"
device.product.id = "0x000a"
device.string = "83:0E:58:0E:71:D4"
device.vendor.id = "bluetooth:05d6"
Ports:
headset-output: Headset (type: Headset, priority: 0, available)
Active Port: headset-output
Formats:
pcm
[rounak@archissexy 19:32 ~]$ curl https://paste.rs/YCr | sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 800 100 800 0 0 505 0 0:00:01 0:00:01 --:--:-- 505
sh: line 5: $'\r': command not found
sleep: invalid time interval ‘1\r’
Try 'sleep --help' for more information.
sh: line 8: $'\r': command not found
sh: line 25: syntax error near unexpected token `$'do\r''
'h: line 25: `for i in $(pactl list sink-inputs|grep 'Sink Input'|sed 's/Sink Input #//'); do
[rounak@archissexy 19:33 ~]$ #Running the original script below
[rounak@archissexy 19:33 ~]$ curl https://gist.githubusercontent.com/tinywrkb/04e7fd644afa9b92d33a3a99ab07ee9e/raw/cb21c5e042c4ba20a0e3dbf1e9943cca4f8dab80/btswitch | sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 779 100 779 0 0 1852 0 --:--:-- --:--:-- --:--:-- 1854
Could not find bluetooth device, exiting...
[rounak@archissexy 19:33 ~]$ #But the bluetooth device is there!!!!Last edited by RounakDutta (2023-04-21 14:10:08)
Offline