0

我有一个 Kivy 应用程序在 Raspberry Pi3/ArchLinux(无桌面)上运行良好。我现在正试图将应用程序移动到运行 Buster Lite 的 Pi4 上。我已按照此处kivy.org 上发布的指南/注释(我相信是忠实的)进行操作,尤其是关于从源代码编译 sdl2 的部分,并设置了 kmsdrm 选项。

然而,kivy 报告说它“无法找到任何有价值的窗口提供商”。

[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.

我已经尝试了 raspi-config 中 gl 驱动程序的两个可用设置 - G1 Legacy 和 G2 GL (Fake KMS),但是这两个选项都没有提供改进。

如果有人能指出我做错了什么,或者就如何解决问题提供建议,我将不胜感激。

编辑:

INFO 消息有点令人困惑 - 这样做:

[INFO ] [Window ] Provider: sdl2(['window_egl_rpi'] ignored)

意味着完全忽略了 sdl2 Window 提供程序?如果是这样,那将解释我的问题。我将如何防止 sdl2 被忽略?

4

1 回答 1

0

我建议您尝试使用 Kivy 2.0。我猜最新的是 Kivy 2.0.0rc3。检查:https ://kivy.org/doc/master/installation/installation-rpi.html 。

于 2020-07-30T06:41:19.400 回答