Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
No Pipewire Sound Server in kodi 21
#16
If you wanna switch from your kodi 20 PPA installation to the kodi 21 Flatpak version just move everything from ~/.kodi to .var/app/tv.kodi.Kodi/data/ thats it....
Reply
#17
Hei, thanks a lot.
Thats a useful hint. The Flatpak version gives me a second, independent Kodi and its possible to test it without the fear of breaking something.
Later on i hope, that sometime the Ubuntu-repo will contain Kodi 21. As far as i know the upcoming Ubuntu 24.04 will contain Kodi 20.5.
Reply
#18
Hi,

Upgraded from Fedora 39 to 40 recently and noticed pipewire is now working using Kodi 21 Flatpak and pipewire-pulse when started with 'flatpak run tv.kodi.Kodi --audio-backend=pipewire &'.

No passthrough options visible in the Kodi GUI though nor 5.1 sound being played with Dolby/DTS material even though I tried to force it in the Kodi GUI config file:
Code:

<setting id="audiooutput.audiodevice">PIPEWIRE:alsa_output.pci-0000_00_14.2.iec958-stereo.2|Audio interne Stéréo numérique (IEC958)</setting>
<setting id="audiooutput.channels">8</setting>
<setting id="audiooutput.config">3</setting>
<setting id="audiooutput.passthrough">true</setting>
<setting id="audiooutput.passthroughdevice">PIPEWIRE:alsa_output.pci-0000_00_14.2.iec958-stereo.2|Audio interne Stéréo numérique (IEC958)</setting>

Reverting from pipewire-pulse to pulseaudio still works as expected (flatpak run tv.kodi.Kodi --audio-backend=pulseaudio &):
Code:

<setting id="audiooutput.audiodevice">PULSE:alsa_output.pci-0000_00_14.2.iec958-stereo|Audio interne Stéréo numérique (IEC958)</setting>
<setting id="audiooutput.channels">8</setting>
<setting id="audiooutput.config">3</setting>
<setting id="audiooutput.passthrough">true</setting>
<setting id="audiooutput.passthroughdevice">PULSE:alsa_output.pci-0000_00_14.2.iec958-stereo|Audio interne Stéréo numérique (IEC958)</setting>

Is this still a Kodi limitation?

I read 1 and 2 but I'm not sure.

Thanks.
Reply
#19
@LeliaBurke : To enable passthrough with PipeWire it needs to be configured appropriately, see  https://forum.kodi.tv/showthread.php?tid...pid3192930 for an example. But note that passthrough has problems in current PipeWire itself, a team member is currently in the process of upstreaming a fix so don't be surprised if it doesn't work in every scenario.
Reply
#20
Impressive way to vulgarize it. Thanks a lot. Works perfectly fine now.

Code:
sudo dnf --best --allowerasing install pipewire-pulseaudio
systemctl --user status pulseaudio.socket
systemctl --user status pipewire-pulse.socket
systemctl --user restart pipewire-pulse.socket
systemctl --user status pipewire-pulse.socket
systemctl --user restart pipewire
systemctl --user restart pulseaudio || systemctl --user restart pipewire-pulse
systemctl --user restart wireplumber
pactl info
flatpak run tv.kodi.Kodi --audio-backend=pipewire &

I read earlier today https://github.com/xbmc/xbmc/commit/f675...77f429698a before, but understoot nothing. It's not really end user oriented. Hence my presence in this thread. Wonder why it isn't part of the stock Fedora config since it's known since version 0.3.? of pipewire.
Reply
#21
Happy to here that it works for you Smile . Though I want to clear up a misunderstanding regarding pipewire-pulse: There are different ways to send audio data to PipeWire, the two you are confronted with are the native interface and the PulseAudio compatibility layer (pipewire-pulse). Both are available at the same time. When you launch Kodi with --audio-backend=pipewire it uses the native interface, with --audio-backend=pulseaudio it uses pipewire-pulse. Both times the audio goes through PipeWire, the original PulseAudio isn't involved anymore.

So when you use Kodi with --audio-backend=pipewire you technically don't have to have pipewire-pulse running or even installed. But most other software doesn't know how to speak to PipeWire the native way so having pipewire-pulse running is definitely recommended for a general purpose system.
Reply
#22
(2024-04-28, 02:05)Neo1973 Wrote: Happy to here that it works for you Smile . Though I want to clear up a misunderstanding regarding pipewire-pulse: There are different ways to send audio data to PipeWire, the two you are confronted with are the native interface and the PulseAudio compatibility layer (pipewire-pulse). Both are available at the same time. When you launch Kodi with --audio-backend=pipewire it uses the native interface, with --audio-backend=pulseaudio it uses pipewire-pulse. Both times the audio goes through PipeWire, the original PulseAudio isn't involved anymore.

So when you use Kodi with --audio-backend=pipewire you technically don't have to have pipewire-pulse running or even installed. But most other software doesn't know how to speak to PipeWire the native way so having pipewire-pulse running is definitely recommended for a general purpose system.

I used --audio-backend=pulseaudio ony when pulseaudio was installed and pipewire-pulse wasn't.
Now that I swapped them, the --audio-backend=pulseaudio doesn't work anymore as far as SPDIF passthrough is concerned and I don't want to live without it. Misconfiguration issue possibly, but that's the way my system actualy is. Got a startup script to that effect.

cat bin/kodi-passthrough.sh
Code:
#!/bin/bash
systemctl --user restart pipewire
sleep 2s
systemctl --user restart pulseaudio
if [ $? -eq 5 ]; then
audio_backend="pipewire"
systemctl --user restart pipewire-pulse
else
audio_backend="pulseaudio"
fi
sleep 2s
systemctl --user restart wireplumber
sleep 2s
# Copy the backup configuration
cp ~/Kodi\ Backups/${audio_backend}/guisettings.xml ~/.var/app/tv.kodi.Kodi/data/userdata/
# Run Kodi with the determined audio backend
flatpak run tv.kodi.Kodi --audio-backend=$audio_backend &

