Flatpak Support

  • Nofan Tasi thanks, I think I know now what's going wrong.

    Could you please stop kodi and then run aplay -L and post the output?

    With kodi stopped also please confirm if this works fine:

    Code
    pactl load-module module-alsa-sink device=sysdefault:CARD=PCH

    so long,

    Hias

  • Nofan Tasi thanks, I think I know now what's going wrong.

    Could you please stop kodi and then run aplay -L and post the output?

    With kodi stopped also please confirm if this works fine:

    Code
    pactl load-module module-alsa-sink device=sysdefault:CARD=PCH

    so long,

    Hias

    HiassofT

    Good news!

    After stopping kodi I can load the pulseaudio module.

    And, when starting kodi again, audio does works in flatpak Chromium.

    In fact: if I put line

    Code
    pactl load-module module-alsa-sink device=sysdefault:CARD=PCH

    in .config/autostart.sh then all is fine.

    Moreover if I then enable Librespot, Librespot works as well ... however:

    If I then run Chromium, youtube cannot play (I suppose an audio issue) and suggests to restart device.

    In short:

    The line in autostart.sh is a valid workaround BUT switching between flatpak Chromium and Librespot does not continue well.

    I think I can live with this situation. I start LibreELEC with Librespot disabled and I can run Chromium with audio. And : when I need Librespot I enable it and restart LibreELEC (or maybe stop and start Kodi) and do not run Chromium.

    Thanks for all your help and suggestions. Have a nice day!

    Also: I will be more than happy to test possible fixes.

    fwiw: I actually should not need a browser but from time to time an add-on (e.g. Netflix and VRT-Nu) does not work good and then having a fallback to play in a browser on a sufficiently powerful machine is a nice luxury.

    here is requested output

    Edited 4 times, last by Nofan Tasi (May 17, 2026 at 5:40 PM).

  • Thanks again for the logs and tests!

    There's a bug in the current audio device selection code, it misses the :CARD=PCH which is important in your case.

    I'll have a look at fixing that and report back when I have an updated addon to test.

    so long,

    Hias

  • Nofan Tasi can you please test with the attached tools.externalhelper addon?

    I've fixed audio device handling and also added a setting to manually specify the audio device (the latter shouldn't be needed in your case).

    Please drop the pactl load-module workaround from your autostart when testing that.

    It'd also be interesting to know if this works with librespot installed.

    so long,

    Hias

  • HiassofT

    Thanks for the kind and excellent support! You are a hero :)

    Your addon fixes the 'flatpak Chromium' no-audio issue.

    Moreover: I can switch beween 'flatpak Chromium' and 'Librespot service' multiple times and both continue to work just fine.

    Your addon 'Settings' has a 'Run' button but with current default values all works fine without any manual intervention.

    Just curious: What is the 'Confirm start' setting? Maybe it controls if (yes/no) the addon is active right after LibreELEC (or Kodi?) startup?

    One observation: the Volume Up and Volume Down buttons on my remote do not seem to have any effect when running Chromium.

    Is or was (or will) this addon (be) in Team LibreELEC repository?

  • Thanks a lot for reporting back, glad to hear it works now!

    I'll PR the fixes so the should be in our addon repo in the next few days.

    With the "confirm start" option you can disable the "Start Chromium" etc dialogs that pop up before starting the flatpak addons.

    Concerning volume control: that's usually handled by special (background) services of desktop environments, but LE doesn't include a full desktop environment so the buttons on your keyboard/remote won't have any effect.

    so long,

    Hias

  • ...that's usually handled by special (background) services of desktop environments, but LE doesn't include a full desktop environment so the buttons on your keyboard/remote won't have any effect.

    Ah - that kinda-sorta has a bearing on a question I had.

    Ideally I'd like to use the same IR-remote I use in main LibreELEC/Kodi via lirc & keymaps, but haven't had a chance yet to poke around seriously.

    VaccuumTube's in-app settings dialogue says it uses up/down arrows to navigate, but it doesn't seem to recognise them on the bluetooth keyboard or IR-remote I'm using.

    I was going to ask how keyboard/mouse/remote handling & configuration worked in the Flatpak environment, but if there isn't any plumbing for it, because of lack of a "proper" desktop environment ... ??

  • Keyboard handling is actually quite simple, both kodi and wayland use libinput plus libxkb for that so we just need to pass the keyboard layout that's configured in kodi on to wayland (via an environment variable) and you get the same keyboard layout in flatpak addons as in kodi.

    What's missing in the wayland environment though is software to listen on volume keys and adjust audio volume. Usually that's handled by the (pulseaudio) volume/mixer applets in desktop environments, but there's no such thing (yet) in LE.

    Kodi handles the volume keys on it's own which is why it works in kodi.

    Remotes are quite a mess though. Currently we need to run remotes through eventlircd (and explicitly configure libinput not to handle them, too) as libxkb and kodi still doesn't support quite a lot of buttons found on remotes (especially the quite important "OK" button).

    There's a kodi PR to improve that https://github.com/xbmc/xbmc/pull/27932 but it hasn't been merged and also still doesn't support all common remote buttons.

    Realistically we won't get proper remote button support before the kodi 22 / LE13 release so we won't be able to drop that eventlircd workaround until some time during the LE14 dev cycle.

    Well, someone could write a separate program that translates LIRC events back to input events and injects those via uinput but that's quite meh (and would also be another - hopefully - short lived workaround).

    so long,

    Hias

  • Well, as luck would have it, the volume thing is not an issue for me as I let the AV-receiver box handle that aspect of things ;)

    As far as the remote goes, I may also be in luck. I'm using the Logitech Harmony system (fingers crossed it stays alive) and I have the facility to have the remote send any arbitrary key-command(s) for a given button.


    Thanks for the pointers of what to look at - I'll report back when I've had a chance to poke around in more detail.

  • If you want to play around with the remote:

    Simply "systemctl mask eventlircd" and disable the eventlircd udev rule by creating an empty .config/udev.rules.d/98-eventlircd.rules file - then reboot.

    If you configure the "OK" button to send "enter" (via ir-keytable) the up/down/left/right buttons will work like cursor keys and "OK" like the enter key on a keyboard.

    so long,

    Hias

  • Thanks a lot for reporting back, glad to hear it works now!

    I am glad I was of some help.

    I believe I noticed addon fix got committed 18 May so now I installed 19 May LE nightly.

    In 'my addons' I notice Team LibreELEC version is 12.80.7.0 which is same version as the one you gave.

    So I am not sure if fix is in official addons repository.

    Now shall I install current official Team LibreELEC 12.80.7.0 (and test again) or wait for a higher next version?

    Have a nice day!

  • Now shall I install current official Team LibreELEC 12.80.7.0 or (and test again) or wait for a higher next version?

    No, wait for the next version, it'll be 12.80.7.1 and Kodi should auto-update to it when it hits our repo.

    It usually takes a day or two from PR merge until addons are uploaded to our repos.

    so long,

    Hias