Unable to find any valuable Window provider for Raspberry Pi 3b+ console full KMS Kivy?

208 views
Skip to first unread message

zlemonpie

unread,
Jan 2, 2021, 10:33:11 PM1/2/21
to Kivy users support
Hello,
I have a Kivy UI application developed that I would like to run on my raspberry pi 3b+ running raspbian lite (console).
Since the a custom LCD panel is used over DSI,  I need to switch over to use the full KMS module.

I tried running my Kivy application but I get the following error:

[INFO   ] [Kivy        ] v2.0.0
[INFO   ] [Kivy        ] Installed at "/home/pi/kivy/examples/demo/pictures/test2/lib/python3.7/site-packages/kivy/__init__.py"
[INFO   ] [Python      ] v3.7.3 (default, Jul 25 2020, 13:03:44)
[GCC 8.3.0]
[INFO   ] [Python      ] Interpreter at "/home/pi/kivy/examples/demo/pictures/test2/bin/python"
[INFO   ] [Factory     ] 186 symbols loaded
[INFO   ] [Image       ] Providers: img_tex, img_dds, img_sdl2, img_pil (img_ffpyplayer ignored)
[INFO   ] [Window      ] Provider: egl_rpi
[INFO   ] [Window      ] Provider: sdl2(['window_egl_rpi'] ignored)
[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
egl_rpi - BCMDisplayException: Failed to get display size
  File "/home/pi/kivy/examples/demo/pictures/test2/lib/python3.7/site-packages/kivy/core/__init__.py", line 70, in core_select_lib
    cls = cls()
  File "/home/pi/kivy/examples/demo/pictures/test2/lib/python3.7/site-packages/kivy/core/window/__init__.py", line 982, in __init__
    self.create_window()
  File "/home/pi/kivy/examples/demo/pictures/test2/lib/python3.7/site-packages/kivy/core/window/window_egl_rpi.py", line 35, in create_window
    w, h = bcm.graphics_get_display_size(self._rpi_dispmanx_id)
  File "kivy/lib/vidcore_lite/bcm.pyx", line 78, in kivy.lib.vidcore_lite.bcm.graphics_get_display_size

sdl2 - RuntimeError: b''
  File "/home/pi/kivy/examples/demo/pictures/test2/lib/python3.7/site-packages/kivy/core/__init__.py", line 70, in core_select_lib
    cls = cls()
  File "/home/pi/kivy/examples/demo/pictures/test2/lib/python3.7/site-packages/kivy/core/window/window_sdl2.py", line 152, in __init__
    super(WindowSDL, self).__init__()
  File "/home/pi/kivy/examples/demo/pictures/test2/lib/python3.7/site-packages/kivy/core/window/__init__.py", line 982, in __init__
    self.create_window()
  File "/home/pi/kivy/examples/demo/pictures/test2/lib/python3.7/site-packages/kivy/core/window/window_sdl2.py", line 289, in create_window
    self.get_gl_backend_name())
  File "kivy/core/window/_window_sdl2.pyx", line 112, 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

x11 - ModuleNotFoundError: No module named 'kivy.core.window.window_x11'
  File "/home/pi/kivy/examples/demo/pictures/test2/lib/python3.7/site-packages/kivy/core/__init__.py", line 62, in core_select_lib
    fromlist=[modulename], level=0)

[CRITICAL] [App         ] Unable to get a Window, abort.

I installed Kivy via python -m pip install kivy[base] kivy_examples --no-binary kivy
and installed the required dependencies as well (following https://kivy.org/doc/stable/installation/installation-rpi.html#install-source-rpi)

I tried the different combinations of KIVY_WINDOW and KIVY_GL_BACKEND to no avail as well.

Any suggestions?

Thanks!

Pranav Balaji Pooruli

unread,
Jan 2, 2021, 11:03:32 PM1/2/21
to kivy-...@googlegroups.com
I think you should install Raspbian Desktop or Raspbian Desktop with the recommended software. If you just use SSH, how will you be able to see your window? And usually when Kivy says it can't create a window it means you don't have Pygame (pip install pygame) installed. 

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/0c0b6a53-7117-40d4-84a6-c8d1364e5e32n%40googlegroups.com.

zlemonpie

unread,
Jan 2, 2021, 11:49:59 PM1/2/21
to Kivy users support
Yea I was thinking about that as well.
But I was able to run my Kivy application under Raspberry Pi's VC4 and their raspberry pi touch screen without a desktop environment installed.

i'm trying to keep my system minimal. I find that needing to go from desktop environment -> kivy application is somewhat crude. I would just like to have my application run on boot without showing the desktop environment. Any ideas on how to do that?

Alternatively, I think I should install a display server like X? And somehow get Kivy to run the application using X. (Sorry, very new to this and not sure what is the entire workflow)

mjk...@gmail.com

unread,
Jun 3, 2021, 9:18:09 PM6/3/21
to Kivy users support
I don't know what is meant by KMS Kivy but I have set up several RPi over the last few years and all of them boot to the console and then load Kivy.

On the most recent installation:
Python 3.9 compiled and loaded to a virtual environment
Raspberry pi 3B+
I found that setting these...
KIVY_WINDOW and KIVY_GL_BACKEND
environment variables actually made things worse so I just left it alone and don't set those variables in the environment.

There are a lot of steps for installing/compiling the graphics but I think they are all laid out well.  I got the graphics working on this new build but the mouser cursor does not show.

I have a RPi4 working direct to console - I did this one year ago and unfortunately don't remember exactly how I did it :(

Reply all
Reply to author
Forward
0 new messages