With all my gratitude for your kind assistance!
Reply
#23
If somebody needs an easy solution (like i do...  ) for the sound problem in Kodi 21:

In the last time i started Kodi 20 with the line "KODI_AE_SINK=ALSA kodi" to avoid Pipewire. This solution worked, but in combination with other Alsa-users it was unusable. In the meantime i upgraded to Flatpak-Kodi 21, which is kind of easy (thanks @Jusic for the hint!).
Well, for any reason also Kodi 21 does not work with Pipewire. So i tried to start Kodi 21 again in Alsa-mode. And with the line "flatpak run tv.kodi.Kodi --audio-backend=alsa" it looks, as everything works ok again. Sound is ok and Passthrough works as expected. It seems, some changes in the handling of the Alsa-mode were made between Kodi 20 and 21?!
So, at least for my Lubuntu 24.04 setting, i found an solution, which works without huzzles. Maybe this helps others as well.
Reply
#24
With the latest Flatpak update they have removed Pipewire permission again and my setup is once again broken. This is driving me nuts...
Reply
#25
Quote:With the latest Flatpak update they have removed Pipewire permission again and my setup is once again broken. This is driving me nuts...

Same here. Had to downgrade kodi flatpak on Fedora 40. - sudo flatpak update --commit=54a88d5dd9f7f477144a2ab9aeee4e161eae88326cc36a67c024f0f435e3d256 tv.kodi.Kodi

Quote: Commit: 1121f35831a650c21f833dfa79d2544e9770ebb222be032cab858aa32f9cf95d
Parent: 54a88d5dd9f7f477144a2ab9aeee4e161eae88326cc36a67c024f0f435e3d256
Subject: Revert "Add PipeWire support" (ebb2bdeb)
Date: 2024-05-11 00:13:24 +0000

Fedora 40 is shipped with pipewire whereas Fedora 39 had pulseaudio.

Pulseaudio was working fine on Fedora 39.

The pipewire wrapper for pulseaudio in F40 does not respect the passthrough settings that were valid on F39.

Pipewire is the only setup that has passthrough working for me on Fedora 40.

Very annoying. Now I have the choice to forget 5.1 audio on SPDIF or freeze Kodi. Obviously I choose the latter.
Reply
#26
Just to understand how to get this working between all the updates on the thread:
To get it working, you are checking out a specific version of kodi flatpack, then running with pipewire-pulseaudio installed and adding `--audio-backend=pulseaudio` paramater?
Reply
#27
Depends on what you are trying to achieve. Different people are discussing multiple solutions in this thread. I'm for example running pure PipeWire with latest Flatpak, no PulseAudio involved. But had to add permissions to the startup params some time ago and now again because the devs are fiddling with the Flatpak.
Reply
#28
Quote:To get it working, you are checking out a specific version of kodi flatpack, then running with pipewire-pulseaudio installed and adding `--audio-backend=pulseaudio` paramater?

1 - Pulseaudio - If you use pulseaudio, no need to get a specific version of kodi flatpak. It's supported in all commits of Kodi 20 and 21. Kodi 20 does not support the '--audio-backend' parameter though. For fedora 40, you install the pulseaudio package and not pipewire-pulse. They're conflicting each other.

2- Pipewire - OTOH, if you can't get pulseaudio to work, and it might be linux distro specific, then you may need to rely on pipewire. There you'll need a Kodi version prior to May 11th because pipewire support was removed with that specific update. And use `--audio-backend=pipewire` in that case. For fedora 40, you install the pipewire-pulse package instead of pulseaudio.


3 - ALSA - If you're lucky enough, and I'm not, to get ALSA passthrough working, then no need to specify either pulseaudio nor pipewire as audio backend.
Reply
#29
(2024-05-15, 22:42)LeliaBurke Wrote:
Quote:To get it working, you are checking out a specific version of kodi flatpack, then running with pipewire-pulseaudio installed and adding `--audio-backend=pulseaudio` paramater?

1 - Pulseaudio - If you use pulseaudio, no need to get a specific version of kodi flatpak. It's supported in all commits of Kodi 20 and 21. Kodi 20 does not support the '--audio-backend' parameter though. For fedora 40, you install the pulseaudio package and not pipewire-pulse. They're conflicting each other.

2- Pipewire - OTOH, if you can't get pulseaudio to work, and it might be linux distro specific, then you may need to rely on pipewire. There you'll need a Kodi version prior to May 11th because pipewire support was removed with that specific update. And use `--audio-backend=pipewire` in that case. For fedora 40, you install the pipewire-pulse package instead of pulseaudio.


3 - ALSA - If you're lucky enough, and I'm not, to get ALSA passthrough working, then no need to specify either pulseaudio nor pipewire as audio backend.

2. Is not exactly true, they havn't removed PipeWire support but just the Flatpak Permission to use it. So versions after May 11th can be used with startup parameter "--filesystem=xdg-run/pipewire-0".
Reply
#30
Quote:2. Is not exactly true, they havn't removed PipeWire support but just the Flatpak Permission to use it. So versions after May 11th can be used with startup parameter "--filesystem=xdg-run/pipewire-0".

Certainly not here:
"flatpak run tv.kodi.Kodi --audio-backend=pipewire --filesystem=xdg-run/pipewire-0"
results in "No audio device found" with the latest flatpak. Fedora 40.
Reply

Logout Mark Read Team Forum Stats Members Help
No Pipewire Sound Server in kodi 210