I'd like to run the latest Kodi (v21) on Debian/Ubuntu in order to check the current state of HW decoding on the CM3588. I found out installing Kodi on Linux is not a breeze anymore. The latest Kodi is only available using flatpak and requires several dependencies to make it run smoothly and play content using HW decoding.

Ubuntu:
As the FriendElec Ubuntu wiki clearly states: "Pre-installed mpv and kodi, support video hardware decoding", I decided to install the latest Ubuntu Jammy desktop image. However, an installed version of Kodi was nowhere to be found. After installing flatpak, the application could be run, but the result was in a terrible garbled an distorted screen and not usable at all. As Ubuntu seems to be the better candidate with OpenGL and HW acceleration, I'd really like to make this work. I'm just at a loss in how to proceed to make it work.

Debian:
Also tried various Debian releases (haven't tried Armbian yet). They could produce a working version of Kodi, but often the interface was very laggy or content would only play using SW decoding.

So any input on how to run Kodi smoothly with any Linux distro on the CM3588 would be greatly appreciated. Also, maybe point me to an image with Kodi included for me to test.