pipewire issueshttps://gitlab.freedesktop.org/pipewire/pipewire/-/issues2024-02-12T14:40:21Zhttps://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3837pw-cli commands executed during pipewire shutdown freeze for ever.2024-02-12T14:40:21Zkenji amanopw-cli commands executed during pipewire shutdown freeze for ever.If I execute any pw-cli command while pipewire is shutting down, the command freezes for ever.
The command can be killed with SIGTERM.
At least, `pw-cli list-remotes` and `pw-cli info` freeze. I haven't tested other commands, but they ...If I execute any pw-cli command while pipewire is shutting down, the command freezes for ever.
The command can be killed with SIGTERM.
At least, `pw-cli list-remotes` and `pw-cli info` freeze. I haven't tested other commands, but they should freeze, too.https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3833`pw-dump` output does not reflect changed parameters during runtime2024-02-12T14:40:21ZRomain D.`pw-dump` output does not reflect changed parameters during runtimeI believe this is a regression in pipewire 1.0.2, as the issue does not happen with 1.0.1.
I use `libpipewire-module-filter-chain` to load a ladspa plugin. I then use `pw-dump` and `pw-cli set-param` to programatically change settings o...I believe this is a regression in pipewire 1.0.2, as the issue does not happen with 1.0.1.
I use `libpipewire-module-filter-chain` to load a ladspa plugin. I then use `pw-dump` and `pw-cli set-param` to programatically change settings of the ladspa plugins.
However, this stopped working in pipewire 1.0.2 (and 1.0.3). Using `pw-cli set-param` to change a parameter works, but `pw-dump` will still show the initial value of the parameter:
```
% pw-cli set-param 38 Props '{ params = [ "loudComp:Output volume (dB)" -10.00 ] }'
% pw-dump 38 | grep -A1 loudComp:Output
"loudComp:Output volume (dB)",
-20.000000, /* <-- XXX: should be -10.00 */
```
For reference, here is the expected behaviour in 1.0.1:
```
% pw-cli set-param 38 Props '{ params = [ "loudComp:Output volume (dB)" -10.00 ] }'
% pw-dump 38 | grep -A1 loudComp:Output
"loudComp:Output volume (dB)",
-10.000000,
% pw-cli set-param 38 Props '{ params = [ "loudComp:Output volume (dB)" -15.00 ] }'
% pw-dump 38 | grep -A1 loudComp:Output
"loudComp:Output volume (dB)",
-15.000000,
```
[pipewire.conf](/uploads/65a4723927bc410b302252cb2c835a96/pipewire.conf)https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3840Unable to share camera simultaneously using gstreamer (pipewiresrc) and Firef...2024-02-12T14:40:21ZJan GrulichUnable to share camera simultaneously using gstreamer (pipewiresrc) and Firefox or OBS StudioWhen an application, like Kamoso, uses a camera through gstreamer, I'm unable to use it in Firefox or OBS Studio. It will say that the stream is streaming, but we are not receiving any buffer. It can be also reproduced by simply running ...When an application, like Kamoso, uses a camera through gstreamer, I'm unable to use it in Firefox or OBS Studio. It will say that the stream is streaming, but we are not receiving any buffer. It can be also reproduced by simply running `gst-launch-1.0 -v pipewiresrc ! videoconvert ! ximagesink` and use either Firefox or OBS Studio to share same camera over PipeWire. It works when Firefox or OBS Studio use the camera first.
This is with PipeWire 1.0.3 on Fedora 39.
Firefox issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1876895https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/207Properly handle configuration files2024-02-09T06:27:47ZSergey KondakovProperly handle configuration filesIt seems that right now PW only reads config from /etc/pipewire/pipewire.conf and fatally fails on any inconsistency. It should read all possible config locations in proper order (built-in/shipped defaults, system-wide /etc, site-wide /u...It seems that right now PW only reads config from /etc/pipewire/pipewire.conf and fatally fails on any inconsistency. It should read all possible config locations in proper order (built-in/shipped defaults, system-wide /etc, site-wide /usr/local/etc, user-wide ~/.config) with overrides and don't bail out on obvious misconfiguration, potentially leaving system without audio support or more.
It may even have dbus runtime configuration interface for GUI managers that would not need to handle its files by themselves.https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3828Bluetooth does not work on Pipewire 1.0.32024-02-08T15:50:17ZRizal MartinBluetooth does not work on Pipewire 1.0.3- PipeWire version (`pipewire --version`): 1.0.2
- Distribution and distribution version (`PRETTY_NAME` from `/etc/os-release`): slackware-current
- Desktop Environment: xfce
- Kernel version (`uname -r`): 6.6.14
- BlueZ version (`blueto...- PipeWire version (`pipewire --version`): 1.0.2
- Distribution and distribution version (`PRETTY_NAME` from `/etc/os-release`): slackware-current
- Desktop Environment: xfce
- Kernel version (`uname -r`): 6.6.14
- BlueZ version (`bluetoothctl --version`): 5.72
- `lsusb`:
```plaintext
Bus 001 Device 003: ID 04ca:3015 Lite-On Technology Corp. Qualcomm Atheros QCA9377 Bluetooth
```
## Description of Problem:
Bluetooth connects then disconnect immediately showing this error message on blueman: `br-connection-profile-unavailable` Upon checking log it shows this error message `btd_service_connect() a2dp-sink profile connect failed for <mac address> protocol not available`
### Steps to Reproduce:
1. Connect to a bluetooth audio device using blueman
### Actual Results:
It shows br-connection-profile-unavailable error message
### Expected Results:
Bluetooth device should successfully connectedhttps://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3842`target.object` in filter-chain only resolves on object ID and not on node.name2024-02-06T22:59:10ZJonathan Tinkham`target.object` in filter-chain only resolves on object ID and not on node.name- PipeWire version (`pipewire --version`): 1.0.3
- Distribution and distribution version (`PRETTY_NAME` from `/etc/os-release`): Arch Linux
- Desktop Environment: Plasma and Cinnamon
- Kernel version (`uname -r`): 6.7.3-zen1-2-zen
## De...- PipeWire version (`pipewire --version`): 1.0.3
- Distribution and distribution version (`PRETTY_NAME` from `/etc/os-release`): Arch Linux
- Desktop Environment: Plasma and Cinnamon
- Kernel version (`uname -r`): 6.7.3-zen1-2-zen
## Description of Problem:
When adding filter-chains and trying to automate linking, use of `target.object` in `capture.props` to connect the input ports only works when using the object id, and doesn't resolve when using the node name.
## How Reproducible:
Consistently and easily toggle-able by editing configs.
### Steps to Reproduce:
1. Create configs in a `pipewire.conf.d` that create a node and a filter-chain
2. Set `target.object` to node's name in `capture.props` of filter-chain
3. Restart pipewire and view graph in qjackctl
4. `pw-dump` to find id of node
5. Edit `capture.props` to use node's id
6. Restart pipewire and view graph in qjackctl
### Actual Results:
Filter-chain's inputs are only connected to the target node when `target.object` is using the node's `object.id`.
### Expected Results:
Filter-chain's inputs are connected to the target node when `target.object` is using the node's `node.name`.
# Additional Info (as attachments):
Configs attached as well as two pw-dumps to reflect those two sets of config
[20-nullsinks.conf](/uploads/0e67da2799dd91dc28e291b4a3513c6d/20-nullsinks.conf)
[30-filterchains-auxapp_compressor.conf](/uploads/1bad9b42487fd6dbb4f9158ee89f16c4/30-filterchains-auxapp_compressor.conf)
[pw-dump_nodename.log](/uploads/4048c6b3202f6d1a705d9f5f0735b1dc/pw-dump_nodename.log)
[pw-dump_objectid.log](/uploads/894e8fc2bbe8b2fad3a1bb28e531e9e6/pw-dump_objectid.log)https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3839[pipewire-alsa] A big endian format is advertized on little endian machine2024-02-06T10:52:19ZWin8201Linuxreimu@hakurei.win[pipewire-alsa] A big endian format is advertized on little endian machine<!-- If you are filing this issue with a regular release please try master as it might already be fixed. -->
- PipeWire version (`pipewire --version`):
```
pipewire
Compiled with libpipewire 1.0.0
Linked with libpipewire 1.0.0
```
- Dis...<!-- If you are filing this issue with a regular release please try master as it might already be fixed. -->
- PipeWire version (`pipewire --version`):
```
pipewire
Compiled with libpipewire 1.0.0
Linked with libpipewire 1.0.0
```
- Distribution and distribution version (`PRETTY_NAME` from `/etc/os-release`):
```
PRETTY_NAME="Manjaro Linux"
```
- Desktop Environment: KDE Plasma 5.27.10
- Kernel version (`uname -r`):
```
6.6.10-1-rt19-MANJARO
```
## Description of Problem:
S24_3BE(big endian) is advertized on AMD64(little endian) machine because of [this line](https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/972e740519c95f57575eb1acea59d54c1fe78c3b#note_2268176).
## How Reproducible: Yes
### Steps to Reproduce:
1. Please reduce the volume to save your eardrums.
2. Execute `cat /dev/urandom | aplay --dump-hw-params`
### Actual Results:
```
再生中 raw データ 'stdin' : Signed 24 bit Big Endian in 3bytes, レート 8000 Hz, モノラル
HW Params of device "alsa_playback.aplay":
--------------------
ACCESS: MMAP_INTERLEAVED MMAP_NONINTERLEAVED RW_INTERLEAVED RW_NONINTERLEAVED
FORMAT: U8 S16_LE S24_LE S32_LE FLOAT_LE S24_3LE S24_3BE
SUBFORMAT: STD
SAMPLE_BITS: [8 32]
FRAME_BITS: [8 2048]
CHANNELS: [1 64]
RATE: [1 384000]
PERIOD_TIME: (0 4294967295)
PERIOD_SIZE: (0 2097152]
PERIOD_BYTES: [128 2097152]
PERIODS: [2 1024]
BUFFER_TIME: (2 4294967295]
BUFFER_SIZE: [1 4194304]
BUFFER_BYTES: [256 4194304]
TICK_TIME: ALL
--------------------
```
`S24_3BE` is advertized.
### Expected Results:
`S24_3BE` shouldn't be advertized.
# Additional Info (as attachments):
- `pw-dump > pw-dump.log`: [pw-dump.log](/uploads/a9b556ea970ca3e7f77dc1f1897bac48/pw-dump.log)https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3811pipewire doesn't build without udev and needs patching to do so2024-02-06T10:51:23Zstefan11111pipewire doesn't build without udev and needs patching to do soI wrote a few patches to get it to build, but there may be a better way to fix this issue.
```
--- a/src/modules/meson.build 2024-01-19 15:15:37.891619318 +0200
+++ b/src/modules/meson.build 2024-01-19 15:16:09.954484423 +0200
@@ -122,7...I wrote a few patches to get it to build, but there may be a better way to fix this issue.
```
--- a/src/modules/meson.build 2024-01-19 15:15:37.891619318 +0200
+++ b/src/modules/meson.build 2024-01-19 15:16:09.954484423 +0200
@@ -122,7 +122,7 @@
'module-filter-chain/convolver.c'
]
filter_chain_dependencies = [
- mathlib, dl_lib, pipewire_dep, sndfile_dep, audioconvert_dep
+ mathlib, dl_lib, pipewire_dep, sndfile_dep
]
pipewire_module_filter_chain = shared_library('pipewire-module-filter-chain',
@@ -175,7 +175,7 @@
install : true,
install_dir : modules_install_dir,
install_rpath: modules_install_dir,
- dependencies : [mathlib, dl_lib, pipewire_dep, audioconvert_dep],
+ dependencies : [mathlib, dl_lib, pipewire_dep],
)
build_module_jack_tunnel = jack_dep.found()
--- a/src/modules/meson.build 2024-01-19 15:17:44.459770986 +0200
+++ b/src/modules/meson.build 2024-01-19 15:18:22.565881171 +0200
@@ -178,7 +178,7 @@
dependencies : [mathlib, dl_lib, pipewire_dep],
)
-build_module_jack_tunnel = jack_dep.found()
+build_module_jack_tunnel = false
if build_module_jack_tunnel
pipewire_module_jack_tunnel = shared_library('pipewire-module-jack-tunnel',
[ 'module-jack-tunnel.c' ],
--- a/spa/examples/meson.build 2024-01-19 15:22:19.342423412 +0200
+++ b/spa/examples/meson.build 2024-01-19 15:22:27.952297679 +0200
@@ -12,7 +12,7 @@
spa_examples_extra_deps = {
'local-v4l2': [sdl_dep],
- 'local-libcamera': [sdl_dep, libcamera_dep],
+ 'local-libcamera': [sdl_dep],
}
foreach c : spa_examples
--- a/src/modules/module-echo-cancel.c 2024-01-19 17:41:01.734220997 +0200
+++ b/src/modules/module-echo-cancel.c 2024-01-19 17:41:40.756984463 +0200
@@ -261,8 +261,7 @@
info.info.info.raw.channels = impl->play_info.channels +
impl->rec_info.channels + impl->out_info.channels;
- impl->wav_file = wav_file_open(impl->wav_path,
- "w", &info);
+ impl->wav_file = NULL;
if (impl->wav_file == NULL)
pw_log_warn("can't open wav path '%s': %m",
impl->wav_path);
@@ -279,7 +278,6 @@
for (i = 0; i < impl->out_info.channels; i++)
data[n++] = out[i];
- wav_file_write(impl->wav_file, (void*)data, n_samples);
} else {
spa_zero(impl->wav_path);
}
--- a/src/modules/module-echo-cancel.c 2024-01-19 17:43:39.391918649 +0200
+++ b/src/modules/module-echo-cancel.c 2024-01-19 17:43:51.055081660 +0200
@@ -282,7 +282,6 @@
spa_zero(impl->wav_path);
}
} else if (impl->wav_file != NULL) {
- wav_file_close(impl->wav_file);
impl->wav_file = NULL;
}
}
```https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3838Documentation: Unclear constant 16767.f2024-02-06T10:39:30ZBen FradellaDocumentation: Unclear constant 16767.fIn [part 4 of the tutorial](https://docs.pipewire.org/page_tutorial4.html) you multiply the volume with a 16767.f constant. It seems like this is a scaling factor to map \[-1,1\] floats to signed 16-bit integers, but it isn't clear why t...In [part 4 of the tutorial](https://docs.pipewire.org/page_tutorial4.html) you multiply the volume with a 16767.f constant. It seems like this is a scaling factor to map \[-1,1\] floats to signed 16-bit integers, but it isn't clear why the specific value was chosen -- almost seems like a typo of 32767, since that's the max signed 16-bit value. Giving the constant a name and / or adding a comment would be helpful.https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3792Problem with A2DP and Handsfree mode2024-02-06T01:26:21ZReal man born on semtemberProblem with A2DP and Handsfree modeWhen i connect my Soundpeats Life to my Dell Percision 7510, running Ubuntu 22.04 with Pipewire 1.0.0 and WirePlumber installed, it couldn't detect my headset ( only speaker and easy effiects sink appear on the selection, sometimes the h...When i connect my Soundpeats Life to my Dell Percision 7510, running Ubuntu 22.04 with Pipewire 1.0.0 and WirePlumber installed, it couldn't detect my headset ( only speaker and easy effiects sink appear on the selection, sometimes the handsfree option will appear too, but not a2dp ). If I remove /var/lib/bluetooth, forget the headset and repair it, the a2dp option will appear. And I have problem with the sound quality too, there are a lot of sound skip and glitch on the Soundpeats Life, and occasionally on my Soundpeats Engine 4. Please help me. I need to use my headset regularly.
![Screenshot_from_2024-01-17_16-58-33](/uploads/ab0171f1af9e4aa51b3d5f8607445a8f/Screenshot_from_2024-01-17_16-58-33.png)
![Screenshot_from_2024-01-17_16-58-23](/uploads/bf08d9e6058c8de7ea16d7c394d67555/Screenshot_from_2024-01-17_16-58-23.png)
![Screenshot_from_2024-01-17_16-56-07](/uploads/dd8d7d417443c291913200f77418c818/Screenshot_from_2024-01-17_16-56-07.png)
![Screenshot_from_2024-01-17_16-55-57](/uploads/c92149f3bef71115f64c441241ec299f/Screenshot_from_2024-01-17_16-55-57.png)
bluetoothctl info log:
Device 28:4B:A1:CD:AD:A0 (public)
Name: SOUNDPEATS Life
Alias: SOUNDPEATS Life
Class: 0x00240404 (2360324)
Icon: audio-headset
Paired: yes
Bonded: yes
Trusted: no
Blocked: no
Connected: yes
LegacyPairing: no
UUID: Serial Port (00001101-0000-1000-8000-00805f9b34fb)
UUID: Audio Sink (0000110b-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control (0000110e-0000-1000-8000-00805f9b34fb)
UUID: Handsfree (0000111e-0000-1000-8000-00805f9b34fb)https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1542pipewire support for Apple Airplay protocol (pulseaudio module-raop-sink) ?2024-02-05T19:16:56ZAlex Bramfordpipewire support for Apple Airplay protocol (pulseaudio module-raop-sink) ?I'm looking to upgrade from Fedora 32 to Fedora 34
Does pipewire support the Apple Airplay protocol featured in pulseaudio?
Specifically, the pulseaudio **module-raop-sink** ?
My setup is: Rhythmbox --> pulseaudio (module-raop-sink) -...I'm looking to upgrade from Fedora 32 to Fedora 34
Does pipewire support the Apple Airplay protocol featured in pulseaudio?
Specifically, the pulseaudio **module-raop-sink** ?
My setup is: Rhythmbox --> pulseaudio (module-raop-sink) --> RaspberryPi (Shairport Sync AirPlay audio player)
Or is there a pipewire module that will do the same as pulseaudio (module-raop-sink?)
**References:**
- https://github.com/mikebrady/shairport-sync
- https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/#module-raop-sink
(If this not the appropriate forum, please recommend the correct place to ask this question!)https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3802Crackling sound when using A2DP with aptX-LL2024-02-05T18:10:05ZZsolt DoncaCrackling sound when using A2DP with aptX-LL<!-- If you are filing this issue with a regular release please try master as it might already be fixed. -->
<!-- If you can, test also with Pulseaudio and list `pulseaudio --version`. -->
- PipeWire version (`pipewire --version`): Com...<!-- If you are filing this issue with a regular release please try master as it might already be fixed. -->
<!-- If you can, test also with Pulseaudio and list `pulseaudio --version`. -->
- PipeWire version (`pipewire --version`): Compiled with libpipewire 1.0.1, Linked with libpipewire 1.0.1
- Distribution and distribution version (`PRETTY_NAME` from `/etc/os-release`): Arch Linux
- Desktop Environment: KDE Plasma 5.27
- Kernel version (`uname -r`): 6.6.13-1-lts
- BlueZ version (`bluetoothctl --version`): bluetoothctl: 5.72
- `lsusb`:
```
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 0c45:6a15 Microdia Integrated_Webcam_HD
Bus 003 Device 003: ID 27c6:63ac Shenzhen Goodix Technology Co.,Ltd. Goodix USB2.0 MISC
Bus 003 Device 004: ID 8087:0033 Intel Corp. AX211 Bluetooth
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 002: ID 3297:1969 ZSA Technology Labs Moonlander Mark I
Bus 005 Device 003: ID 0bda:5487 Realtek Semiconductor Corp. Dell dock
Bus 005 Device 004: ID 0bda:5413 Realtek Semiconductor Corp. Dell dock
Bus 005 Device 005: ID 413c:b06e Dell Computer Corp. Dell dock
Bus 005 Device 006: ID 413c:b06f Dell Computer Corp. Dell dock
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 006 Device 002: ID 0bda:0487 Realtek Semiconductor Corp. Dell dock
Bus 006 Device 003: ID 0bda:0413 Realtek Semiconductor Corp. Dell dock
Bus 006 Device 004: ID 0bda:8153 Realtek Semiconductor Corp. RTL8153 Gigabit Ethernet Adapter
```
- Bluetooth devices:
```
# paste the output of "bluetoothctl devices" here
Device F4:B6:88:5B:61:B3 PLT Focus
Device F8:5C:7E:29:51:CD Zsolt's JBL Flip 6
Device E4:B1:5C:FA:3C:68 MX Vertical
Device C3:12:31:3D:65:0F MX Master
Device 28:11:A5:79:0F:CA Bose QC35 II
```
## Description of Problem:
Whenever I connect my PLT Focus headsets using the aptX-LL codec, the sound is full of "crackling", and literally unusable. Other codecs such as aptX, SBC, or SBC-XQ are fine. I would like to be able to use aptX-LL to benefit from the low latency in games.
## How Reproducible:
Just choose the aptX-LL codec, and play some music or play some games.
### Steps to Reproduce:
1. Connect the PLT Focus headset
2. Choose aptX-LL as the codec
3. Play music
### Actual Results:
Most of the time, the sound is almost completely crackling, the music is barely there. Sometimes there may be a second or two of (almost perfect) clarity, but it quickly fades away.
### Expected Results:
The sound should sound the same as with other codecs.
# Additional Info (as attachments):
Can provide additional info as requested.
EDIT: see my comments below.https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3108A2DP Opus codec compatibility with Android2024-02-05T08:58:13ZTeoh Han HuiA2DP Opus codec compatibility with Android!1322 added a PipeWire-specific A2DP Opus codec. However, Android has added support for A2DP Opus codec as well after that, with their own vendor ID.
Would it be feasible to make them compatible? Would that mean PipeWire using Google's ...!1322 added a PipeWire-specific A2DP Opus codec. However, Android has added support for A2DP Opus codec as well after that, with their own vendor ID.
Would it be feasible to make them compatible? Would that mean PipeWire using Google's source codec format to support these (still hypothetical) audio sinks?
Reports:
* https://www.reddit.com/r/GooglePixel/comments/zeurji/two_new_audio_codecs_lc3_and_opus_pixel_6/
* https://twitter.com/mishaalrahman/status/1577362681576701957
See:
* https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig#SOURCE_CODEC_TYPE_OPUS
* https://cs.android.com/android/platform/superproject/+/ec01d72dcd240f1cda67b53855a09fd46104a7d6:packages/modules/Bluetooth/system/stack/include/a2dp_vendor_opus_constants.h;l=32-35https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3816LC3: Bluetooth disconnects when trying to play audio, with Mediatek adapter2024-02-04T21:18:33ZSuhridSLC3: Bluetooth disconnects when trying to play audio, with Mediatek adapter<!-- If you are filing this issue with a regular release please try master as it might already be fixed. -->
<!-- If you can, test also with Pulseaudio and list `pulseaudio --version`. -->
- PipeWire version (1.1.0 [a59a5512027c31442c9...<!-- If you are filing this issue with a regular release please try master as it might already be fixed. -->
<!-- If you can, test also with Pulseaudio and list `pulseaudio --version`. -->
- PipeWire version (1.1.0 [a59a5512027c31442c9b128e45bfac267258cbd5]):
- Wireplumber version (0.4.81 [95ae88d3e7565fae590fcc9eb2e0878868fb4e86]):
- Distribution and distribution version (Rity Demo Layer 23.1-release (kirkstone)):
- Desktop Environment:
- Kernel version (5.15.42-mtk+modified):
- BlueZ version (bluetoothctl: 5.72):
- `lsusb`:
```
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 13d3:3564 IMC Networks Wireless_Device
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 0451:8025 Texas Instruments, Inc.
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 0451:8027 Texas Instruments, Inc.
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
```
- Bluetooth devices:
```
Device DC:69:E2:4C:5D:BC Galaxy Buds2 Pro
```
## Description of Problem:
1) Unable to play audio when le audio is enabled.
2) Unable to modify node settings using wpctl set-volume for example when using le mode.
2) Earbuds disconnect when trying to play audio.
## System Information:
The Bluetooth stack has been backported from kernel 6.1 and commit 2394186a2cefb9a45a029281a55749804dd8c556 has been cherry-picked.
## How Reproducible:
Always
### Steps to Reproduce:
1. Restart wireplumber as root:
```
root@genio-700-evk:~# systemctl stop --user wireplumber
root@genio-700-evk:~# wireplumber&
[1] 1141
root@genio-700-evk:~# E 23:01:51.594738 default ../git/spa/plugins/bluez5/upower.c:54:upower_get_percentage_properties_reply: Failed to get percentage from UPower: org.freedesktop.DBus.Error.NameHasNoOwner
W 23:01:51.617050 spa.bluez5 ../git/spa/plugins/bluez5/bluez5-dbus.c:5135:switch_backend: ofono running, but not configured as HFP/HSP backend: it may interfere with HFP/HSP functionality.
E 23:01:51.617949 spa.bluez5.native ../git/spa/plugins/bluez5/backend-native.c:1907:sco_listen: listen(): Address already in use
W 23:01:51.619578 spa.bluez5 ../git/spa/plugins/bluez5/bluez5-dbus.c:5135:switch_backend: ofono running, but not configured as HFP/HSP backend: it may interfere with HFP/HSP functionality.
E 23:01:51.639101 spa.bluez5.native ../git/spa/plugins/bluez5/backend-native.c:2472:register_profile_reply: RegisterProfile() failed: org.bluez.Error.NotPermitted
E 23:01:51.674179 spa.bluez5 ../git/spa/plugins/bluez5/bluez5-dbus.c:4923:bluez_register_application_a2dp_reply: RegisterApplication() failed: org.bluez.Error.Failed
W 23:01:51.674220 spa.bluez5 ../git/spa/plugins/bluez5/bluez5-dbus.c:4672:adapter_register_endpoints_legacy: Using legacy bluez5 API for A2DP - only SBC will be supported. Please upgrade bluez5.
E 23:01:51.709488 spa.bluez5 ../git/spa/plugins/bluez5/bluez5-dbus.c:4575:bluez_register_endpoint_legacy_reply: RegisterEndpoint() failed: org.bluez.Error.InvalidArguments
E 23:01:51.709816 spa.bluez5 ../git/spa/plugins/bluez5/bluez5-dbus.c:4575:bluez_register_endpoint_legacy_reply: RegisterEndpoint() failed: org.bluez.Error.InvalidArguments
[0:14:02.371862463] [1141] WARN IPAManager ipa_manager.cpp:154 No IPA found in '/usr/lib/libcamera'
[0:14:02.371930770] [1141] INFO Camera camera_manager.cpp:284 libcamera v0.2.0+dirty (2024-01-25T19:23:19+00:00)
```
2. Set up Le audio + LC3 support:
In /etc/bluetooth/main.conf, set `ControllerMode = le`, `Experimental=true`, `KernelExperimental=true`
3. Confirm LE audio is supported:
```
root@genio-700-evk:~# btmgmt info
Index list with 1 item
hci0: Primary controller
addr E8:FB:1C:BD:31:D2 version 11 manufacturer 70 class 0x001f00
supported settings: powered connectable fast-connectable discoverable bondable link-security ssp br/edr le advertising secure-conn debug-keys privacy configuration static-addr phy-configuration wide-band-speech cis-central cis-peripheral
current settings: powered le secure-conn cis-central cis-peripheral
name genio-700-evk
short name
hci0: Configuration options
supported options: public-address
missing options:
```
```
root@genio-700-evk:~# bluetoothctl show
Controller E8:FB:1C:BD:31:D2 (public)
Manufacturer: 0x0046 (70)
Version: 0x0b (11)
Name: genio-700-evk
Alias: genio-700-evk
Class: 0x00001f00 (7936)
Powered: yes
PowerState: on
Discoverable: no
DiscoverableTimeout: 0x000000b4 (180)
Pairable: no
UUID: Published Audio Capabil.. (00001850-0000-1000-8000-00805f9b34fb)
UUID: Audio Stream Control (0000184e-0000-1000-8000-00805f9b34fb)
UUID: Broadcast Audio Scan (0000184f-0000-1000-8000-00805f9b34fb)
UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb)
UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
UUID: Volume Control (00001844-0000-1000-8000-00805f9b34fb)
UUID: Audio Input Control (00001843-0000-1000-8000-00805f9b34fb)
UUID: Microphone Control (0000184d-0000-1000-8000-00805f9b34fb)
UUID: Volume Offset Control (00001845-0000-1000-8000-00805f9b34fb)
UUID: Device Information (0000180a-0000-1000-8000-00805f9b34fb)
UUID: Vendor specific (03b80e5a-ede8-4b33-a751-6ce34ec4c700)
Modalias: usb:v1D6Bp0246d0548
Discovering: no
Roles: central
Roles: peripheral
Roles: central-peripheral
ExperimentalFeatures: BlueZ Experimental Simu.. (671b10b5-42c0-4696-9227-eb28d1b049d6)
ExperimentalFeatures: BlueZ Experimental LL p.. (15c0a148-c273-11ea-b3de-0242ac130004)
ExperimentalFeatures: BlueZ Experimental ISO... (6fbaf188-05e0-496a-9885-d6ddfdb4e03e)
Advertising Features:
ActiveInstances: 0x00 (0)
SupportedInstances: 0x14 (20)
SupportedIncludes: tx-power
SupportedIncludes: appearance
SupportedIncludes: local-name
SupportedSecondaryChannels: 1M
SupportedSecondaryChannels: 2M
SupportedSecondaryChannels: Coded
SupportedCapabilities.MinTxPower: 0xfffffff2 (-14)
SupportedCapabilities.MaxTxPower: 0x000d (13)
SupportedCapabilities.MaxAdvLen: 0x1f (31)
SupportedCapabilities.MaxScnRspLen: 0x1f (31)
SupportedFeatures: CanSetTxPower
SupportedFeatures: HardwareOffload
Advertisement Monitor Features:
SupportedMonitorTypes: or_patterns
```
4. Connect to earbuds:
```
root@genio-700-evk:~# bluetoothctl
hci0 new_settings: powered bondable le secure-conn cis-central cis-peripheral
Agent registered
[CHG] Controller E8:FB:1C:BD:31:D2 Pairable: yes
AdvertisementMonitor path registered
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# pair DC:69:E2:4C:5D:BC
Attempting to pair with DC:69:E2:4C:5D:BC
hci0 DC:69:E2:4C:5D:BC type LE Public connected eir_len 0
[CHG] Device DC:69:E2:4C:5D:BC Connected: yes
[CHG] Device DC:69:E2:4C:5D:BC Bonded: yes
[CHG] Device DC:69:E2:4C:5D:BC UUIDs: 00001800-0000-1000-8000-00805f9b34fb
[CHG] Device DC:69:E2:4C:5D:BC UUIDs: 00001801-0000-1000-8000-00805f9b34fb
[CHG] Device DC:69:E2:4C:5D:BC UUIDs: 0000180a-0000-1000-8000-00805f9b34fb
[CHG] Device DC:69:E2:4C:5D:BC UUIDs: 0000180f-0000-1000-8000-00805f9b34fb
[CHG] Device DC:69:E2:4C:5D:BC UUIDs: 00001844-0000-1000-8000-00805f9b34fb
[CHG] Device DC:69:E2:4C:5D:BC UUIDs: 00001846-0000-1000-8000-00805f9b34fb
[CHG] Device DC:69:E2:4C:5D:BC UUIDs: 0000184d-0000-1000-8000-00805f9b34fb
[CHG] Device DC:69:E2:4C:5D:BC UUIDs: 0000184e-0000-1000-8000-00805f9b34fb
[CHG] Device DC:69:E2:4C:5D:BC UUIDs: 0000184f-0000-1000-8000-00805f9b34fb
[CHG] Device DC:69:E2:4C:5D:BC UUIDs: 00001850-0000-1000-8000-00805f9b34fb
[CHG] Device DC:69:E2:4C:5D:BC UUIDs: 00001853-0000-1000-8000-00805f9b34fb
[CHG] Device DC:69:E2:4C:5D:BC UUIDs: 00001855-0000-1000-8000-00805f9b34fb
[CHG] Device DC:69:E2:4C:5D:BC UUIDs: 00002b51-0000-1000-8000-00805f9b34fb
[CHG] Device DC:69:E2:4C:5D:BC UUIDs: 00008fe1-0000-1000-8000-00805f9b34fb
[CHG] Device DC:69:E2:4C:5D:BC UUIDs: a7a473e9-19c6-491b-aea6-7ea92b8f043a
[CHG] Device DC:69:E2:4C:5D:BC ServicesResolved: yes
[CHG] Device DC:69:E2:4C:5D:BC Paired: yes
[NEW] Primary Service (Handle 0x0000)
/org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/service000c
00001801-0000-1000-8000-00805f9b34fb
Generic Attribute Profile
[NEW] Characteristic (Handle 0x0000)
/org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/service000c/char000d
00002a05-0000-1000-8000-00805f9b34fb
Service Changed
[NEW] Descriptor (Handle 0x0000)
/org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/service000c/char000d/desc000f
00002902-0000-1000-8000-00805f9b34fb
Client Characteristic Configuration
[NEW] Characteristic (Handle 0x0000)
/org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/service000c/char0010
00002b29-0000-1000-8000-00805f9b34fb
Client Supported Features
[NEW] Characteristic (Handle 0x0000)
/org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/service000c/char0012
00002b2a-0000-1000-8000-00805f9b34fb
Database Hash
[NEW] Characteristic (Handle 0x0000)
/org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/service000c/char0014
00002b3a-0000-1000-8000-00805f9b34fb
Server Supported Features
[NEW] Primary Service (Handle 0x0000)
/org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/service0016
0000180a-0000-1000-8000-00805f9b34fb
Device Information
[NEW] Characteristic (Handle 0x0000)
/org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/service0016/char0017
00002a29-0000-1000-8000-00805f9b34fb
Manufacturer Name String
[NEW] Characteristic (Handle 0x0000)
/org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/service0016/char0019
00002a24-0000-1000-8000-00805f9b34fb
Model Number String
[NEW] Characteristic (Handle 0x0000)
/org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/service0016/char001b
00002a25-0000-1000-8000-00805f9b34fb
Serial Number String
[NEW] Characteristic (Handle 0x0000)
/org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/service0016/char001d
00002a27-0000-1000-8000-00805f9b34fb
Hardware Revision String
[NEW] Characteristic (Handle 0x0000)
/org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/service0016/char001f
00002a26-0000-1000-8000-00805f9b34fb
Firmware Revision String
[NEW] Characteristic (Handle 0x0000)
/org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/service0016/char0021
00002a28-0000-1000-8000-00805f9b34fb
Software Revision String
[NEW] Characteristic (Handle 0x0000)
/org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/service0016/char0023
00002a23-0000-1000-8000-00805f9b34fb
System ID
[NEW] Characteristic (Handle 0x0000)
/org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/service0016/char0025
00002a2a-0000-1000-8000-00805f9b34fb
IEEE 11073-20601 Regulatory Cert. Data List
[NEW] Characteristic (Handle 0x0000)
/org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/service0016/char0027
00002a50-0000-1000-8000-00805f9b34fb
PnP ID
[NEW] Primary Service (Handle 0x0000)
/org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/service0029
0000180f-0000-1000-8000-00805f9b34fb
Battery Service
[NEW] Characteristic (Handle 0x0000)
/org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/service0029/char002a
00002a19-0000-1000-8000-00805f9b34fb
Battery Level
[NEW] Descriptor (Handle 0x0000)
/org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/service0029/char002a/desc002c
00002902-0000-1000-8000-00805f9b34fb
Client Characteristic Configuration
[NEW] Descriptor (Handle 0x0000)
/org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/service0029/char002a/desc002d
00002904-0000-1000-8000-00805f9b34fb
Characteristic Format
[NEW] Primary Service (Handle 0x0000)
/org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/service002e
0000180f-0000-1000-8000-00805f9b34fb
Battery Service
[NEW] Characteristic (Handle 0x0000)
/org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/service002e/char002f
00002a19-0000-1000-8000-00805f9b34fb
Battery Level
[NEW] Descriptor (Handle 0x0000)
/org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/service002e/char002f/desc0031
00002902-0000-1000-8000-00805f9b34fb
Client Characteristic Configuration
[NEW] Descriptor (Handle 0x0000)
/org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/service002e/char002f/desc0032
00002904-0000-1000-8000-00805f9b34fb
Characteristic Format
[NEW] Primary Service (Handle 0x0000)
/org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/service0033
a7a473e9-19c6-491b-aea6-7ea92b8f043a
Vendor specific
[NEW] Characteristic (Handle 0x0000)
/org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/service0033/char0034
a7a48322-19c6-491b-aea6-7ea92b8f043a
Vendor specific
[NEW] Descriptor (Handle 0x0000)
/org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/service0033/char0034/desc0036
00002902-0000-1000-8000-00805f9b34fb
Client Characteristic Configuration
[NEW] Descriptor (Handle 0x0000)
/org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/service0033/char0034/desc0037
00002901-0000-1000-8000-00805f9b34fb
Characteristic User Description
[NEW] Characteristic (Handle 0x0000)
/org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/service0033/char0038
a7a48311-19c6-491b-aea6-7ea92b8f043a
Vendor specific
[NEW] Descriptor (Handle 0x0000)
/org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/service0033/char0038/desc003a
00002901-0000-1000-8000-00805f9b34fb
Characteristic User Description
[NEW] Primary Service (Handle 0x0000)
/org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/service007a
00001855-0000-1000-8000-00805f9b34fb
Telephony and Media Audio
[NEW] Characteristic (Handle 0x0000)
/org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/service007a/char007b
00002b51-0000-1000-8000-00805f9b34fb
Telephony and Media Audio Profile Role
[NEW] Primary Service (Handle 0x0000)
/org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/service007d
00008fe1-0000-1000-8000-00805f9b34fb
Unknown
[NEW] Characteristic (Handle 0x0000)
/org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/service007d/char007e
00008fca-0000-1000-8000-00805f9b34fb
Unknown
[NEW] Characteristic (Handle 0x0000)
/org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/service007d/char0080
00008fcb-0000-1000-8000-00805f9b34fb
Unknown
[NEW] Descriptor (Handle 0x0000)
/org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/service007d/char0080/desc0082
00002902-0000-1000-8000-00805f9b34fb
Client Characteristic Configuration
[NEW] Characteristic (Handle 0x0000)
/org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/service007d/char0083
00008fcc-0000-1000-8000-00805f9b34fb
Unknown
[NEW] Primary Service (Handle 0x0000)
/org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/service0085
00001853-0000-1000-8000-00805f9b34fb
Common Audio
Pairing successful#
[CHG] Device DC:69:E2:4C:5D:BC Modalias: bluetooth:v0075pA013d0100
[NEW] Endpoint /org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/pac_source0
[NEW] Endpoint /org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/pac_sink0
[NEW] Transport /org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/pac_source0/fd0
[NEW] Transport /org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/pac_sink0/fd1
[CHG] Transport /org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/pac_source0/fd0 Links: /org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/pac_sink0/fd1
[CHG] Transport /org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/pac_sink0/fd1 Links: /org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/pac_source0/fd0
[Galaxy Buds2 Pro]# trust DC:69:E2:4C:5D:BC
[CHG] Device DC:69:E2:4C:5D:BC Trusted: yes
Changing DC:69:E2:4C:5D:BC trust succeeded
[Galaxy Buds2 Pro]# connect DC:69:E2:4C:5D:BC
Attempting to connect to DC:69:E2:4C:5D:BC
Connection successful
```
5. Confirm earbuds is connected and supports LE audio:
```
root@genio-700-evk:~# bluetoothctl info
Device DC:69:E2:4C:5D:BC (public)
Name: Galaxy Buds2 Pro
Alias: Galaxy Buds2 Pro
Appearance: 0x0941 (2369)
Paired: yes
Bonded: yes
Trusted: no
Blocked: no
Connected: yes
LegacyPairing: no
UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb)
UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
UUID: Device Information (0000180a-0000-1000-8000-00805f9b34fb)
UUID: Battery Service (0000180f-0000-1000-8000-00805f9b34fb)
UUID: Volume Control (00001844-0000-1000-8000-00805f9b34fb)
UUID: Coordinated Set Identif.. (00001846-0000-1000-8000-00805f9b34fb)
UUID: Microphone Control (0000184d-0000-1000-8000-00805f9b34fb)
UUID: Audio Stream Control (0000184e-0000-1000-8000-00805f9b34fb)
UUID: Broadcast Audio Scan (0000184f-0000-1000-8000-00805f9b34fb)
UUID: Published Audio Capabil.. (00001850-0000-1000-8000-00805f9b34fb)
UUID: Common Audio (00001853-0000-1000-8000-00805f9b34fb)
UUID: Telephony and Media Audio (00001855-0000-1000-8000-00805f9b34fb)
UUID: Telephony and Media Aud.. (00002b51-0000-1000-8000-00805f9b34fb)
UUID: Unknown (00008fe1-0000-1000-8000-00805f9b34fb)
UUID: Vendor specific (a7a473e9-19c6-491b-aea6-7ea92b8f043a)
Modalias: bluetooth:v0075pA013d0100
ServiceData.00002b51-0000-1000-8000-00805f9b34fb:
2a 00 *.
ServiceData.00001853-0000-1000-8000-00805f9b34fb:
00 .
ServiceData.0000184e-0000-1000-8000-00805f9b34fb:
00 6f 00 6b 00 00 .o.k..
ServiceData.a7a473e9-19c6-491b-aea6-7ea92b8f043a:
01 48 bc 5d 08 .H.].
AdvertisingFlags:
19 .
AdvertisingData.Key: 0x2e (46)
AdvertisingData.Value:
a5 2f 56 3b 0e 4c ./V;.L
Battery Percentage: 0x64 (100)
```
```
root@genio-700-evk:~# cat /var/log/syslog | grep BAP
Jan 26 23:16:21 genio-700-evk bluetoothd[363]: ../bluez-5.72/profiles/audio/media.c:proxy_added_cb() Proxy added: /MediaEndpointLE/BAPSink/lc3, iface: org.bluez.MediaEndpoint1
Jan 26 23:16:21 genio-700-evk bluetoothd[363]: ../bluez-5.72/profiles/audio/media.c:endpoint_init_pac() PAC :1.27:/MediaEndpointLE/BAPSink/lc3 registered
Jan 26 23:16:21 genio-700-evk bluetoothd[363]: Endpoint registered: sender=:1.27 path=/MediaEndpointLE/BAPSink/lc3
Jan 26 23:16:21 genio-700-evk bluetoothd[363]: ../bluez-5.72/profiles/audio/media.c:proxy_added_cb() Proxy added: /MediaEndpointLE/BAPSource/lc3, iface: org.bluez.MediaEndpoint1
Jan 26 23:16:21 genio-700-evk bluetoothd[363]: ../bluez-5.72/profiles/audio/media.c:endpoint_init_pac() PAC :1.27:/MediaEndpointLE/BAPSource/lc3 registered
Jan 26 23:16:21 genio-700-evk bluetoothd[363]: Endpoint registered: sender=:1.27 path=/MediaEndpointLE/BAPSource/lc3
Jan 26 23:17:09 genio-700-evk bluetoothd[363]: ../bluez-5.72/profiles/audio/media.c:media_endpoint_async_call() Calling SelectProperties: name = :1.27 path = /MediaEndpointLE/BAPSink/lc3
Jan 26 23:17:09 genio-700-evk bluetoothd[363]: ../bluez-5.72/profiles/audio/media.c:media_endpoint_async_call() Calling SelectProperties: name = :1.27 path = /MediaEndpointLE/BAPSource/lc3
Jan 26 23:17:09 genio-700-evk bluetoothd[363]: ../bluez-5.72/profiles/audio/media.c:media_endpoint_async_call() Calling SetConfiguration: name = :1.27 path = /MediaEndpointLE/BAPSink/lc3
Jan 26 23:17:09 genio-700-evk bluetoothd[363]: ../bluez-5.72/profiles/audio/media.c:media_endpoint_async_call() Calling SetConfiguration: name = :1.27 path = /MediaEndpointLE/BAPSource/lc3
```
6. Confirm pipewire supports lc3:
```
root@genio-700-evk:~# find / -name *"lc3.so"
/usr/lib/spa-0.2/bluez5/libspa-codec-bluez5-lc3.so
```
7. Wireplumber status:
```
root@genio-700-evk:~# wpctl status
PipeWire 'pipewire-0' [1.1.0, pipewire@genio-700-evk, cookie:1956338278]
└─ Clients:
30. WirePlumber [1.1.0, root@genio-700-evk, pid:1066]
36. WirePlumber [export] [1.1.0, root@genio-700-evk, pid:1066]
42. wpctl [1.1.0, root@genio-700-evk, pid:1459]
Audio
├─ Devices:
│ 37. Built-in Audio [alsa]
│ 48. Galaxy Buds2 Pro [bluez5]
│
├─ Sinks:
│ * 46. Galaxy Buds2 Pro [vol: 1.00]
│ 53. Built-in Audio Stereo [vol: 0.40]
│
├─ Sources:
│ * 47. Galaxy Buds2 Pro [vol: 1.00]
│
└─ Streams:
Video
├─ Devices:
│ 54. MediaTek MDP3 [v4l2]
│ 55. platform:mt8188 [v4l2]
│ 56. platform:mt8188 [v4l2]
│ 57. mtk-jpeg-enc [v4l2]
│ 58. mtk-jpeg-dec [v4l2]
│
├─ Sinks:
│
├─ Sources:
│
└─ Streams:
Settings
└─ Default Configured Node Names:
```
```
root@genio-700-evk:~# wpctl inspect 46
id 46, type PipeWire:Interface:Node
api.bluez5.address = "DC:69:E2:4C:5D:BC"
api.bluez5.codec = "lc3"
api.bluez5.profile = "bap-sink"
api.bluez5.transport = ""
audio.adapt.follower = ""
bluez5.loopback = "false"
card.profile.device = "1"
* client.id = "36"
clock.quantum-limit = "8192"
device.api = "bluez5"
* device.id = "48"
device.routes = "1"
* factory.id = "11"
factory.mode = "merge"
factory.name = "api.bluez5.media.sink"
library.name = "audioconvert/libspa-audioconvert"
* media.class = "Audio/Sink"
media.name = "Galaxy Buds2 Pro"
node.autoconnect = "true"
* node.description = "Galaxy Buds2 Pro"
node.driver = "true"
node.group = "bluez-iso-E8:FB:1C:BD:31:D2-cig-0"
* node.name = "bluez_output.DC_69_E2_4C_5D_BC.1"
node.pause-on-idle = "false"
* object.serial = "71"
* priority.driver = "1010"
* priority.session = "1010"
```
8. Modify volume:
```
root@genio-700-evk:~# wpctl set-volume 46 0.6
root@genio-700-evk:~# wpctl status
PipeWire 'pipewire-0' [1.1.0, pipewire@genio-700-evk, cookie:1956338278]
└─ Clients:
30. WirePlumber [1.1.0, root@genio-700-evk, pid:1066]
36. WirePlumber [export] [1.1.0, root@genio-700-evk, pid:1066]
42. wpctl [1.1.0, root@genio-700-evk, pid:1475]
Audio
├─ Devices:
│ 37. Built-in Audio [alsa]
│ 48. Galaxy Buds2 Pro [bluez5]
│
├─ Sinks:
│ * 46. Galaxy Buds2 Pro [vol: 1.00]
│ 53. Built-in Audio Stereo [vol: 0.40]
│
├─ Sources:
│ * 47. Galaxy Buds2 Pro [vol: 1.00]
│
└─ Streams:
Video
├─ Devices:
│ 54. MediaTek MDP3 [v4l2]
│ 55. platform:mt8188 [v4l2]
│ 56. platform:mt8188 [v4l2]
│ 57. mtk-jpeg-enc [v4l2]
│ 58. mtk-jpeg-dec [v4l2]
│
├─ Sinks:
│
├─ Sources:
│
└─ Streams:
Settings
└─ Default Configured Node Names:
```
9. Try to play audio:
```
root@genio-700-evk:~# pw-play /usr/share/sounds/alsa/Front_Right.wav
E 23:32:08.501066 spa.bluez5 ../git/spa/plugins/bluez5/bluez5-dbus.c:3557:transport_acquire_reply: Acquire /org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/pac_source0/fd0 returned error: org.freedesktop.DBus.Error.NoReply
E 23:32:08.501580 pw.node ../git/src/pipewire/impl-node.c:409:node_update_state: (bluez_input.DC_69_E2_4C_5D_BC.0-47) suspended -> error (Received error event)
E 23:32:08.501707 spa.bluez5 ../git/spa/plugins/bluez5/bluez5-dbus.c:2826:spa_bt_transport_set_state: Failure in Bluetooth audio transport /org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/pac_source0/fd0
E 23:32:08.502102 pw.node ../git/src/pipewire/impl-node.c:409:node_update_state: (bluez_output.DC_69_E2_4C_5D_BC.1-46) suspended -> error (Received error event)
E 23:32:08.502174 spa.bluez5 ../git/spa/plugins/bluez5/bluez5-dbus.c:2826:spa_bt_transport_set_state: Failure in Bluetooth audio transport /org/bluez/hci0/dev_DC_69_E2_4C_5D_BC/pac_sink0/fd1
```
### Actual Results:
Apart from the above logs, I also see the following logs from kernel dmesg when I try to play audio:
```
[ 161.167394] hci0 chan 00000000fc8bdab0 flags 0x0000
[ 161.168050] hci0 nonfrag skb 00000000dc8b7cf5 len 25
[ 161.168830] hci0 acl 6 sco 8 le 32 iso 24
[ 161.169357] hci0
[ 161.169596] hci0
[ 161.169836] hci0
[ 161.170077] conn 0000000000000000 quote 0
[ 161.170668] hci0
[ 161.170910] hci0
[ 161.171150] hci0
[ 161.171391] chan 00000000fc8bdab0 quote 32
[ 161.171917] chan 00000000fc8bdab0 skb 00000000dc8b7cf5 len 25 priority 0
[ 161.172770] hci0 type 2 len 25
[ 161.173200] hci0
[ 161.173441] hci0
[ 161.173679] hci0
[ 161.173919] hci0
[ 161.201522] hci0
[ 161.201782] hci0 Event packet
[ 161.202193] hci0 acl 6 sco 8 le 32 iso 24
[ 161.202738] hci0
[ 161.202974] hci0
[ 161.203210] hci0
[ 161.203447] conn 0000000000000000 quote 0
[ 161.203955] hci0
[ 161.204190] hci0
[ 161.204426] hci0
[ 161.261187] hci0
[ 161.261503] hci0 ACL data packet
[ 161.261927] hci0 len 15 handle 0x0200 flags 0x0002
[ 161.262729] hci0 ACL data packet
[ 161.263156] hci0 len 16 handle 0x0200 flags 0x0002
[ 161.263816] hci0 ACL data packet
[ 161.264239] hci0 len 16 handle 0x0200 flags 0x0002
[ 161.264882] hci0 opcode 0x2064 plen 5
[ 161.265459] hci0
[ 161.265714] hci0 cmd_cnt 1 cmd queued 1
[ 161.266224] hci0 type 1 len 8
[ 161.267065] hci0
[ 161.267336] hci0 Event packet
[ 161.267747] opcode 0x2064 status 0x00
[ 161.268229] hci0 opcode 0x2064
[ 161.502447] hci0
[ 161.502723] hci0 Event packet
[ 161.503230] hci0 opcode 0x206e plen 13
[ 161.503723] hci0 opcode 0x206e plen 13
[ 161.504205] hci0 cmd_cnt 1 cmd queued 2
[ 161.504694] hci0 type 1 len 16
[ 161.505338] hci0
[ 161.505587] hci0 Event packet
[ 161.505975] hci0 opcode 0x206e
[ 161.506367] opcode 0x206e status 0x00
[ 161.506893] hci0 opcode 0x206e
[ 161.507313] hci0 cmd_cnt 1 cmd queued 1
[ 161.507807] hci0 type 1 len 16
[ 161.509235] hci0
[ 161.509487] hci0 Event packet
[ 161.509875] hci0 opcode 0x206e
[ 161.510301] opcode 0x206e status 0x00
[ 161.510790] hci0 opcode 0x206e
[ 161.521241] hci0 chan 00000000fc8bdab0 flags 0x0000
[ 161.521889] hci0 nonfrag skb 00000000489711c6 len 15
[ 161.522660] hci0 acl 6 sco 8 le 32 iso 24
[ 161.523180] hci0
[ 161.523417] hci0
[ 161.523653] hci0
[ 161.523891] conn 0000000000000000 quote 0
[ 161.524401] hci0
[ 161.524636] hci0
[ 161.524873] hci0
[ 161.525109] chan 00000000fc8bdab0 quote 32
[ 161.525630] chan 00000000fc8bdab0 skb 00000000489711c6 len 15 priority 0
[ 161.526477] hci0 type 2 len 15
[ 161.526911] hci0
[ 161.527149] hci0
[ 161.527385] hci0
[ 161.527622] hci0
[ 161.577701] hci0
[ 161.577983] hci0 ACL data packet
[ 161.578403] hci0 len 129 handle 0x0c6f flags 0x000f
[ 161.579138] Bluetooth: hci0: ACL packet for unknown connection handle 3183
[ 161.636659] hci0
[ 161.636917] hci0 ACL data packet
[ 161.637326] hci0 len 39 handle 0x0c6f flags 0x000f
[ 161.637938] Bluetooth: hci0: ACL packet for unknown connection handle 3183
[ 161.638931] hci0 ACL data packet
```
### Expected Results:
Expect the audio to play correctly.
### Additional logs:
1. [pw-dump.log](/uploads/7b2d0a1160a3dc8b063b6aafe844fd33/pw-dump.log)https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3270Pipewire Eingabe-/Ausgabefehler2024-02-04T10:56:03ZAndrePipewire Eingabe-/AusgabefehlerI get the following error message when I start a game or player
`pipewire.service - PipeWire Multimedia Service<br>
Loaded: loaded (/usr/lib/systemd/user/pipewire.service; disabled; preset:
enabled)<br>
Active: active (runnin...I get the following error message when I start a game or player
`pipewire.service - PipeWire Multimedia Service<br>
Loaded: loaded (/usr/lib/systemd/user/pipewire.service; disabled; preset:
enabled)<br>
Active: active (running) since Sun 2023-06-04 09:47:49 CEST; 6h ago<br>
TriggeredBy: ● pipewire.socket<br>
Main PID: 882 (pipewire)<br>
Tasks: 2 (limit: 38406)<br>
Memory: 15.6M<br>
CPU: 2min 40.013s<br>
CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/pipewire.service<br>
└─882 /usr/bin/pipewire<br><br>
Jun 04 09:47:49 I-NET systemd[749]: Started PipeWire Multimedia Service.<br>
Jun 04 11:03:49 I-NET pipewire[882]: pw.link: 0x55756b2f5b00: port 0x55756b2f12f0 can't set io:1 (Spa:Enum:IO:Buffers): Eingabe-/Ausgabefehler<br>
Jun 04 12:24:23 I-NET pipewire[882]: pw.link: 0x55756b5dbce0: port 0x55756b2adb60 can't set io:1 (Spa:Enum:IO:Buffers): Eingabe-/Ausgabefehler<br>
Jun 04 13:11:44 I-NET pipewire[882]: pw.link: 0x55756b2d88d0: port 0x55756b43db90 can't set io:1 (Spa:Enum:IO:Buffers): Eingabe-/Ausgabefehler<br>
Jun 04 13:12:28 I-NET pipewire[882]: pw.link: 0x55756b2fc9f0: port 0x55756b2adb60 can't set io:1 (Spa:Enum:IO:Buffers): Eingabe-/Ausgabefehler<br>
Jun 04 14:12:11 I-NET pipewire[882]: pw.link: 0x55756b582670: port 0x55756b2f7020 can't set io:1 (Spa:Enum:IO:Buffers): Eingabe-/Ausgabefehler<br>
Jun 04 14:12:46 I-NET pipewire[882]: pw.link: 0x55756b5dda00: port 0x55756b5c14e0 can't set io:1 (Spa:Enum:IO:Buffers): Eingabe-/Ausgabefehler<br>
Jun 04 14:13:11 I-NET pipewire[882]: pw.link: 0x55756b5d2f90: port 0x55756b5c21d0 can't set io:1 (Spa:Enum:IO:Buffers): Eingabe-/Ausgabefehler`<br><br>
What do I need to set or configure to make these messages disappear?https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3823No audio devices found by lightworks2024-02-03T11:04:27Zdrago01No audio devices found by lightworks- PipeWire version (`pipewire --version`): 1.0.1
- Distribution and distribution version (`PRETTY_NAME` from `/etc/os-release`): Fedora Linux 39 (Workstation Edition)
- Desktop Environment: GNOME
- Kernel version (`uname -r`): 6.6.13-20...- PipeWire version (`pipewire --version`): 1.0.1
- Distribution and distribution version (`PRETTY_NAME` from `/etc/os-release`): Fedora Linux 39 (Workstation Edition)
- Desktop Environment: GNOME
- Kernel version (`uname -r`): 6.6.13-200.fc39.x86_64
## Description of Problem:
https://lwks.com/ which uses portaudio for audio output cannot find any devices since upgrading to Fedora 39, the issue has been reported by multiple users there as well:
https://forum.lwks.com/threads/fedora-39-io-device-greyed-out-null-audio.250725/
## How Reproducible:
### Steps to Reproduce:
1. Download light works
2. Click on system settings
### Actual Results:
No audio devices found and thus no audio playback.
### Expected Results:
Lists audio devices and allow audio playback
# Additional Info (as attachments):
- `pw-dump > pw-dump.log`:https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3830Problem with alsa? with pipewire 1.0.22024-02-02T13:50:47ZSergio AmoProblem with alsa? with pipewire 1.0.2PipeWire version: 1.0.2
Distribution: Arch
Desktop Environment: KDE
Kernel version: 6.7.2-arch1-Adashima-T2-1-t2
## Description of Problem:
Since the last update (1.0.1 to 1.02) I noticed piper-tts has stopped working, as i was using ap...PipeWire version: 1.0.2
Distribution: Arch
Desktop Environment: KDE
Kernel version: 6.7.2-arch1-Adashima-T2-1-t2
## Description of Problem:
Since the last update (1.0.1 to 1.02) I noticed piper-tts has stopped working, as i was using aplay to get sound output I decided to test aplay directly, `aplay -D default` and `aplay -D pipewire` both fail with `aplay: main:834: audio open error: Operation not supported`.
`aplay -D pulse` seems to work fine
### Steps to Reproduce:
1. Update pipewire to 1.0.2.
2. Try to play something with aplay without setting a device or using pipewire or alsa as device.
### Actual Results:
`aplay: main:834: audio open error: Operation not supported` in terminal and NO sound.
### Expected Results:
`Playing raw data ....` in terminal and sound.
# Additional Info (as attachments):
\*\*I'm now using the audio built in the usb mic AM310 cause the built-in card is a bit temperamental\*\*
[pw-dump.log](/uploads/3c84fd33e6360a3983748664562e5d1f/pw-dump.log)https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1106No audio on NoMachine after pausing audio2024-02-02T11:07:58ZWai WangNo audio on NoMachine after pausing audioIf you are filing this issue with a regular release please try master as it might already be fixed.
Version, Distribution, Desktop Environment:
Arch Linux, Cinnamon DE on 5.11.16 Zen Kernel
```
$ pipewire --version
pipewire
Compiled w...If you are filing this issue with a regular release please try master as it might already be fixed.
Version, Distribution, Desktop Environment:
Arch Linux, Cinnamon DE on 5.11.16 Zen Kernel
```
$ pipewire --version
pipewire
Compiled with libpipewire 0.3.26
Linked with libpipewire 0.3.26
$ sudo pacman -Qs pipewire
local/gst-plugin-pipewire 1:0.3.26-1
Multimedia graph framework - pipewire plugin
local/libpipewire02 0.2.7-1
User space API to deal with multimedia pipelines (0.2)
local/pipewire-alsa-git 0.3.26.30.g684c1b10-1
Low-latency audio/video router and processor (GIT version) - ALSA configuration (GIT version)
local/pipewire-git 0.3.26.30.g684c1b10-1
Low-latency audio/video router and processor (GIT version)
local/pipewire-media-session-git 0.3.26.30.g684c1b10-1
Low-latency audio/video router and processor (GIT version) - Session managerm (GIT version)
local/pipewire-pulse-git 0.3.26.30.g684c1b10-1
Low-latency audio/video router and processor (GIT version) - PulseAudio replacement (GIT version)
$ sudo pacman -Qs nomachine
local/nomachine 7.4.1-1 (network)
Remote desktop application
```
Description of Problem:
Audio on NoMachine works fine if audio is already playing when opening a new session, if audio is paused or isn't playing for a while then it will not play any more audio.
How Reproducible:
Consistent
Steps to Reproduce:
1. Open new session
2. Play audio
3. ->> No audio
4. Close session
5. Re-open session
6. ->> Audio plays
7. Pause audio for a moment and play again
8. ->> No audio
Expected Results:
Audio to play consistently
[pw-dump](/uploads/bcb2c910a049b24baeafae2412e576d3/pw-dump)https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3591SONY WF-C500 huge latency (from 200ms to 500ms) using pipewire and wireplumber2024-02-02T05:30:41ZGabrieleSONY WF-C500 huge latency (from 200ms to 500ms) using pipewire and wireplumberFIX: [Hardware upgrade](https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3591#note_2265088), Bluetooth 4.2 is insufficient for the WF-C500 (which are two separate units and the not sufficient capacity of Bluetooth 4.2 causes a s...FIX: [Hardware upgrade](https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3591#note_2265088), Bluetooth 4.2 is insufficient for the WF-C500 (which are two separate units and the not sufficient capacity of Bluetooth 4.2 causes a stupidly high latency)
- PipeWire version (`pipewire --version`): 0.3.82
- Distribution and distribution version (`PRETTY_NAME` from `/etc/os-release`): "Pop!\_OS 22.04 LTS"
- Desktop Environment: GNOME 42.9
- Kernel version (`uname -r`): 6.5.6-76060506-generic
- BlueZ version (`bluetoothctl --version`): 5.64
- `lsusb`:
```plaintext
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 1770:ff00 MSI steel series rgb keyboard
Bus 001 Device 005: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller
Bus 001 Device 004: ID 5986:0683 Acer, Inc BisonCam, NB Pro
Bus 001 Device 003: ID 8087:0aa7 Intel Corp. Wireless-AC 3168 Bluetooth
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
```
- Bluetooth devices:
```plaintext
Device 30:53:C1:D4:11:FF WF-C500
```
## Description of Problem:
Using the default values of Pipewire and Wireplumber, I can't fix the latency problem of those earbuds.
There's a latency that varies depending of what codec I'm using:
* AAC: 500ms
* SBC: 200ms maybe
* SBC-XQ: slightly more, maybe 250ms
IMPORTANT: A bluetooth speaker such as the JBL GO doesn't have this problem, I've even tested it while gaming. It's very strange.
BUT, connecting those earbuds is a pain, I can't connect them reliably, having to reset bluez almost every time to display the A2DP sink.
## How Reproducible:
Always
### Steps to Reproduce:
1. Connect the SONY WFC-500 earbuds
2. Open a game or watch a movie
3. Contemplate your life choices watching a weapon shooting before the sound gets reproduced
### Actual Results: Huge latency
### Expected Results: Low latency, at least pipewire should adapt everything
# Additional Info (as attachments):
- `pw-dump > pw-dump.log`: [pw-dump.log](/uploads/741ceb59a3cfa79e23796b5eb475eece/pw-dump.log)
- Bluetooth debug log, see [here](https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/Troubleshooting#bluetooth):https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2914memblock use after close leads to SIGBUS2024-02-01T20:46:15ZBarnabás Pőczememblock use after close leads to SIGBUSSometimes when setting the target of a pulseaudio stream in pavucontrol, `pipewire-pulse` stops with a SIGBUS. The reason for that is that it `mmap()`s more than the size of the file and accesses pages after the last existing one. The re...Sometimes when setting the target of a pulseaudio stream in pavucontrol, `pipewire-pulse` stops with a SIGBUS. The reason for that is that it `mmap()`s more than the size of the file and accesses pages after the last existing one. The reason for that seems to be that `pw_mempool_import_block()` requires that the source block be kept alive at least as long as the imported block (because the imported block will use the same fd), but this requirement is violated somewhere.
As far as I can see the following happens:
1) `client-node.c:do_port_use_buffers()` imports memblocks from from the context mempool into the client's mempool
2) when switching stream target, when the source blocks are destroyed their file descriptors (which have been closed) are still kept in the client's mempool
3) next time `client-node.c:do_port_use_buffers()` runs `pw_mempool_import_block()` it is possible that one of these "stale" imported memblocks are found and returned by `mempool_find_fd()`, thus the id of that is sent to the client, which then maps the wrong buffer
4) SIGBUS when attempting to access the mapped region in the client process past the last valid page
After applying the following changes:
<details>
```diff
diff --git a/src/modules/module-client-node/client-node.c b/src/modules/module-client-node/client-node.c
index 563585553..516fb8c0d 100644
--- a/src/modules/module-client-node/client-node.c
+++ b/src/modules/module-client-node/client-node.c
@@ -732,6 +732,8 @@ impl_node_port_set_io(void *object,
return -EINVAL;
}
+#include <sys/stat.h>
+
static int
do_port_use_buffers(struct impl *impl,
enum spa_direction direction,
@@ -831,6 +833,15 @@ do_port_use_buffers(struct impl *impl,
spa_log_debug(this->log, "%p: buffer %d %d %d %d", this, i, mb[i].mem_id,
mb[i].offset, mb[i].size);
+ struct stat sb;
+ if (fstat(m->fd, &sb) == 0) {
+ spa_log_warn(this->log, "%p: buffer %d %u %u %u on file %" PRIu64 ":%" PRIu64 " with size %" PRId64,
+ this, i, mb[i].mem_id, mb[i].offset, mb[i].size, sb.st_dev, sb.st_ino, sb.st_size);
+
+ if ((int64_t) mb[i].offset + mb[i].size > (int64_t) sb.st_size)
+ __builtin_trap();
+ }
+
b->buffer.n_metas = SPA_MIN(buffers[i]->n_metas, MAX_METAS);
for (j = 0; j < b->buffer.n_metas; j++)
memcpy(&b->buffer.metas[j], &buffers[i]->metas[j], sizeof(struct spa_meta));
diff --git a/src/modules/module-client-node/remote-node.c b/src/modules/module-client-node/remote-node.c
index 051ab0716..f79d9ca15 100644
--- a/src/modules/module-client-node/remote-node.c
+++ b/src/modules/module-client-node/remote-node.c
@@ -668,6 +668,8 @@ client_node_port_use_buffers(void *_data,
off_t offset;
struct pw_memmap *mm;
+ pw_log_warn("mapping %u+%u from mem id %u", buffers[i].offset, buffers[i].size, buffers[i].mem_id);
+
mm = pw_mempool_map_id(data->pool, buffers[i].mem_id,
prot, buffers[i].offset, buffers[i].size, NULL);
if (mm == NULL) {
diff --git a/src/modules/module-protocol-native/protocol-native.c b/src/modules/module-protocol-native/protocol-native.c
index 1c2d83e4a..f5678f051 100644
--- a/src/modules/module-protocol-native/protocol-native.c
+++ b/src/modules/module-protocol-native/protocol-native.c
@@ -546,11 +546,19 @@ static void core_event_marshal_bound_id(void *data, uint32_t id, uint32_t global
pw_protocol_native_end_resource(resource, b);
}
+#include <sys/stat.h>
+
static void core_event_marshal_add_mem(void *data, uint32_t id, uint32_t type, int fd, uint32_t flags)
{
struct pw_resource *resource = data;
struct spa_pod_builder *b;
+ struct stat sb;
+ if (fstat(fd, &sb) == 0) {
+ pw_log_warn("%p: add mem id %u file %" PRIu64 ":%" PRIu64 " with size %" PRId64,
+ resource, id, sb.st_dev, sb.st_ino, sb.st_size);
+ }
+
b = pw_protocol_native_begin_resource(resource, PW_CORE_EVENT_ADD_MEM, NULL);
spa_pod_builder_add_struct(b,
diff --git a/src/pipewire/core.c b/src/pipewire/core.c
index dd7e05eac..32fbbb5ad 100644
--- a/src/pipewire/core.c
+++ b/src/pipewire/core.c
@@ -94,6 +94,8 @@ static void core_event_bound_id(void *data, uint32_t id, uint32_t global_id)
}
}
+#include <sys/stat.h>
+
static void core_event_add_mem(void *data, uint32_t id, uint32_t type, int fd, uint32_t flags)
{
struct pw_core *this = data;
@@ -101,6 +103,12 @@ static void core_event_add_mem(void *data, uint32_t id, uint32_t type, int fd, u
pw_log_debug("%p: add mem %u type:%u fd:%d flags:%u", this, id, type, fd, flags);
+ struct stat sb;
+ if (fstat(fd, &sb) == 0) {
+ pw_log_warn("%p: add mem id %u file %" PRIu64 ":%" PRIu64 " with size %" PRId64,
+ this, id, sb.st_dev, sb.st_ino, sb.st_size);
+ }
+
m = pw_mempool_import(this->pool, flags, type, fd);
if (m->id != id) {
pw_log_error("%p: invalid mem id %u, fd:%d expected %u",
diff --git a/src/pipewire/mem.c b/src/pipewire/mem.c
index ae9e1e46c..5ee2e78d6 100644
--- a/src/pipewire/mem.c
+++ b/src/pipewire/mem.c
@@ -111,6 +111,9 @@ struct memblock {
struct spa_list link; /* link in mempool */
struct spa_list mappings; /* list of struct mapping */
struct spa_list memmaps; /* list of struct memmap */
+ uint64_t dev, ino;
+ struct memblock *import_source;
+ int import_ref;
};
/* a mapped region of a block */
@@ -354,6 +357,8 @@ static void mapping_unmap(struct mapping *m)
pw_memblock_unref(&b->this);
}
+#include <sys/stat.h>
+
SPA_EXPORT
struct pw_memmap * pw_memblock_map(struct pw_memblock *block,
enum pw_memmap_flags flags, uint32_t offset, uint32_t size, uint32_t tag[5])
@@ -364,6 +369,13 @@ struct pw_memmap * pw_memblock_map(struct pw_memblock *block,
struct memmap *mm;
struct pw_map_range range;
+ struct stat sb;
+ spa_assert_se(fstat(b->this.fd, &sb) == 0);
+ pw_log_warn("%p: block %p[%u] mapping %u+%u file=%d/%" PRIu64 ":%" PRIu64 " size=%" PRId64 " type=%u flags=%u",
+ block->pool, block, block->id, offset, size, block->fd, sb.st_dev, sb.st_ino, sb.st_size, b->this.type, b->this.flags);
+ if ((int64_t) offset + size > (int64_t) sb.st_size)
+ __builtin_trap();
+
pw_map_range_init(&range, offset, size, p->pagesize);
m = memblock_find_mapping(b, flags, offset, size);
@@ -548,6 +560,14 @@ struct pw_memblock * pw_mempool_alloc(struct pw_mempool *pool, enum pw_memblock_
pw_log_debug("%p: block:%p id:%d type:%u size:%zu", pool,
&b->this, b->this.id, type, size);
+ struct stat sb;
+ spa_assert_se(fstat(b->this.fd, &sb) == 0);
+ pw_log_warn("%p: block %p[%u] file=%d/%" PRIu64 ":%" PRIu64 " size=%" PRId64 "type=%u flags=%u",
+ pool, &b->this, b->this.id, b->this.fd, sb.st_dev, sb.st_ino, sb.st_size, type, flags);
+
+ b->dev = sb.st_dev;
+ b->ino = sb.st_ino;
+
if (!SPA_FLAG_IS_SET(flags, PW_MEMBLOCK_FLAG_DONT_NOTIFY))
pw_mempool_emit_added(impl, &b->this);
@@ -571,6 +591,12 @@ static struct memblock * mempool_find_fd(struct pw_mempool *pool, int fd)
if (fd == b->this.fd) {
pw_log_debug("%p: found %p id:%u fd:%d ref:%d",
pool, &b->this, b->this.id, fd, b->this.ref);
+
+ struct stat sb;
+ spa_assert_se(fstat(fd, &sb) == 0);
+ if (b->dev != sb.st_dev || b->ino != sb.st_ino)
+ __builtin_trap();
+
return b;
}
}
@@ -608,6 +634,14 @@ struct pw_memblock * pw_mempool_import(struct pw_mempool *pool,
pw_log_debug("%p: block:%p id:%u flags:%08x type:%u fd:%d",
pool, b, b->this.id, flags, type, fd);
+ struct stat sb;
+ spa_assert_se(fstat(fd, &sb) == 0);
+ pw_log_warn("%p: block %p[%u]: imported file=%d/%" PRIu64 ":%" PRIu64 " size=%" PRId64 " type=%u flags=%u",
+ pool, &b->this, b->this.id, fd, sb.st_dev, sb.st_ino, sb.st_size, type, flags);
+
+ b->dev = sb.st_dev;
+ b->ino = sb.st_ino;
+
if (!SPA_FLAG_IS_SET(flags, PW_MEMBLOCK_FLAG_DONT_NOTIFY))
pw_mempool_emit_added(impl, &b->this);
@@ -620,9 +654,19 @@ struct pw_memblock * pw_mempool_import_block(struct pw_mempool *pool,
{
pw_log_debug("%p: import block:%p type:%d fd:%d", pool,
mem, mem->type, mem->fd);
- return pw_mempool_import(pool,
+
+ struct pw_memblock *res = pw_mempool_import(pool,
mem->flags | PW_MEMBLOCK_FLAG_DONT_CLOSE,
mem->type, mem->fd);
+ if (res) {
+ struct memblock *r = SPA_CONTAINER_OF(res, struct memblock, this);
+ struct memblock *m = SPA_CONTAINER_OF(mem, struct memblock, this);
+
+ m->import_source = r;
+ r->import_ref += 1;
+ }
+
+ return res;
}
SPA_EXPORT
@@ -715,6 +759,12 @@ void pw_memblock_free(struct pw_memblock *block)
pw_log_debug("%p: block:%p id:%d fd:%d ref:%d",
pool, block, block->id, block->fd, block->ref);
+ if (b->import_ref)
+ __builtin_trap();
+
+ if (b->import_source)
+ b->import_source->import_ref -= 1;
+
block->ref++;
if (block->map)
block->ref++;
@@ -736,6 +786,7 @@ void pw_memblock_free(struct pw_memblock *block)
if (block->fd != -1 && !(block->flags & PW_MEMBLOCK_FLAG_DONT_CLOSE)) {
pw_log_debug("%p: close fd:%d", pool, block->fd);
+ pw_log_warn("%p: block %p[%u] closing fd=%d", pool, block, block->id, block->fd);
close(block->fd);
}
free(b);
```
</details>
pipewire traps here after starting a pulseaudio here:
```
Thread 1 "pipewire" received signal SIGILL, Illegal instruction.
pw_memblock_free (block=0x60c000021dc0) at ../src/pipewire/mem.c:763
763 __builtin_trap();
(gdb) bt
#0 pw_memblock_free (block=0x60c000021dc0) at ../src/pipewire/mem.c:763
#1 0x00007ffff6df18d5 in pw_memblock_unref (mem=0x60c000021dc0) at ../src/pipewire/mem.h:148
#2 0x00007ffff6df565c in mapping_unmap (m=0x6040000398d0) at ../src/pipewire/mem.c:357
#3 0x00007ffff6df7aff in pw_memmap_free (map=0x607000128b00) at ../src/pipewire/mem.c:453
#4 0x00007ffff1d8f9ad in do_port_set_io (impl=0x617000002700, direction=SPA_DIRECTION_OUTPUT, port_id=1, mix_id=0, id=1, data=0x0, size=0) at ../src/modules/module-client-node/client-node.c:709
#5 0x00007ffff1dac4e0 in impl_mix_port_set_io (object=0x61d00006b580, direction=SPA_DIRECTION_OUTPUT, mix_id=0, id=1, data=0x0, size=0) at ../src/modules/module-client-node/client-node.c:1513
#6 0x00007ffff6dbf944 in port_set_io (this=0x619000036680, port=0x61d00006ae80, id=1, data=0x0, size=0, mix=0x6190000367e8) at ../src/pipewire/impl-link.c:441
#7 0x00007ffff6dcbe89 in pw_impl_link_deactivate (this=0x619000036680) at ../src/pipewire/impl-link.c:844
#8 0x00007ffff6e1c11e in node_deactivate (this=0x61d000069a80) at ../src/pipewire/impl-node.c:212
#9 0x00007ffff6e1c9b3 in idle_node (this=0x61d000069a80) at ../src/pipewire/impl-node.c:232
#10 0x00007ffff6e57fd9 in pw_impl_node_set_state (node=0x61d000069a80, state=PW_NODE_STATE_SUSPENDED) at ../src/pipewire/impl-node.c:2261
#11 0x00007ffff6d1549b in ensure_state (node=0x61d000069a80, running=false) at ../src/pipewire/context.c:794
#12 0x00007ffff6d1876c in remove_from_driver (context=0x61a000000c80, nodes=0x7fffffffb830) at ../src/pipewire/context.c:900
#13 0x00007ffff6d1c3f8 in pw_context_recalc_graph (context=0x61a000000c80, reason=0x7ffff7058aa0 "node deactivate") at ../src/pipewire/context.c:1106
#14 0x00007ffff6e5910d in pw_impl_node_set_active (node=0x61d000069a80, active=false) at ../src/pipewire/impl-node.c:2291
#15 0x00007ffff1d9d2e0 in client_node_set_active (data=0x617000002700, active=false) at ../src/modules/module-client-node/client-node.c:1044
#16 0x00007ffff1dd0725 in client_node_demarshal_set_active (object=0x60e00005aa20, msg=0x606000057d48) at ../src/modules/module-client-node/protocol-native.c:1105
#17 0x00007ffff32ecd05 in process_messages (data=0x61600000e028) at ../src/modules/module-protocol-native.c:360
#18 0x00007ffff32ee602 in connection_data (data=0x61600000e028, fd=96, mask=1) at ../src/modules/module-protocol-native.c:431
#19 0x00007ffff36c6fd1 in source_io_func (source=0x60800000f320) at ../spa/plugins/support/loop.c:464
#20 0x00007ffff36c6350 in loop_iterate (object=0x62d00000a428, timeout=-1) at ../spa/plugins/support/loop.c:452
#21 0x00007ffff6def359 in pw_main_loop_run (loop=0x60300000b260) at ../src/pipewire/main-loop.c:148
#22 0x0000555555559723 in main (argc=0, argv=0x7ffff7023be0) at ../src/daemon/pipewire.c:131
```
But even if the import reference counting is removed, I am able to run into the trap instruction by doing the following:
1) open `pavucontrol`
2) start playing audio (I used youtube on firefox)
3) `pactl load-module module-roc-sink-input`
4) `pactl load-module module-roc-sink remote_ip=127.0.0.1`
5) starts switching the target of the firefox audio stream randomly back and forth
Then it stops with the following output:
<details>
```
[I][54106.063116] pw.link | [ impl-link.c: 114 link_update_state()] (95.0 -> 100.0) paused -> init
[I][54106.063149] pw.context | [ context.c: 1010 pw_context_recalc_graph()] 0x61a000000c80: busy:0 reason:link unprepared
[D][54106.063305] pw.mem | [ mem.c: 849 pw_mempool_find_tag()] 0x60800000f2a0: find tag 95:1:1:1:1 size:20
[D][54106.063360] pw.mem | [ mem.c: 807 pw_mempool_find_ptr()] 0x608000001120: block:0x60c00002e900 id:27 for 0x7fffdcf0e008
[D][54106.063392] pw.mem | [ mem.c: 655 pw_mempool_import_block()] 0x60800000f2a0: import block:0x60c00002e900 type:2 fd:106
[D][54106.063436] pw.mem | [ mem.c: 634 pw_mempool_import()] 0x60800000f2a0: block:0x60c00000f280 id:2 flags:0000001f type:2 fd:106
[W][54106.063480] pw.mem | [ mem.c: 639 pw_mempool_import()] 0x60800000f2a0: block 0x60c00000f280[2]: imported file=106/1:185090 size=16384 type=2 flags=31
[W][54106.063527] mod.protocol-native | [protocol-native.: 558 core_event_marshal_add_mem()] 0x61100003e200: add mem id 2 file 1:185090 with size 16384
[D][54106.063590] pw.mem | [ mem.c: 706 pw_mempool_import_map()] 0x60800000f2a0: mapping:0x60400003c990 block:0x60c00000f280 offset:0 size:16384 ref:1
[W][54106.063632] pw.mem | [ mem.c: 374 pw_memblock_map()] 0x60800000f2a0: block 0x60c00000f280[2] mapping 8+8 file=106/1:185090 size=16384 type=2 flags=31
[D][54106.063672] pw.mem | [ mem.c: 269 memblock_find_mapping()] 0x60800000f2a0: check 0x60400003c990 offset:(0 <= 8) end:(16384 >= 16)
[D][54106.063707] pw.mem | [ mem.c: 273 memblock_find_mapping()] 0x60800000f2a0: found 0x60c00000f280 id:2 fd:106 offs:8 size:8 ref:1
[D][54106.063749] pw.mem | [ mem.c: 402 pw_memblock_map()] 0x60800000f2a0: map:0x60700012a930 block:0x60c00000f280 fd:106 ptr:0x7fffdcf0e008 (8 8) mapping:0x60400003c990 ref:1
[D][54106.063787] pw.mem | [ mem.c: 407 pw_memblock_map()] 0x60800000f2a0: tag:95:1:1:1:1
[D][54106.063852] pw.mem | [ mem.c: 719 pw_mempool_import_map()] 0x60800000f2a0: from pool:0x608000001120 block:0x60c00000f280 id:2 data:0x7fffdcf0e008 size:8 ref:1
[D][54106.063926] pw.mem | [ mem.c: 849 pw_mempool_find_tag()] 0x60800000d6a0: find tag 100:0:1:0:1 size:20
[D][54106.063963] pw.mem | [ mem.c: 807 pw_mempool_find_ptr()] 0x608000001120: block:0x60c00002e900 id:27 for 0x7fffdcf0e008
[D][54106.063984] pw.mem | [ mem.c: 655 pw_mempool_import_block()] 0x60800000d6a0: import block:0x60c00002e900 type:2 fd:106
[D][54106.064014] pw.mem | [ mem.c: 634 pw_mempool_import()] 0x60800000d6a0: block:0x60c00000f340 id:18 flags:0000001f type:2 fd:106
[W][54106.064041] pw.mem | [ mem.c: 639 pw_mempool_import()] 0x60800000d6a0: block 0x60c00000f340[18]: imported file=106/1:185090 size=16384 type=2 flags=31
[W][54106.064072] mod.protocol-native | [protocol-native.: 558 core_event_marshal_add_mem()] 0x611000026600: add mem id 18 file 1:185090 with size 16384
[D][54106.064112] pw.mem | [ mem.c: 706 pw_mempool_import_map()] 0x60800000d6a0: mapping:0x60400003c9d0 block:0x60c00000f340 offset:0 size:16384 ref:1
[W][54106.064140] pw.mem | [ mem.c: 374 pw_memblock_map()] 0x60800000d6a0: block 0x60c00000f340[18] mapping 8+8 file=106/1:185090 size=16384 type=2 flags=31
[D][54106.064167] pw.mem | [ mem.c: 269 memblock_find_mapping()] 0x60800000d6a0: check 0x60400003c9d0 offset:(0 <= 8) end:(16384 >= 16)
[D][54106.064191] pw.mem | [ mem.c: 273 memblock_find_mapping()] 0x60800000d6a0: found 0x60c00000f340 id:18 fd:106 offs:8 size:8 ref:1
[D][54106.064217] pw.mem | [ mem.c: 402 pw_memblock_map()] 0x60800000d6a0: map:0x60700012a9a0 block:0x60c00000f340 fd:106 ptr:0x7fffdcf0e008 (8 8) mapping:0x60400003c9d0 ref:1
[D][54106.064242] pw.mem | [ mem.c: 407 pw_memblock_map()] 0x60800000d6a0: tag:100:0:1:0:1
[D][54106.064265] pw.mem | [ mem.c: 719 pw_mempool_import_map()] 0x60800000d6a0: from pool:0x608000001120 block:0x60c00000f340 id:18 data:0x7fffdcf0e008 size:8 ref:1
[I][54106.064312] pw.link | [ impl-link.c: 643 pw_impl_link_activate()] (95.1 -> 100.1) activated
[I][54106.064335] pw.link | [ impl-link.c: 114 link_update_state()] (95.1 -> 100.1) paused -> active
[D][54106.064441] pw.mem | [ mem.c: 759 pw_memblock_free()] 0x60800000f2a0: block:0x60c00002f380 id:4 fd:135 ref:0
[D][54106.064491] pw.mem | [ mem.c: 759 pw_memblock_free()] 0x608000001120: block:0x60c00002f2c0 id:24 fd:135 ref:0
[D][54106.064515] pw.mem | [ mem.c: 447 pw_memmap_free()] 0x608000001120: map:0x60700012a460 block:0x60c00002f2c0 fd:135 ptr:0x7fffdc3f0000 mapping:0x60400003c010 ref:1
[D][54106.064540] pw.mem | [ mem.c: 354 mapping_unmap()] 0x608000001120: mapping:0x60400003c010 block:0x60c00002f2c0 fd:135 ptr:0x7fffdc3f0000 size:69632 block-ref:2
[D][54106.064565] pw.mem | [ mem.c: 341 mapping_free()] 0x608000001120: mapping:0x60400003c010 block:0x60c00002f2c0 fd:135 ptr:0x7fffdc3f0000 size:69632 block-ref:2
[D][54106.064609] pw.mem | [ mem.c: 790 pw_memblock_free()] 0x608000001120: close fd:135
[W][54106.064630] pw.mem | [ mem.c: 791 pw_memblock_free()] 0x608000001120: block 0x60c00002f2c0[24] closing fd=135
[I][54106.064663] pw.link | [ impl-link.c: 114 link_update_state()] (95.1 -> 100.1) active -> init
[I][54106.064792] pw.node | [ impl-node.c: 410 node_update_state()] (Firefox-95) running -> suspended
[I][54106.065122] pw.link | [ impl-link.c: 114 link_update_state()] (95.0 -> 100.0) init -> negotiating
[I][54106.071021] pw.link | [ impl-link.c: 1419 pw_impl_link_destroy()] (95.0 -> 100.0) destroy
[D][54106.071061] pw.mem | [ mem.c: 592 mempool_find_fd()] 0x60800000f2a0: found 0x60c00000e140 id:1 fd:103 ref:2
[I][54106.073014] pw.port | [ impl-port.c: 1403 pw_impl_port_recalc_latency()] port 103: keep output latency 0,000000-0,000000 0-0 0-0
[D][54106.073070] pw.mem | [ mem.c: 759 pw_memblock_free()] 0x60800000d6a0: block:0x60c00000e980 id:17 fd:107 ref:0
[I][54106.073627] pw.link | [ impl-link.c: 1419 pw_impl_link_destroy()] (95.1 -> 100.1) destroy
[D][54106.073720] pw.mem | [ mem.c: 849 pw_mempool_find_tag()] 0x60800000d6a0: find tag 100:0:1:0:1 size:20
[D][54106.073748] pw.mem | [ mem.c: 855 pw_mempool_find_tag()] 0x60800000d6a0: found 0x60700012a9a0
[D][54106.073767] pw.mem | [ mem.c: 447 pw_memmap_free()] 0x60800000d6a0: map:0x60700012a9a0 block:0x60c00000f340 fd:106 ptr:0x7fffdcf0e008 mapping:0x60400003c9d0 ref:1
[D][54106.073782] pw.mem | [ mem.c: 354 mapping_unmap()] 0x60800000d6a0: mapping:0x60400003c9d0 block:0x60c00000f340 fd:106 ptr:0x7fffdcf0e000 size:16384 block-ref:1
[D][54106.073797] pw.mem | [ mem.c: 341 mapping_free()] 0x60800000d6a0: mapping:0x60400003c9d0 block:0x60c00000f340 fd:106 ptr:0x7fffdcf0e000 size:16384 block-ref:1
[D][54106.073851] pw.mem | [ mem.c: 759 pw_memblock_free()] 0x60800000d6a0: block:0x60c00000f340 id:18 fd:106 ref:0
[I][54106.073890] pw.link | [ impl-link.c: 851 pw_impl_link_deactivate()] (95.1 -> 100.1) deactivated
[I][54106.073907] pw.link | [ impl-link.c: 114 link_update_state()] (95.1 -> 100.1) init -> paused
[I][54106.073960] pw.context | [ context.c: 1010 pw_context_recalc_graph()] 0x61a000000c80: busy:0 reason:link prepared
[W][54106.074284] pw.link | [ impl-link.c: 448 port_set_io()] 0x61900005f080: port 0x61d00007d080 can't set io:1 (Spa:Enum:IO:Buffers): Érvénytelen argumentum
[W][54106.074344] pw.link | [ impl-link.c: 448 port_set_io()] 0x61900005f080: port 0x61d00007d080 can't set io:1 (Spa:Enum:IO:Buffers): Érvénytelen argumentum
[D][54106.074384] pw.mem | [ mem.c: 592 mempool_find_fd()] 0x60800000f2a0: found 0x60c00000e140 id:1 fd:103 ref:1
[D][54106.074413] pw.mem | [ mem.c: 759 pw_memblock_free()] 0x60800000f2a0: block:0x60c00000e140 id:1 fd:103 ref:0
[I][54106.075304] pw.port | [ impl-port.c: 1403 pw_impl_port_recalc_latency()] port 101: keep output latency 0,000000-0,000000 0-0 0-0
[D][54106.075337] pw.mem | [ mem.c: 759 pw_memblock_free()] 0x60800000d6a0: block:0x60c00000ea40 id:16 fd:135 ref:0
[I][54106.075437] pw.context | [ context.c: 1010 pw_context_recalc_graph()] 0x61a000000c80: busy:0 reason:link destroy
[I][54106.075484] pw.node | [ impl-node.c: 858 pw_impl_node_set_driver()] move quantum:1024 rate:44100 (alsa_input.pci-0000_00_1f.3.analog-stereo-57 -> Firefox-95)
[I][54106.075502] pw.node | [ impl-node.c: 876 pw_impl_node_set_driver()] (Firefox-95) -> change driver (alsa_input.pci-0000_00_1f.3.analog-stereo-57 -> Firefox-95)
[D][54106.075518] pw.mem | [ mem.c: 849 pw_mempool_find_tag()] 0x60800000f2a0: find tag 95:7:0:0:0 size:20
[D][54106.075534] pw.mem | [ mem.c: 855 pw_mempool_find_tag()] 0x60800000f2a0: found 0x60700012a4d0
[D][54106.075552] pw.mem | [ mem.c: 807 pw_mempool_find_ptr()] 0x608000001120: block:0x60c00000d900 id:22 for 0x7fffdd16e230
[D][54106.075565] pw.mem | [ mem.c: 655 pw_mempool_import_block()] 0x60800000f2a0: import block:0x60c00000d900 type:2 fd:98
[D][54106.075578] pw.mem | [ mem.c: 592 mempool_find_fd()] 0x60800000f2a0: found 0x60c00000df00 id:0 fd:98 ref:2
[W][54106.075601] pw.mem | [ mem.c: 374 pw_memblock_map()] 0x60800000f2a0: block 0x60c00000df00[0] mapping 560+1688 file=98/1:185083 size=2312 type=2 flags=31
[D][54106.075619] pw.mem | [ mem.c: 269 memblock_find_mapping()] 0x60800000f2a0: check 0x6040000395d0 offset:(0 <= 560) end:(4096 >= 2248)
[D][54106.075633] pw.mem | [ mem.c: 273 memblock_find_mapping()] 0x60800000f2a0: found 0x60c00000df00 id:0 fd:98 offs:560 size:1688 ref:2
[D][54106.075651] pw.mem | [ mem.c: 402 pw_memblock_map()] 0x60800000f2a0: map:0x60700012ab60 block:0x60c00000df00 fd:98 ptr:0x7fffdd169230 (560 1688) mapping:0x6040000395d0 ref:2
[D][54106.075666] pw.mem | [ mem.c: 407 pw_memblock_map()] 0x60800000f2a0: tag:95:7:0:0:0
[D][54106.075678] pw.mem | [ mem.c: 719 pw_mempool_import_map()] 0x60800000f2a0: from pool:0x608000001120 block:0x60c00000df00 id:0 data:0x7fffdd16e230 size:1688 ref:2
[D][54106.075693] pw.mem | [ mem.c: 447 pw_memmap_free()] 0x60800000f2a0: map:0x60700012a4d0 block:0x60c00002fec0 fd:61 ptr:0x7fffe4eec230 mapping:0x60400003c750 ref:1
[D][54106.075707] pw.mem | [ mem.c: 354 mapping_unmap()] 0x60800000f2a0: mapping:0x60400003c750 block:0x60c00002fec0 fd:61 ptr:0x7fffe4eec000 size:2312 block-ref:2
[D][54106.075721] pw.mem | [ mem.c: 341 mapping_free()] 0x60800000f2a0: mapping:0x60400003c750 block:0x60c00002fec0 fd:61 ptr:0x7fffe4eec000 size:2312 block-ref:2
[D][54106.075849] pw.mem | [ mem.c: 592 mempool_find_fd()] 0x60800000f2a0: found 0x60c00002fec0 id:3 fd:61 ref:1
[D][54106.075909] pw.mem | [ mem.c: 759 pw_memblock_free()] 0x60800000f2a0: block:0x60c00002fec0 id:3 fd:61 ref:0
[I][54106.076108] pw.node | [ impl-node.c: 876 pw_impl_node_set_driver()] (PulseAudio hangerőszabályzó-100) -> change driver (alsa_input.pci-0000_00_1f.3.analog-stereo-57 -> PulseAudio hangerőszabályzó-100)
[D][54106.076145] pw.mem | [ mem.c: 849 pw_mempool_find_tag()] 0x60800000d6a0: find tag 100:7:0:0:0 size:20
[D][54106.076175] pw.mem | [ mem.c: 855 pw_mempool_find_tag()] 0x60800000d6a0: found 0x60700012a700
[D][54106.076194] pw.mem | [ mem.c: 807 pw_mempool_find_ptr()] 0x608000001120: block:0x60c00002d640 id:26 for 0x7fffdcf12230
[D][54106.076208] pw.mem | [ mem.c: 655 pw_mempool_import_block()] 0x60800000d6a0: import block:0x60c00002d640 type:2 fd:103
[D][54106.076223] pw.mem | [ mem.c: 592 mempool_find_fd()] 0x60800000d6a0: found 0x60c00002e9c0 id:15 fd:103 ref:2
[W][54106.076249] pw.mem | [ mem.c: 374 pw_memblock_map()] 0x60800000d6a0: block 0x60c00002e9c0[15] mapping 560+1688 file=103/1:183270 size=2312 type=2 flags=31
[D][54106.076317] pw.mem | [ mem.c: 269 memblock_find_mapping()] 0x60800000d6a0: check 0x60400003bf90 offset:(0 <= 560) end:(4096 >= 2248)
[D][54106.076370] pw.mem | [ mem.c: 273 memblock_find_mapping()] 0x60800000d6a0: found 0x60c00002e9c0 id:15 fd:103 offs:560 size:1688 ref:2
[D][54106.076405] pw.mem | [ mem.c: 402 pw_memblock_map()] 0x60800000d6a0: map:0x60700012abd0 block:0x60c00002e9c0 fd:103 ptr:0x7fffdcf0d230 (560 1688) mapping:0x60400003bf90 ref:2
[D][54106.076426] pw.mem | [ mem.c: 407 pw_memblock_map()] 0x60800000d6a0: tag:100:7:0:0:0
[D][54106.076446] pw.mem | [ mem.c: 719 pw_mempool_import_map()] 0x60800000d6a0: from pool:0x608000001120 block:0x60c00002e9c0 id:15 data:0x7fffdcf12230 size:1688 ref:2
[D][54106.076811] pw.mem | [ mem.c: 447 pw_memmap_free()] 0x60800000d6a0: map:0x60700012a700 block:0x60c00000d0c0 fd:61 ptr:0x7fffe4eec230 mapping:0x604000039350 ref:3
[D][54106.076997] pw.mem | [ mem.c: 592 mempool_find_fd()] 0x60800000d6a0: found 0x60c00000d0c0 id:13 fd:61 ref:4
[I][54106.079541] pw.context | [ context.c: 1010 pw_context_recalc_graph()] 0x61a000000c80: busy:0 reason:node deactivate
[I][54106.079774] pw.node | [ impl-node.c: 1874 pw_impl_node_destroy()] (PulseAudio hangerőszabályzó-100) destroy
[I][54106.079945] pw.node | [ impl-node.c: 410 node_update_state()] (PulseAudio hangerőszabályzó-100) running -> suspended
[D][54106.080547] pw.mem | [ mem.c: 849 pw_mempool_find_tag()] 0x60800000d6a0: find tag 100:0:0:0:0 size:4
[D][54106.080588] pw.mem | [ mem.c: 855 pw_mempool_find_tag()] 0x60800000d6a0: found 0x60700012a380
[D][54106.080610] pw.mem | [ mem.c: 447 pw_memmap_free()] 0x60800000d6a0: map:0x60700012a380 block:0x60c00002e9c0 fd:103 ptr:0x7fffdcf0d230 mapping:0x60400003bf90 ref:2
[D][54106.080639] pw.mem | [ mem.c: 849 pw_mempool_find_tag()] 0x60800000d6a0: find tag 100:0:0:0:0 size:4
[D][54106.080667] pw.mem | [ mem.c: 855 pw_mempool_find_tag()] 0x60800000d6a0: found 0x60700012abd0
[D][54106.080685] pw.mem | [ mem.c: 447 pw_memmap_free()] 0x60800000d6a0: map:0x60700012abd0 block:0x60c00002e9c0 fd:103 ptr:0x7fffdcf0d230 mapping:0x60400003bf90 ref:1
[D][54106.080709] pw.mem | [ mem.c: 354 mapping_unmap()] 0x60800000d6a0: mapping:0x60400003bf90 block:0x60c00002e9c0 fd:103 ptr:0x7fffdcf0d000 size:4096 block-ref:2
[D][54106.080733] pw.mem | [ mem.c: 341 mapping_free()] 0x60800000d6a0: mapping:0x60400003bf90 block:0x60c00002e9c0 fd:103 ptr:0x7fffdcf0d000 size:4096 block-ref:2
[D][54106.080775] pw.mem | [ mem.c: 849 pw_mempool_find_tag()] 0x60800000d6a0: find tag 100:0:0:0:0 size:4
[D][54106.080804] pw.mem | [ mem.c: 759 pw_memblock_free()] 0x60800000d6a0: block:0x60c00002e9c0 id:15 fd:103 ref:0
[D][54106.080839] pw.mem | [ mem.c: 759 pw_memblock_free()] 0x608000001120: block:0x60c00002e900 id:27 fd:106 ref:0
[D][54106.080861] pw.mem | [ mem.c: 447 pw_memmap_free()] 0x608000001120: map:0x60700012a2a0 block:0x60c00002e900 fd:106 ptr:0x7fffdcf0e000 mapping:0x60400003bf50 ref:1
[D][54106.080884] pw.mem | [ mem.c: 354 mapping_unmap()] 0x608000001120: mapping:0x60400003bf50 block:0x60c00002e900 fd:106 ptr:0x7fffdcf0e000 size:16384 block-ref:2
[D][54106.080908] pw.mem | [ mem.c: 341 mapping_free()] 0x608000001120: mapping:0x60400003bf50 block:0x60c00002e900 fd:106 ptr:0x7fffdcf0e000 size:16384 block-ref:2
[D][54106.080949] pw.mem | [ mem.c: 790 pw_memblock_free()] 0x608000001120: close fd:106
[W][54106.080969] pw.mem | [ mem.c: 791 pw_memblock_free()] 0x608000001120: block 0x60c00002e900[27] closing fd=106
[D][54106.081015] pw.mem | [ mem.c: 759 pw_memblock_free()] 0x608000001120: block:0x60c00002d640 id:26 fd:103 ref:0
[D][54106.081038] pw.mem | [ mem.c: 447 pw_memmap_free()] 0x608000001120: map:0x60700012a230 block:0x60c00002d640 fd:103 ptr:0x7fffdcf12000 mapping:0x60400003bd90 ref:1
[D][54106.081061] pw.mem | [ mem.c: 354 mapping_unmap()] 0x608000001120: mapping:0x60400003bd90 block:0x60c00002d640 fd:103 ptr:0x7fffdcf12000 size:4096 block-ref:2
[D][54106.081084] pw.mem | [ mem.c: 341 mapping_free()] 0x608000001120: mapping:0x60400003bd90 block:0x60c00002d640 fd:103 ptr:0x7fffdcf12000 size:4096 block-ref:2
[D][54106.081123] pw.mem | [ mem.c: 790 pw_memblock_free()] 0x608000001120: close fd:103
[W][54106.081142] pw.mem | [ mem.c: 791 pw_memblock_free()] 0x608000001120: block 0x60c00002d640[26] closing fd=103
[D][54106.081495] pw.mem | [ mem.c: 532 pw_mempool_alloc()] 0x608000001120: new fd:103
[W][54106.081538] pw.mem | [ mem.c: 374 pw_memblock_map()] 0x608000001120: block 0x60c00000fb80[0] mapping 0+2312 file=103/1:191646 size=2312 type=2 flags=15
[D][54106.081584] pw.mem | [ mem.c: 330 memblock_map()] 0x608000001120: block:0x60c00000fb80 fd:103 map:0x60400003d050 ptr:0x7fffdcf12000 (0 4096) block-ref:2
[D][54106.081609] pw.mem | [ mem.c: 402 pw_memblock_map()] 0x608000001120: map:0x60700012ac40 block:0x60c00000fb80 fd:103 ptr:0x7fffdcf12000 (0 2312) mapping:0x60400003d050 ref:1
[D][54106.081635] pw.mem | [ mem.c: 560 pw_mempool_alloc()] 0x608000001120: block:0x60c00000fb80 id:26 type:2 size:2312
[W][54106.081661] pw.mem | [ mem.c: 565 pw_mempool_alloc()] 0x608000001120: block 0x60c00000fb80[26] file=103/1:191646 size=2312type=2 flags=15
[I][54106.081774] pw.node | [ impl-node.c: 963 check_properties()] (PulseAudio hangerőszabályzó-0) latency:0/0 -> 1/25
[I][54106.081814] pw.node | [ impl-node.c: 996 check_properties()] (PulseAudio hangerőszabályzó-0) rate:0/0 -> 1/25
[I][54106.082266] pw.node | [ impl-node.c: 410 node_update_state()] (Firefox-95) suspended -> idle
[I][54106.085750] pw.link | [ impl-link.c: 1282 pw_context_create_link()] (95.0 -> 56.0) (Firefox) -> (alsa_output.pci-0000_00_1f.3.analog-stereo)
[I][54106.085792] pw.port | [ impl-port.c: 1403 pw_impl_port_recalc_latency()] port 96: set input latency 1,000000-1,000000 0-0 0-0
[I][54106.085869] pw.port | [ impl-port.c: 1403 pw_impl_port_recalc_latency()] port 62: keep output latency 0,000000-0,000000 0-0 0-0
[D][54106.085901] pw.mem | [ mem.c: 655 pw_mempool_import_block()] 0x60800000f2a0: import block:0x60c000009400 type:2 fd:59
[D][54106.085933] pw.mem | [ mem.c: 634 pw_mempool_import()] 0x60800000f2a0: block:0x60c000030640 id:3 flags:0000001f type:2 fd:59
[W][54106.085965] pw.mem | [ mem.c: 639 pw_mempool_import()] 0x60800000f2a0: block 0x60c000030640[3]: imported file=59/1:189806 size=2312 type=2 flags=31
[W][54106.085996] mod.protocol-native | [protocol-native.: 558 core_event_marshal_add_mem()] 0x61100003e200: add mem id 3 file 1:189806 with size 2312
[I][54106.086857] pw.link | [ impl-link.c: 1282 pw_context_create_link()] (95.1 -> 56.1) (Firefox) -> (alsa_output.pci-0000_00_1f.3.analog-stereo)
[I][54106.086893] pw.port | [ impl-port.c: 1403 pw_impl_port_recalc_latency()] port 98: set input latency 1,000000-1,000000 0-0 0-0
[I][54106.086952] pw.port | [ impl-port.c: 1403 pw_impl_port_recalc_latency()] port 64: keep output latency 0,000000-0,000000 0-0 0-0
[D][54106.086980] pw.mem | [ mem.c: 655 pw_mempool_import_block()] 0x60800000f2a0: import block:0x60c000009400 type:2 fd:59
[D][54106.087004] pw.mem | [ mem.c: 592 mempool_find_fd()] 0x60800000f2a0: found 0x60c000030640 id:3 fd:59 ref:1
[D][54106.087701] pw.mem | [ mem.c: 532 pw_mempool_alloc()] 0x608000001120: new fd:134
[W][54106.087740] pw.mem | [ mem.c: 374 pw_memblock_map()] 0x608000001120: block 0x60c000030940[0] mapping 0+16384 file=134/1:191647 size=16384 type=2 flags=15
[D][54106.087787] pw.mem | [ mem.c: 330 memblock_map()] 0x608000001120: block:0x60c000030940 fd:134 map:0x60400003d090 ptr:0x7fffdcf0e000 (0 16384) block-ref:2
[D][54106.087810] pw.mem | [ mem.c: 402 pw_memblock_map()] 0x608000001120: map:0x60700012acb0 block:0x60c000030940 fd:134 ptr:0x7fffdcf0e000 (0 16384) mapping:0x60400003d090 ref:1
[D][54106.087837] pw.mem | [ mem.c: 560 pw_mempool_alloc()] 0x608000001120: block:0x60c000030940 id:27 type:2 size:16384
[W][54106.087863] pw.mem | [ mem.c: 565 pw_mempool_alloc()] 0x608000001120: block 0x60c000030940[27] file=134/1:191647 size=16384type=2 flags=15
[D][54106.087890] pw.mem | [ mem.c: 655 pw_mempool_import_block()] 0x60800000d6a0: import block:0x60c00000fb80 type:2 fd:103
[D][54106.087917] pw.mem | [ mem.c: 634 pw_mempool_import()] 0x60800000d6a0: block:0x60c000030a00 id:15 flags:0000001f type:2 fd:103
[W][54106.087942] pw.mem | [ mem.c: 639 pw_mempool_import()] 0x60800000d6a0: block 0x60c000030a00[15]: imported file=103/1:191646 size=2312 type=2 flags=31
[W][54106.087971] mod.protocol-native | [protocol-native.: 558 core_event_marshal_add_mem()] 0x611000026600: add mem id 15 file 1:191646 with size 2312
[I][54106.088094] pw.node | [ impl-node.c: 410 node_update_state()] (PulseAudio hangerőszabályzó-106) creating -> suspended
[D][54106.088315] pw.mem | [ mem.c: 849 pw_mempool_find_tag()] 0x60800000d6a0: find tag 106:7:0:0:0 size:20
[D][54106.088359] pw.mem | [ mem.c: 807 pw_mempool_find_ptr()] 0x608000001120: block:0x60c00000fb80 id:26 for 0x7fffdcf12230
[D][54106.088379] pw.mem | [ mem.c: 655 pw_mempool_import_block()] 0x60800000d6a0: import block:0x60c00000fb80 type:2 fd:103
[D][54106.088402] pw.mem | [ mem.c: 592 mempool_find_fd()] 0x60800000d6a0: found 0x60c000030a00 id:15 fd:103 ref:1
[W][54106.088435] pw.mem | [ mem.c: 374 pw_memblock_map()] 0x60800000d6a0: block 0x60c000030a00[15] mapping 560+1688 file=103/1:191646 size=2312 type=2 flags=31
[D][54106.088478] pw.mem | [ mem.c: 330 memblock_map()] 0x60800000d6a0: block:0x60c000030a00 fd:103 map:0x60400003d0d0 ptr:0x7fffdcf0d000 (0 4096) block-ref:2
[D][54106.088503] pw.mem | [ mem.c: 402 pw_memblock_map()] 0x60800000d6a0: map:0x60700012ad20 block:0x60c000030a00 fd:103 ptr:0x7fffdcf0d230 (560 1688) mapping:0x60400003d0d0 ref:1
[D][54106.088528] pw.mem | [ mem.c: 407 pw_memblock_map()] 0x60800000d6a0: tag:106:7:0:0:0
[D][54106.088549] pw.mem | [ mem.c: 719 pw_mempool_import_map()] 0x60800000d6a0: from pool:0x608000001120 block:0x60c000030a00 id:15 data:0x7fffdcf12230 size:1688 ref:2
[D][54106.088586] pw.mem | [ mem.c: 849 pw_mempool_find_tag()] 0x60800000d6a0: find tag 106:3:0:0:0 size:20
[D][54106.088617] pw.mem | [ mem.c: 807 pw_mempool_find_ptr()] 0x608000001120: block:0x60c00000fb80 id:26 for 0x7fffdcf12230
[D][54106.088636] pw.mem | [ mem.c: 655 pw_mempool_import_block()] 0x60800000d6a0: import block:0x60c00000fb80 type:2 fd:103
[D][54106.088659] pw.mem | [ mem.c: 592 mempool_find_fd()] 0x60800000d6a0: found 0x60c000030a00 id:15 fd:103 ref:2
[W][54106.088689] pw.mem | [ mem.c: 374 pw_memblock_map()] 0x60800000d6a0: block 0x60c000030a00[15] mapping 560+160 file=103/1:191646 size=2312 type=2 flags=31
[D][54106.088712] pw.mem | [ mem.c: 269 memblock_find_mapping()] 0x60800000d6a0: check 0x60400003d0d0 offset:(0 <= 560) end:(4096 >= 720)
[D][54106.088735] pw.mem | [ mem.c: 273 memblock_find_mapping()] 0x60800000d6a0: found 0x60c000030a00 id:15 fd:103 offs:560 size:160 ref:2
[D][54106.088760] pw.mem | [ mem.c: 402 pw_memblock_map()] 0x60800000d6a0: map:0x60700012ad90 block:0x60c000030a00 fd:103 ptr:0x7fffdcf0d230 (560 160) mapping:0x60400003d0d0 ref:2
[D][54106.088783] pw.mem | [ mem.c: 407 pw_memblock_map()] 0x60800000d6a0: tag:106:3:0:0:0
[D][54106.088804] pw.mem | [ mem.c: 719 pw_mempool_import_map()] 0x60800000d6a0: from pool:0x608000001120 block:0x60c000030a00 id:15 data:0x7fffdcf12230 size:160 ref:2
[I][54106.089617] pw.link | [ impl-link.c: 114 link_update_state()] (95.0 -> 56.0) init -> negotiating
[I][54106.089801] pw.link | [ impl-link.c: 114 link_update_state()] (95.1 -> 56.1) init -> negotiating
[I][54106.089931] pw.context | [ context.c: 1010 pw_context_recalc_graph()] 0x61a000000c80: busy:0 reason:node activate
[I][54106.094968] pw.link | [ impl-link.c: 114 link_update_state()] (95.0 -> 56.0) negotiating -> allocating
[D][54106.095145] pw.mem | [ mem.c: 532 pw_mempool_alloc()] 0x608000001120: new fd:104
[W][54106.095186] pw.mem | [ mem.c: 374 pw_memblock_map()] 0x608000001120: block 0x60c0000310c0[0] mapping 0+65664 file=104/1:187830 size=65664 type=2 flags=15
[D][54106.095225] pw.mem | [ mem.c: 330 memblock_map()] 0x608000001120: block:0x60c0000310c0 fd:104 map:0x60400003d150 ptr:0x7fffdc3f0000 (0 69632) block-ref:2
[D][54106.095245] pw.mem | [ mem.c: 402 pw_memblock_map()] 0x608000001120: map:0x60700012ae00 block:0x60c0000310c0 fd:104 ptr:0x7fffdc3f0000 (0 65664) mapping:0x60400003d150 ref:1
[D][54106.095262] pw.mem | [ mem.c: 560 pw_mempool_alloc()] 0x608000001120: block:0x60c0000310c0 id:24 type:2 size:65664
[W][54106.095279] pw.mem | [ mem.c: 565 pw_mempool_alloc()] 0x608000001120: block 0x60c0000310c0[24] file=104/1:187830 size=65664type=2 flags=15
[D][54106.095318] pw.mem | [ mem.c: 807 pw_mempool_find_ptr()] 0x608000001120: block:0x60c0000310c0 id:24 for 0x7fffdc3f0000
[D][54106.095336] pw.mem | [ mem.c: 807 pw_mempool_find_ptr()] 0x608000001120: block:0x60c0000310c0 id:24 for 0x7fffdc3f0040
[D][54106.095349] pw.mem | [ mem.c: 655 pw_mempool_import_block()] 0x60800000f2a0: import block:0x60c0000310c0 type:2 fd:104
[D][54106.095367] pw.mem | [ mem.c: 634 pw_mempool_import()] 0x60800000f2a0: block:0x60c000031180 id:1 flags:0000001f type:2 fd:104
[W][54106.095385] pw.mem | [ mem.c: 639 pw_mempool_import()] 0x60800000f2a0: block 0x60c000031180[1]: imported file=104/1:187830 size=65664 type=2 flags=31
[W][54106.095406] mod.protocol-native | [protocol-native.: 558 core_event_marshal_add_mem()] 0x61100003e200: add mem id 1 file 1:187830 with size 65664
[W][54106.095445][ client-node.c: 838 do_port_use_buffers()] 0x617000002720: buffer 0 1 0 32832 on file 1:187830 with size 65664
[D][54106.095468] pw.mem | [ mem.c: 807 pw_mempool_find_ptr()] 0x608000001120: block:0x60c0000310c0 id:24 for 0x7fffdc3f8040
[D][54106.095484] pw.mem | [ mem.c: 807 pw_mempool_find_ptr()] 0x608000001120: block:0x60c0000310c0 id:24 for 0x7fffdc3f8080
[D][54106.095496] pw.mem | [ mem.c: 655 pw_mempool_import_block()] 0x60800000f2a0: import block:0x60c0000310c0 type:2 fd:104
[D][54106.095509] pw.mem | [ mem.c: 592 mempool_find_fd()] 0x60800000f2a0: found 0x60c000031180 id:1 fd:104 ref:1
[W][54106.095529][ client-node.c: 838 do_port_use_buffers()] 0x617000002720: buffer 1 1 32832 32832 on file 1:187830 with size 65664
[I][54106.095594] pw.link | [ impl-link.c: 114 link_update_state()] (95.1 -> 56.1) negotiating -> allocating
[D][54106.095705] pw.mem | [ mem.c: 532 pw_mempool_alloc()] 0x608000001120: new fd:106
[W][54106.095735] pw.mem | [ mem.c: 374 pw_memblock_map()] 0x608000001120: block 0x60c000031240[0] mapping 0+65664 file=106/1:187831 size=65664 type=2 flags=15
[D][54106.095767] pw.mem | [ mem.c: 330 memblock_map()] 0x608000001120: block:0x60c000031240 fd:106 map:0x60400003d190 ptr:0x7fffdbee3000 (0 69632) block-ref:2
[D][54106.095784] pw.mem | [ mem.c: 402 pw_memblock_map()] 0x608000001120: map:0x60700012ae70 block:0x60c000031240 fd:106 ptr:0x7fffdbee3000 (0 65664) mapping:0x60400003d190 ref:1
[D][54106.095801] pw.mem | [ mem.c: 560 pw_mempool_alloc()] 0x608000001120: block:0x60c000031240 id:25 type:2 size:65664
[W][54106.095817] pw.mem | [ mem.c: 565 pw_mempool_alloc()] 0x608000001120: block 0x60c000031240[25] file=106/1:187831 size=65664type=2 flags=15
[D][54106.095845] pw.mem | [ mem.c: 807 pw_mempool_find_ptr()] 0x608000001120: block:0x60c000031240 id:25 for 0x7fffdbee3000
[D][54106.095861] pw.mem | [ mem.c: 807 pw_mempool_find_ptr()] 0x608000001120: block:0x60c000031240 id:25 for 0x7fffdbee3040
[D][54106.095873] pw.mem | [ mem.c: 655 pw_mempool_import_block()] 0x60800000f2a0: import block:0x60c000031240 type:2 fd:106
[D][54106.095886] pw.mem | [ mem.c: 592 mempool_find_fd()] 0x60800000f2a0: found 0x60c00000f280 id:2 fd:106 ref:1
Thread 1 "pipewire" received signal SIGILL, Illegal instruction.
mempool_find_fd (pool=0x60800000f2a0, fd=106) at ../src/pipewire/mem.c:598
598 __builtin_trap();
(gdb) bt
#0 mempool_find_fd (pool=0x60800000f2a0, fd=106) at ../src/pipewire/mem.c:598
#1 0x00007ffff6dfa4a5 in pw_mempool_import (pool=0x60800000f2a0, flags=31, type=2, fd=106) at ../src/pipewire/mem.c:613
#2 0x00007ffff6dfc047 in pw_mempool_import_block (pool=0x60800000f2a0, mem=0x60c000031240) at ../src/pipewire/mem.c:658
#3 0x00007ffff1d924cb in do_port_use_buffers (impl=0x617000002700, direction=SPA_DIRECTION_OUTPUT, port_id=1, mix_id=4294967295, flags=0, buffers=0x6110000656c0, n_buffers=2)
at ../src/modules/module-client-node/client-node.c:823
#4 0x00007ffff1dab9c1 in impl_mix_port_use_buffers (object=0x61d000081d80, direction=SPA_DIRECTION_OUTPUT, mix_id=0, flags=0, buffers=0x6110000656c0, n_buffers=2)
at ../src/modules/module-client-node/client-node.c:1484
#5 0x00007ffff6eb5877 in pw_impl_port_use_buffers (port=0x61d000081680, mix=0x6190000646e8, flags=0, buffers=0x6110000656c0, n_buffers=2) at ../src/pipewire/impl-port.c:1593
#6 0x00007ffff6dc1448 in do_allocation (this=0x619000064580) at ../src/pipewire/impl-link.c:540
#7 0x00007ffff6dc6990 in check_states (obj=0x619000064580, user_data=0x619000064580, res=0, id=141) at ../src/pipewire/impl-link.c:710
#8 0x00007ffff6f3864f in process_work_queue (data=0x6060000013a0, count=2) at ../src/pipewire/work-queue.c:87
#9 0x00007ffff36cd6f5 in source_event_func (source=0x6080000011a0) at ../spa/plugins/support/loop.c:615
#10 0x00007ffff36c6350 in loop_iterate (object=0x62d00000a428, timeout=-1) at ../spa/plugins/support/loop.c:452
#11 0x00007ffff6dee359 in pw_main_loop_run (loop=0x60300000b260) at ../src/pipewire/main-loop.c:148
#12 0x0000555555559723 in main (argc=0, argv=0x7ffff7021be0) at ../src/daemon/pipewire.c:131
```
</details>
The important moments are:
* `54106.063392` when file descriptor 106 was imported into mempool `0x60800000f2a0` from mempool `0x608000001120`
* `54106.080949` when `pw_memblock_free()` closed file descriptor 106
* `54106.095705` when file descriptor 106 was reused for a new memblock `0x60c000031240` in mempool `0x608000001120`
* `54106.095886` when `do_port_use_buffers()` tries to import memblock `0x60c000031240` (the one with the "reused" fd 106) but finds its own stale memblock that was imported in the first step
If things are allowed to continue, then the client process receives the wrong mem id (that of the stale memblock), maps the wrong file, and can potentially run into a SIGBUS.
---
I have briefly tried `dup()`ing the file descriptor in `pw_mempool_import_block()`, and while that makes the issue disappear, that looks like it's leaking file descriptors (or at least not closing them as soon as possible). And it seems like that also breaks `client-node.c:node_peer_removed()` (the only user of `pw_mempool_find_fd()`).
At first glance I see two potential ways to fix this:
* fix the code so that the imported memblock does not outlive the source memblock, or
* add inter-mempool reference counting to file descriptors (e.g. storing file descriptors and their reference counts separately and referencing them from memblocks, or make one memblock the "owner" of the file descriptor that is kept alive as long as the fd needs to be alive regardless of its original pool).