Linux Ubuntu 22.04 server minimal - flatpak install help
#1
Hello Folks

I've set up a test system to help me work out if I can move away from PPA to the newer Flatpak install.

The aim is to have a system that boots into Kodi. I have no need of a graphical desktop but I do use the the OS a lot.

Output of lscpu is here this

Installation process so far is to install Ubuntu Server Minimal 22.04 from live usb, then post install

Code:

sudo apt install -y nano whiptail
sudo dpkg-reconfigure tzdata
sudo apt update && sudo apt upgrade -y

I have a GeForce GT 710 so install nvidia drivers

Code:

sudo apt install -y nvidia-driver-470
sudo shutdown -r now

Install flatpak

Code:

sudo apt install flatpak -y
sudo shutdown -r now
sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
sudo flatpak install flathub tv.kodi.Kodi

then try and run kodi from command line via SSH

Code:

flatpak run tv.kodi.Kodi

which generates the error
Code:

'this->recurse > 0' failed at ../src/pipewire/thread-loop.c:63 do_unlock()
ERROR: Unable to create GUI. Exiting

I've then created the advancedsettings.xml file in the flatpak userdata location to trigger debug logging which gave this log

The errors start with the freedesktop section and then more errors for input events. Googling freedesktop seems to suggest these are safe to ignore and then I'm stumped. Would appreciate a few pointers

Do I need to add my system to any groups or use a different command to start kodi from flatpak?
Reply
#2
your user should be member of the following groups: audio, video, input, plugdev
Reply
#3
(2024-09-20, 19:16)wsnipex Wrote: audio, video, input, plugdev

Thanks wsnipex, ran:

Code:
sudo usermod -a -G audio,video,input,plugdev littlejeem

rebooted then tried to launch kodi flatpak again

this generated a new error

Code:

'this->recurse > 0' failed at ../src/pipewire/thread-loop.c:63 do_unlock()
KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Function not implemented
KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Function not implemented
terminate called after throwing an instance of 'std::runtime_error'
  what():  eglSwapBuffers failed
/app/bin/kodi: line 216:     7 Aborted                 (core dumped) ${KODI_BINARY} ${ENV_ARGS} $SAVED_ARGS
Crash report available at /home/littlejeem/.var/app/tv.kodi.Kodi/data/kodi_crashlog-20240920_183423.log
 Crash report is here
Reply
#4
Quote:GL_RENDERER = llvmpipe (LLVM 17.0.6, 128 bits)

Something wrong with your GFX driver. I guess the problem is that your old nvidia card doesn't support EGL, which is necessary for GBM windowing. You can test that theory by trying to run kodi on X11 with:
Quote:flatpak run tv.kodi.Kodi --command kodi --gl-interface=glx

Another, probably easier, option is to just use your intel iGPU.
Reply
#5
Thanks for the tips, I saw some posts in my googling that seemed to suggest that nvidia drivers don't support gbm for drivers 470 and below so that does make sense.

I've done as suggested and stripped out the nvidia card and started with fresh install of ubuntu 22.04

Followed the same steps as I outlined in first post (omitting the nvidia drivers), added to the groups and re-ran the launch command for kodi

Code:

'this->recurse > 0' failed at ../src/pipewire/thread-loop.c:63 do_unlock()
ERROR: Unable to create GUI. Exiting

new debug log here
Reply
#6
Ok, so i've not solved the issue but it does seem isolated somehow to my hardware. I say this because
 
  • I've fired up a VM of ubuntu 22.04 on proxmox and the flatpak of kodi installed and ran exactly as expected.
  • Wiped a Z83-F Intel Cherry Trail mini pc and again flatpak installed and ran as expected

I'm not sure what to do now as the machine I can't get the flatpak of kodi running on is my main machine.  Big Grin

Do folks think a new g-card would solve it...... Huh
Reply
#7
(2024-09-22, 18:11)littlejeem Wrote: Do folks think a new g-card would solve it...... Huh

Probably, otoh it might be overkill and less efficient then a new amd or intel soc
Reply
#8
Thanks wsnipex. I'll take a look at upgrading the CPU.

For the current set up.ive had some success. I wiped the test system and started with a fresh install of Ubuntu server 22.04. This time I chose the HWE option and the full server install.

To my surprise the flatpak now ran (yay! 🎉)...however there is some green spotting/artifacting like weird halo on the screen.

...screenshot attached here
Reply
#9
Ok, sooo ignore that picture it only happened until I ran a full reboot, rookie error I know...apologies.
Reply
#10
...and wow, it lives!

Got it up and running on full server install, got some things playing so thought I'd try again with a fresh install. So went back to linux 22.04 minimal server install.

Stepped though the following to get kodi up and running connected to AV Amp.

Code:

sudo apt update && sudo apt upgrade
sudo dpkg-reconfigure tzdata
sudo shutdown -r now
sudo apt install -y nano whiptail read-edid edid-decode
sudo get-edid -m 0 > edid.bin
cat edid.bin | edid-decode
sudo apt install flatpak -y
sudo shutdown -r now
sudo usermod -a -G audio,video,input,plugdev,render littlejeem
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
exit
sudo flatpak install flathub tv.kodi.Kodi
sudo apt -y install vainfo
sudo shutdown -r now

Created the systemd service

Code:

sudo nano /etc/systemd/system/kodi-flatpak-gbm.service

paste in, thanks to this thread here

Code:

[Unit]
Description = kodi-standalone using gbm
After = systemd-user-sessions.service network.target sound.target network-online.target

[Service]
User = littlejeem
Group = littlejeem
Type = simple
PAMName = login
ExecStart = /usr/bin/flatpak run --filesystem=/run/udev:ro --filesystem=home:ro tv.kodi.Kodi --standalone --windowing=gbm
ExecStop = /usr/bin/flatpak kill tv.kodi.Kodi
Restart = always

[Install]
WantedBy = multi-user.target

ctrl+x to exit and save

update systemd and enable service at reboot
Code:

sudo systemctl daemon-reload
sudo systemctl enable kodi-flatpak-gbm.service 

reboot and watch the magic happen...sooo cool! 

...now for testing
Reply

Logout Mark Read Team Forum Stats Members Help
Ubuntu 22.04 server minimal - flatpak install help0