Celedhrim / docker-kodi-server

Runs Kodi in headless mode with docker
MIT License
79 stars 20 forks source link

xvfb won't run on lot's of devices #14

Closed matthuisman closed 5 years ago

matthuisman commented 5 years ago

Get errors like 'Failed to get size of gamma for output screen' when using on headless devices (cloud server / openmediavault etc)

Celedhrim commented 5 years ago

Hello !

It's not a breaking error. I have the same and it run fine. I tried tu find how to remove these warning but didn't find anything :(

Why I switch to xvfb ? because kodi compilation wuth headless patch is really too long , kodi growth and growth again , and now , docker hub can't build image in the 2 hours limit build time.

matthuisman commented 5 years ago

Oh, I get a segfault straight after that error?

Celedhrim commented 5 years ago

Ok , I get a segfault too if I just run leia tag without profile.

Did you change the profile path in your launch command ? (I think yes , but we don't know ^^)

matthuisman commented 5 years ago

Can you try with a fresh kodi data directory?

eg. rename your windows ..AppData\Roaming\Kodi_OLD. Then start KODI. Then close KODI. Then copy the newly created ..AppData\Roaming\Kodi directory

I get segfault still

Celedhrim commented 5 years ago

Damn !

Did you have a kodi 17.6 profile ?

experimental branch is kodi krypton with xvfb , and it run ok on my server

Celedhrim commented 5 years ago

OK , on my professional laptop ( I'm not @home) leia segfault and krypton don't ...

Celedhrim commented 5 years ago
10:22:48.780 T:139678302159808   ERROR: Failed to find matching visual
10:22:48.780 T:139678302159808   ERROR: GL: Error compiling vertex shader
10:22:48.780 T:139678302159808   ERROR: GL: Error compiling vertex shader: gl_shader_vert_default.glsl
10:22:48.780 T:139678302159808   ERROR: GUI Shader gl_shader_frag_default.glsl - compile and link failed
10:22:48.780 T:139678302159808   ERROR: GL: Error compiling vertex shader
10:22:48.780 T:139678302159808   ERROR: 6
10:22:48.780 T:139678302159808   ERROR: GL: Error compiling vertex shader: gl_shader_vert.glsl
10:22:48.780 T:139678302159808   ERROR: GUI Shader gl_shader_frag_texture.glsl - compile and link failed
10:22:48.780 T:139678302159808   ERROR: CYUVShaderGLSL::CYUVShaderGLSL - failed to open file gl_shader_frag_texture_lim.glsl
10:22:48.780 T:139678302159808   ERROR: GL: Error compiling vertex shader
10:22:48.780 T:139678302159808   ERROR: <90><82><9B>3<FC>^?
10:22:48.780 T:139678302159808   ERROR: GL: Error compiling vertex shader: gl_shader_vert.glsl
10:22:48.780 T:139678302159808   ERROR: GUI Shader gl_shader_frag_texture_lim.glsl - compile and link failed
10:22:48.780 T:139678302159808   ERROR: GL: Error compiling vertex shader
10:22:48.780 T:139678302159808   ERROR: 4
10:22:48.780 T:139678302159808   ERROR: GL: Error compiling vertex shader: gl_shader_vert.glsl
10:22:48.780 T:139678302159808   ERROR: GUI Shader gl_shader_frag_multi.glsl - compile and link failed
10:22:48.780 T:139678302159808   ERROR: GL: Error compiling vertex shader
10:22:48.780 T:139678302159808   ERROR: 4
10:22:48.780 T:139678302159808   ERROR: GL: Error compiling vertex shader: gl_shader_vert.glsl
10:22:48.780 T:139678302159808   ERROR: GUI Shader gl_shader_frag_fonts.glsl - compile and link failed
10:22:48.780 T:139678302159808   ERROR: GL: Error compiling vertex shader
10:22:48.780 T:139678302159808   ERROR: >
10:22:48.780 T:139678302159808   ERROR: GL: Error compiling vertex shader: gl_shader_vert.glsl
10:22:48.780 T:139678302159808   ERROR: GUI Shader gl_shader_frag_texture_noblend.glsl - compile and link failed
10:22:48.780 T:139678302159808   ERROR: GL: Error compiling vertex shader
10:22:48.780 T:139678302159808   ERROR: ?
10:22:48.780 T:139678302159808   ERROR: GL: Error compiling vertex shader: gl_shader_vert.glsl
10:22:48.780 T:139678302159808   ERROR: GUI Shader gl_shader_frag_multi_blendcolor.glsl - compile and link failed

this in log ... :(

Celedhrim commented 5 years ago

Shoud be fix with https://github.com/Celedhrim/docker-kodi-server/commit/eb9940b270dc484013fbb9ad354f267e58aee3a3

Tell me if it's better on your side ( maybe build yourself , or wait for dockerhub to build leia image

matthuisman commented 5 years ago

That stops the segfault but still get a bunch of errors / warnings when xpra starts up. and kodi log filled with CActiveAESink::OpenSink - no sink was returned (until stopped).

I might see if I can pull your repo with the old patch build and build it

Celedhrim commented 5 years ago

Ok , but it's works ? I mean , log and output is annoying , but the true question is :

It's running ? it does the job ?

If no , we can stop all base on xpra, if yes , we can polish the solution :)

matthuisman commented 5 years ago

Yes, it is working now

Mycah commented 5 years ago

will you have an option for building the headless image ourselves if we don't want to deal with the extra overhead of xvfb?

Celedhrim commented 5 years ago

How much is the overhead ?

headless patch was cool , but building is really too long for docker hub ( kodi become a massive software) So i decide to explore a new way for having docker automatic build.

On my server I didn't see big change on system ram or cpu

Mycah commented 5 years ago

Yeah, I understand the reasons for switching to xvfb. I did a similar project in the past before the headless patch, and added a vnc connector so I could even use the interface, but like matthuisman was complaining about, the weird irrelevant errors were annoying but if you say the system isn't using any additional resources I guess it's not a big deal.

I was mostly just curious if you were going to maintain headless at all at a patch level or go this route with xvfb for the foreseeable future.

Thanks!

Celedhrim commented 5 years ago

it will use more system ressource.

with headless patch , we disable sound engine and graphical rendering. With xpra and pulse audio running for a standard kodi , their is more memory needed yes.

But performance or optimization was never the goal. It's a dirty hack to run a kodi instance on a server ( for scan / upnp/ webinterface) I want to keep docker hub automatic build , and compilation is really too long , I test with a ready build image , but juste the make take more than 2 hours , I tried travis CI , bu job is cancel if take more than 50 min.

So I decide to go another way, it consume more ressource but it solve many things :

matthuisman commented 5 years ago

Yes, memory usage is the biggest downside of the new build. Also cpu usage spikes quite high while starting xpra but seems to settle down.

I posted my suggestion over on the KODI forums: https://forum.kodi.tv/showthread.php?tid=212061&pid=2766750#pid2766750

Pretty much make a new window system in KODI that is basically just "stubs". Gets rid of a bunch of build & runtime dependencies as well.