I have a Kivy App running satisfactorily on Raspberry Pi3/ArchLinux (without desktop). I am now attempting to move the App onto a Pi4 running Buster Lite. I have followed the guide/notes (faithfully, I believe) posted at kivy.org here, particularly the part about compiling sdl2 from source, with the kmsdrm option set.
However, kivy reports that it is 'unable to find any valuable window provider'.
[INFO ] [Logger ] Record log in /root/.kivy/logs/kivy_20-07-11_22.txt
[INFO ] [Kivy ] v1.11.1
[INFO ] [Kivy ] Installed at "/root/.local/lib/python3.7/site-packages/kivy/__init__.py"
[INFO ] [Python ] v3.7.3 (default, Dec 20 2019, 18:57:59)
[GCC 8.3.0]
[INFO ] [Python ] Interpreter at "/usr/bin/python3"
[INFO ] [Factory ] 184 symbols loaded
[DEBUG ] [Cache ] register <kv.lang> with limit=None, timeout=None
[DEBUG ] [Cache ] register <kv.image> with limit=None, timeout=60
[DEBUG ] [Cache ] register <kv.atlas> with limit=None, timeout=None
[INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_pil, img_gif (img_ffpyplayer ignored)
[DEBUG ] [Cache ] register <kv.texture> with limit=1000, timeout=60
[DEBUG ] [Cache ] register <kv.shader> with limit=1000, timeout=3600
[DEBUG ] [Text ] Provider <pango> ignored by config
[INFO ] [Text ] Provider: sdl2(['text_pango'] ignored)
[DEBUG ] [Window ] Provider <egl_rpi> ignored by config
[INFO ] [Window ] Provider: sdl2(['window_egl_rpi'] ignored)
[DEBUG ] [Window ] Provider <x11> ignored by config
[CRITICAL] [Window ] Unable to find any valuable Window provider. Please enable debug logging (e.g. add -d if running from the command line, or change the log level in the config) and re-run your app to identify potential causes
sdl2 - RuntimeError: b'No available video device'
File "/root/.local/lib/python3.7/site-packages/kivy/core/__init__.py", line 71, in core_select_lib
cls = cls()
File "/root/.local/lib/python3.7/site-packages/kivy/core/window/window_sdl2.py", line 152, in __init__
super(WindowSDL, self).__init__()
File "/root/.local/lib/python3.7/site-packages/kivy/core/window/__init__.py", line 981, in __init__
self.create_window()
File "/root/.local/lib/python3.7/site-packages/kivy/core/window/window_sdl2.py", line 290, in create_window
self.get_gl_backend_name())
File "kivy/core/window/_window_sdl2.pyx", line 110, in kivy.core.window._window_sdl2._WindowSDL2Storage.setup_window
File "kivy/core/window/_window_sdl2.pyx", line 74, in kivy.core.window._window_sdl2._WindowSDL2Storage.die
[CRITICAL] [App ] Unable to get a Window, abort.
I have tried the two available settings for the gl driver in raspi-config - G1 Legacy and G2 GL (Fake KMS), but neither option offers an improvement.
If anyone can identify what I've done wrong, or offer advice on how to resolve the problem, I would be very grateful.
Edit:
The INFO messages are a little confusing - does this:
[INFO ] [Window ] Provider: sdl2(['window_egl_rpi'] ignored)
mean that the sdl2 Window provider is ignored completely? If so, that would explain my problem. How would I prevent sdl2 from being ignored?
I suggest you to try with Kivy 2.0. I guess the latest one is Kivy 2.0.0rc3. Check: https://kivy.org/doc/master/installation/installation-rpi.html.