Kodi Community Forum

Full Version: How to make screensavers see GL ES 3.10 and run?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, I am a newbe to Kodi. I compiled Kodi v19 RC1 and addons, on RPI4 8GB / Raspberry OS. Raspberry OS is in the most recent version I was able to find.
I also compiled all add-ons.
Kodi plays videos ok, but when I try tu run screensaver (any of them, but for example microcosm) the screen becomes black and the screensaver does not run. It is after I press Preview on Kodi's screesaver selection screen. Then I can only press some button on the remote to return from black screen to Kod.

There is an error in ~pi/.kodi/temp/kodi.log (the log's fragment is short so I hope it is acceptable to post it here):

Code:
2021-01-19 00:23:46.590 T:861      INFO <general>: Loading skin file: Settings.xml, load type: KEEP_IN_MEMORY
2021-01-19 00:23:49.887 T:861      INFO <general>: Loading skin file: SettingsCategory.xml, load type: KEEP_IN_MEMORY
2021-01-19 00:23:54.465 T:861      INFO <general>: Loading skin file: DialogSelect.xml, load type: KEEP_IN_MEMORY
2021-01-19 00:24:02.255 T:861     ERROR <general>: AddOnLog: screensaver.microcosm.biof: CVertexShader::Compile: 0:1(10): error: GLSL 1.30 is not supported. Supported versions are: 1.00 ES, 3.00 ES, and 3.10 ES
                                                   
2021-01-19 00:24:02.255 T:861     ERROR <general>: AddOnLog: screensaver.microcosm.biof: GL: Error compiling vertex shader
2021-01-19 00:24:12.857 T:861      INFO <general>: ADDON: Dll Destroyed - Microcosm
2021-01-19 00:24:52.388 T:861      INFO <general>: Loading skin file: DialogButtonMenu.xml, load type: KEEP_IN_MEMORY
2021-01-19 00:24:59.465 T:861      INFO <general>: Stopping player

As you see the screensaver (any of them) probably (if I understand correctly) does not see GL ES 3.10 but sees GLSL 1.30 instead.
But here is output from glxinfo:
Code:
pi@raspberrypi:~ $ glxinfo | grep -i "gl es"
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 19.3.2
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
OpenGL ES profile extensions:
And:
pi@raspberrypi:~ $ glxinfo | grep "OpenGL version"
OpenGL version string: 2.1 Mesa 19.3.2

So I suppose GL ES 3.10 is there?

Also, when I run (without X running): 
Code:
kmscube -D /dev/dri/card1

it starts correctly and displays an animated cube and it writes in teminal:
Code:
(...)
OpenGL ES 2.x information:
  version: "OpenGL ES 3.1 Mesa 19.3.2"
  shading language version: "OpenGL ES GLSL ES 3.10"
  vendor: "Broadcom"
  renderer: "V3D 4.2"
  
Please help me make screesavers see GL ES 3.1 (3.10) and run. I have no experience in setting up Kodi or GL ES and only followed instructions from www.
Screensaver uses OpenGL, your rpi uses OpenGL ES. GLES is more common in embedded devices (eg arm) and is a subset of GL which is used in desktop class chips (eg Intel/amd).

You need to us a screensaver that supports OpenGL ES, and not OpenGL essentially
(2021-01-19, 04:37)Fuzzard Wrote: [ -> ]You need to us a screensaver that supports OpenGL ES, and not OpenGL essentially

Try shadertoy.
(2021-01-19, 13:12)popcornmix Wrote: [ -> ]Try shadertoy.

Thanks for response. Following your suggestion I set Shadertoy Screenservers as my screensaver. However it does not work either and gives the similar errors in kodi.log:

Code:
2021-01-19 19:46:14.837 T:1502     INFO <general>: Loading skin file: DialogAddonInfo.xml, load type: KEEP_IN_MEMORY
2021-01-19 19:48:04.456 T:1502     INFO <general>: Loading skin file: Settings.xml, load type: KEEP_IN_MEMORY
2021-01-19 19:48:08.269 T:1502     INFO <general>: Loading skin file: SettingsCategory.xml, load type: KEEP_IN_MEMORY
2021-01-19 19:48:14.587 T:1502    ERROR <general>: AddOnLog: screensaver.shadertoy: CVertexShader::Compile: 0:1(10): error: GLSL 1.50 is not supported. Supported versions are: 1.00 ES, 3.00 ES, and 3.10 ES
                                                   
2021-01-19 19:48:14.587 T:1502    ERROR <general>: AddOnLog: screensaver.shadertoy: GL: Error compiling vertex shader
2021-01-19 19:48:14.587 T:1502    ERROR <general>: AddOnLog: screensaver.shadertoy: Failed to compile shadertoy shaders (current shadertoy file '/usr/local/share/kodi/addons/screensaver.shadertoy//resources/shaders/main_test.frag.glsl')
2021-01-19 19:48:14.624 T:1502    ERROR <general>: AddOnLog: screensaver.shadertoy: CVertexShader::Compile: 0:1(10): error: GLSL 1.50 is not supported. Supported versions are: 1.00 ES, 3.00 ES, and 3.10 ES
                                                   
2021-01-19 19:48:14.624 T:1502    ERROR <general>: AddOnLog: screensaver.shadertoy: GL: Error compiling vertex shader
2021-01-19 19:48:14.624 T:1502    ERROR <general>: AddOnLog: screensaver.shadertoy: Failed to compile shadertoy shaders (current shadertoy file '/usr/local/share/kodi/addons/screensaver.shadertoy//resources/shaders/startunnel.frag.glsl')
2021-01-19 19:48:14.682 T:1502    ERROR <general>: AddOnLog: screensaver.shadertoy: CVertexShader::Compile: 0:1(10): error: GLSL 1.50 is not supported. Supported versions are: 1.00 ES, 3.00 ES, and 3.10 ES   

If your read my initial post in this thread, it seems that GL 3.10 ES is installed and works. But not with this screensaver. My raspberry OS is most likely 32 bit. Before compiling and installing, I configured Kodi with this command:

Code:
cmake ../kodi -DCMAKE_INSTALL_PREFIX=/usr/local -DCORE_PLATFORM_NAME=x11 -DAPP_RENDER_SYSTEM=gles -DENABLE_INTERNAL_FMT=ON -DENABLE_INTERNAL_FLATBUFFERS=ON -DENABLE_TESTING=OFF -DENABLE_INTERNAL_SPDLOG=ON 

May it be "solved" on RPI4 / Kodi 19 RC1? I mean getting screensavers work, at least Shadertoy?
(2021-01-19, 21:16)Ravenik Wrote: [ -> ]May it be "solved" on RPI4 / Kodi 19 RC1? I mean getting screensavers work, at least Shadertoy?

It works for me. Might be worth testing with a LibreELEC nightly build.
I see you are building for x11 which isn't recommended (the cost of getting video content into x windows limits performance).
A gbm build is recommended for Pi.
(2021-01-21, 13:32)popcornmix Wrote: [ -> ]A gbm build is recommended for Pi.

As suggested, I now compiled 19RC1 for gbm, without x11. I started from a clean Raspberry OS, added packages, etc.

Shadertoy screensaver and other screensavers still won't start. The same errors occur. In log:
Code:
2021-01-22 00:47:16.076 T:640 ERROR <general>: AddOnLog: screensaver.shadertoy: CVertexShader::Compile: 0:1(10): error: GLSL 1.50 is not supported. Supported versions are: 1.00 ES, 3.00 ES, and 3.10 ES
2021-01-22 00:47:16.082 T:640 ERROR <general>: AddOnLog: screensaver.shadertoy: GL: Error compiling vertex shader
2021-01-22 00:47:16.082 T:640 ERROR <general>: AddOnLog: screensaver.shadertoy: Failed to compile shadertoy shaders (current shadertoy file '/usr/local/share/kodi/addons/screensaver.shadertoy//resources/shaders/main_test.frag.glsl')
2021-01-22 00:47:16.260 T:640 ERROR <general>: AddOnLog: screensaver.shadertoy: CVertexShader::Compile: 0:1(10): error: GLSL 1.50 is not supported. Supported versions are: 1.00 ES, 3.00 ES, and 3.10 ES

Kodi in "system info" says that I have "OpenGL version: OpenGL ES 3.1 Mesa 19.3.2.", "Window system: Gbm".
Kmscube runs.

Are my clone- and configuration commands correct for Raspberry OS / Pi 4 8GB?:
bash:
cd ~
mkdir src
cd src
mkdir kodi-build
git clone https://github.com/xbmc/xbmc kodi
cd kodi
sudo make -C tools/depends/target/crossguid PREFIX=/usr/local
sudo make -C tools/depends/target/flatbuffers PREFIX=/usr/local
sudo make -C tools/depends/target/libfmt PREFIX=/usr/local
sudo make -C tools/depends/target/libspdlog PREFIX=/usr/local
cd ../kodi-build
cmake ../kodi -DCMAKE_INSTALL_PREFIX=/usr/local -DCORE_PLATFORM_NAME=gbm -DCORE_SYSTEM_NAME=linux -DGBM_RENDER_SYSTEM=gles -DAPP_RENDER_SYSTEM=gles -DENABLE_INTERNAL_FMT=ON -DENABLE_INTERNAL_FLATBUFFERS=ON -DENABLE_TESTING=OFF -DENABLE_INTERNAL_SPDLOG=ON
cmake --build . -- VERBOSE=1 -j$(getconf _NPROCESSORS_ONLN)
sudo make install
cd $HOME/src/kodi
sudo make -j$(getconf _NPROCESSORS_ONLN) -C tools/depends/target/binary-addons PREFIX=/usr/local

Any suggestions what to change in the above scenario are welcome.

Kodi works, video playback smooth, Simple IPTV PVR displays video smoothly from cable-tv tuner. It is all better than in compilation for X-widows. Only problem, that any of screensavers/visualisations wont work. Only black screen and dim screensavers.

I usually listen to a lot of music, so I wont visualisations and screensavers (at least Shadertoy).

I may wait for official package for Raspberry OS, however for some reasons I would much rather prefer self-compiled version.
Got this shadertoy screensaver working  Smile . But this is crazy. I copied "screensaver.shadertoy/*" from libreelec distribution to Raspberry OS, directory: /usr/local/lib/kodi/addons/screensaver.shadertoy on Raspberry OS. On libreelec I have additionally: "addon.xml" file and "resources" directory and different screensaver.shadertoy.so.3.2.0 - which I all copied to Raspberry OS.

Do developers read this forum? Please, make these addons and visualisations work correctly after compiling on Raspberry OS, or say how to configure & compile correctly - correct abovesaid scenario's steps.
(2021-01-23, 04:31)Ravenik Wrote: [ -> ]Do developers read this forum? Please, make these addons and visualisations work correctly after compiling on Raspberry OS, or say how to configure & compile correctly - correct abovesaid scenario's steps.

I'd ask for my money back if I were you!