flathub / tv.kodi.Kodi

https://flathub.org/apps/details/tv.kodi.Kodi
GNU Lesser General Public License v2.1
25 stars 24 forks source link

pipewire broken in 21.1 flatpak #288

Open i300220 opened 3 months ago

i300220 commented 3 months ago

System is Fedora 40. No analog, no HDMI, only AVR connected to SPDIF.

I use pipewire as audio output because it's the only one capable of setting passthrough to my SPDIF device.

This is the last version playing all audio formats properly: flatpak update --commit=54a88d5dd9f7f477144a2ab9aeee4e161eae88326cc36a67c024f0f435e3d256 tv.kodi.Kodi

I gave a try to the last commit today because of https://forum.kodi.tv/showthread.php?tid=377684

Current version results in No audio device when pipewire is selected; when alsa is selected, it tries to use the non connected HDMI as passthrough, same with pulse.

Kodi tv.kodi.Kodi 21.1-Omega stable system

$ flatpak run tv.kodi.Kodi --audio-backend=pipewire --filesystem=xdg-run/pipewire-0
'this->recurse > 0' failed at ../src/pipewire/thread-loop.c:63 do_unlock()
libva info: VA-API version 1.19.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/intel-vaapi-driver/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/GL/lib/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_19
libva info: va_openDriver() returns 0
$ flatpak update tv.kodi.Kodi
Looking for updates…

        ID                   Branch         Op        Remote         Download
 1. [✓] tv.kodi.Kodi         stable         u         flathub        130,4 Mo / 222,8 Mo

Updates complete.

$ flatpak permission-show tv.kodi.Kodi
Table      Object     App          Permissions Data
background background tv.kodi.Kodi yes         0x00

$ sudo /usr/local/sbin/kodi-downgrade.sh 
Looking for updates…

New tv.kodi.Kodi permissions:
    file access [1]

    [1] xdg-run/pipewire-0:ro

        ID                   Branch         Op        Remote         Download
 1. [✓] tv.kodi.Kodi         stable         u         flathub        128,8 Mo / 220,7 Mo

Updates complete.

Kodi tv.kodi.Kodi 21.0-Omega stable system

$ flatpak run tv.kodi.Kodi --audio-backend=pipewire
libva info: VA-API version 1.18.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/intel-vaapi-driver/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/GL/lib/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_18
libva info: va_openDriver() returns 0
razzeee commented 3 months ago

I don't think you wanted to test that, probably https://github.com/flathub/tv.kodi.Kodi/pull/259 but those builds have already been cleaned up

i300220 commented 3 months ago

Yeah, I remember https://github.com/flathub/tv.kodi.Kodi/pull/259 and https://forum.kodi.tv/showthread.php?tid=377684

And https://github.com/flathub/tv.kodi.Kodi/issues/270 and https://github.com/flathub/tv.kodi.Kodi/issues/240 too.

But hasn't this been merged into the current commit? That what I was waiting for (scheduled for 21.1). I know it fixed things for Ubuntu but for Fedora, it's still problematic since pipewire support was removed.

I'm willing to make any test you want.

razzeee commented 3 months ago

Seems like the only thing missing is the pipewire permission, so you could just enable that via flatseal

i300220 commented 3 months ago

@razzeee

Hi,

Thanks so much. Looks like you're perfectly right. I knew for nearly 4 months something was not working with that permission but had no clue how to enable it.

https://forum.kodi.tv/showthread.php?tid=377077&pid=3197834#pid3197834

Wondering whether I'll need to re-enable it with each and every update or you'll eventually make it into a future commit...

    <setting id="audiooutput.audiodevice">PIPEWIRE: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.volumesteps" default="true">90</setting>
    <setting id="audiooutput.maintainoriginalvolume" default="true">true</setting>
    <setting id="audiooutput.stereoupmix" default="true">false</setting>
    <setting id="audiooutput.processquality" default="true">30</setting>
    <setting id="audiooutput.atempothreshold">1</setting>
    <setting id="audiooutput.samplerate" default="true">48000</setting>
    <setting id="audiooutput.streamsilence" default="true">1</setting>
    <setting id="audiooutput.streamnoise" default="true">true</setting>
    <setting id="audiooutput.guisoundmode" default="true">1</setting>
    <setting id="audiooutput.guisoundvolume" default="true">100</setting>
    <setting id="lookandfeel.soundskin" default="true">resource.uisounds.kodi</setting>
    <setting id="audiooutput.passthrough">true</setting>
    <setting id="audiooutput.passthroughdevice">PIPEWIRE:alsa_output.pci-0000_00_14.2.iec958-stereo|Audio interne Stéréo numérique (IEC958)</setting>
    <setting id="audiooutput.ac3passthrough" default="true">true</setting>
    <setting id="audiooutput.ac3transcode">true</setting>
    <setting id="audiooutput.eac3passthrough" default="true">false</setting>
    <setting id="audiooutput.dtspassthrough">true</setting>
    <setting id="audiooutput.truehdpassthrough" default="true">false</setting>
    <setting id="audiooutput.dtshdpassthrough" default="true">false</setting>
    <setting id="audiooutput.dtshdcorefallback" default="true">true</setting>
razzeee commented 3 months ago

It should stay on, even if we update. We will eventually ship it by default.