Kodi Community Forum
Linux Kodi 20.4 Flatpak standalone gbm screen artifacts after playback stop - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52)
+---- Thread: Linux Kodi 20.4 Flatpak standalone gbm screen artifacts after playback stop (/showthread.php?tid=376411)

Pages: 1 2


Kodi 20.4 Flatpak standalone gbm screen artifacts after playback stop - Jusic - 2024-02-23

Hello,

I'm using Kodi 20.4 Flatpak standalone gbm mode on Ubuntu. When I start and stop a playback I will get visual artifacts with every display refresh afterwards, in menu aswell as when starting a playback again. The only way to get rid of this is by restarting kodi completely. When I tried to reproduce this behaviour with debug log enabled kodi did not respond to the remote anymore after playback stopped.
  1. Start playback
  2. Stop playback
  3. Scroll through the menu. (screen artifacts on every display refresh)

  1. Enable debug log
  2. Start playback
  3. Stop playback
  4. kodi becomes unresponsive to remote control inputs


Debug log

Can anyone tell by this hints whats going on there? Or is there anything else I could provide?

Thanks
Jusic


RE: Kodi 20.4 Flatpak standalone gbm screen artifacts after playback stop - sarbes - 2024-02-23

Known Mesa issue: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9885. The ticket contains a workaround.


RE: Kodi 20.4 Flatpak standalone gbm screen artifacts after playback stop - Jusic - 2024-02-23

Great thank you. Adding
Code:
Environment = "mesa_glthread=false"
to my systemd file fixed it indeed.


RE: Kodi 20.4 Flatpak standalone gbm screen artifacts after playback stop - Jusic - 2024-02-26

(2024-02-23, 16:40)sarbes Wrote: Known Mesa issue: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9885. The ticket contains a workaround.

So this issue should be fixed by this merge which is part of Mesa 23.3.6 release. If I get it right the Flatpak version of kodi brings it's own Mesa lib and doesn't use the system one? Whom can I ask to update the Flatpak package?


RE: Kodi 20.4 Flatpak standalone gbm screen artifacts after playback stop - htpcero - 2024-04-06

@Jusic can you share how did you manage to run the flatpak in standalone + gbm mode?

This is what I get:

/usr/bin/flatpak run tv.kodi.Kodi --standalone --windowing=gbm

ERROR: Unable to create GUI. Exiting


The flatpak seems to require either x11 or a desktop environment which my htpc doesnt have (that's the whole point of running gbm, I guess)


RE: Kodi 20.4 Flatpak standalone gbm screen artifacts after playback stop - Jusic - 2024-04-07

Using a simple systemd file:

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

[Service]
User = kodi
Group = kodi
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



RE: Kodi 20.4 Flatpak standalone gbm screen artifacts after playback stop - htpcero - 2024-04-07

Thanks @Jusic
Do you have a desktop environment installed? I.e. does your htpc boot to a desktop login screen? Trying yo understamd whats the difference between your environment and mine


RE: Kodi 20.4 Flatpak standalone gbm screen artifacts after playback stop - Jusic - 2024-04-07

Not at all. Minimal server installation without X.org, Wayland or a desktop environment. Maybe your user is missing permission/groups? Have you done something like "sudo usermod -a -G cdrom,audio,video,plugdev,users,dialout,dip,input kodi"?


RE: Kodi 20.4 Flatpak standalone gbm screen artifacts after playback stop - htpcero - 2024-04-08

Same here, minimal server installation - I'll double check the user groups and definitely I need to retest this.
The kodi user should be in (at least) most of those groups, as I recall - I've been using kodi installed from older debs (the server/hptc is on ubuntu 23.10, using the latest deb set I could from the defunct ppa, which were compiled for ubuntu 22.10 I believe but I could install them with dpkg with no errors and the have been running flawlessly for six months).

Did you install the flatpak of kodi 21 this way, running OK?


RE: Kodi 20.4 Flatpak standalone gbm screen artifacts after playback stop - Jusic - 2024-04-08

Not yet, I'm still on 20.


RE: Kodi 20.4 Flatpak standalone gbm screen artifacts after playback stop - halfproxy - 2024-04-09

(2024-04-06, 15:39)htpcero Wrote: @Jusic can you share how did you manage to run the flatpak in standalone + gbm mode?

This is what I get:

/usr/bin/flatpak run tv.kodi.Kodi --standalone --windowing=gbm

ERROR: Unable to create GUI. Exiting


The flatpak seems to require either x11 or a desktop environment which my htpc doesnt have (that's the whole point of running gbm, I guess)

When I tried the flatpack a few months ago (with a similar headless setup, all of the correct groups, etc) I had the same problem and came to the same conclusion that some kind of desktop environment was required to use GBM. I just moved back to the packages provided by my distribution.


RE: Kodi 20.4 Flatpak standalone gbm screen artifacts after playback stop - Jusic - 2024-04-09

But did you guys use systemd? Or did you tried to launch the command right from the bash?


RE: Kodi 20.4 Flatpak standalone gbm screen artifacts after playback stop - htpcero - 2024-04-09

I tested the flatpak some 4-5 months ago using command line, that's how I got that error message and decided to stay with the ppa debs. I will try the systemd route as well and compare. I use a systemd service to launch kodi's binary in my htpc, I can easily change it to launch the flatpak instead and try this out, I will do that soon.

It would be really awesome getting the flatpak to work in this use case. Much easier to manage and harder to break than the deb packages


RE: Kodi 20.4 Flatpak standalone gbm screen artifacts after playback stop - Jusic - 2024-04-11

So I just updated the Flatpak package to kodi 21 and it runs fine. Only PipeWire support doesn't work as expected.


RE: Kodi 20.4 Flatpak standalone gbm screen artifacts after playback stop - Neo1973 - 2024-04-11

For PipeWire launch Kodi with this command:
Code:
flatpak run --filesystem=xdg-run/pipewire-0:ro tv.kodi.Kodi