我在beaglebone背面安装了Ubuntu 14.04(Trusty)。我通过像这样的vnc会话连接到我的beaglebone black:
On Beaglebone:vncserver:1 -geometry 1024x768 -depth 24
以下是beagle bone上的Xorg配置: “监视器”部分 标识符“内置默认监视器” EndSection
Section "Device"
Identifier "Builtin Default fbdev Device 0"
Driver "modesetting"
Option "HWcursor" "false"
EndSection
Section "Screen"
Identifier "Builtin Default fbdev Screen 0"
Device "Builtin Default fbdev Device 0"
Monitor "Builtin Default Monitor"
DefaultDepth 24
Option "AddARGBGLXVisuals" "True"
EndSection
Section "ServerLayout"
Identifier "Builtin Default Layout"
Screen "Builtin Default fbdev Screen 0"
EndSection
Section "Module"
Load "extmod"
Load "glx"
EndSection
当我运行我的kivy程序时,我收到以下消息:
[INFO ] Kivy v1.7.2
[INFO ] [Logger ] Record log in /home/ubuntu/.kivy/logs/kivy_14-02-15_24.txt
[INFO ] [Factory ] 144 symbols loaded
[DEBUG ] [Cache ] register <kv.lang> with limit=None, timeout=Nones
[DEBUG ] [Cache ] register <kv.image> with limit=None, timeout=60s
[DEBUG ] [Cache ] register <kv.atlas> with limit=None, timeout=Nones
[INFO ] [Image ] Providers: img_tex, img_dds, img_pygame, img_gif (img_pil ignored)
[DEBUG ] [Cache ] register <kv.texture> with limit=1000, timeout=60s
[DEBUG ] [Cache ] register <kv.shader> with limit=1000, timeout=3600s
[DEBUG ] [App ] Loading kv <./setupmyprogram.kv>
[DEBUG ] [Window ] Ignored <egl_rpi> (import error)
[INFO ] [Window ] Provider: pygame(['window_egl_rpi'] ignored)
[WARNING] [WinPygame ] Video: failed (multisamples=2)
[WARNING] [WinPygame ] trying without antialiasing
[ERROR ] [Window ] Unable to use pygame
[ERROR ] [Window ] The module raised an important error: "Couldn't find matching GLX visual"
Traceback (most recent call last):
File "./setupmyprogram.py", line 55, in <module>
SetupMyProgramAPP().run()
File "/usr/lib/python2.7/dist-packages/kivy/app.py", line 576, in run
self.load_kv(filename=self.options.get('kv_file'))
File "/usr/lib/python2.7/dist-packages/kivy/app.py", line 399, in load_kv
root = Builder.load_file(filename)
File "/usr/lib/python2.7/dist-packages/kivy/lang.py", line 1323, in load_file
return self.load_string(data, **kwargs)
File "/usr/lib/python2.7/dist-packages/kivy/lang.py", line 1384, in load_string
widget = Factory.get(parser.root.name)()
File "/usr/lib/python2.7/dist-packages/kivy/uix/widget.py", line 151, in __init__
EventLoop.ensure_window()
File "/usr/lib/python2.7/dist-packages/kivy/base.py", line 111, in ensure_window
import kivy.core.window
File "/usr/lib/python2.7/dist-packages/kivy/core/window/__init__.py", line 983, in <module>
), True)
File "/usr/lib/python2.7/dist-packages/kivy/core/__init__.py", line 57, in core_select_lib
cls = cls()
File "/usr/lib/python2.7/dist-packages/kivy/core/window/__init__.py", line 468, in __init__
self.create_window()
File "/usr/lib/python2.7/dist-packages/kivy/core/window/window_pygame.py", line 128, in create_window
raise CoreCriticalException(e.message)
kivy.core.CoreCriticalException: Couldn't find matching GLX visual
[INFO ] Kivy v1.7.2
[INFO ] [Logger ] Record log in /home/ubuntu/.kivy/logs/kivy_14-02-15_25.txt
[INFO ] [Factory ] 144 symbols loaded
[DEBUG ] [Cache ] register <kv.image> with limit=None, timeout=60s
[DEBUG ] [Cache ] register <kv.atlas> with limit=None, timeout=Nones
[INFO ] [Image ] Providers: img_tex, img_dds, img_pygame, img_gif (img_pil ignored)
[DEBUG ] [Cache ] register <kv.texture> with limit=1000, timeout=60s
[DEBUG ] [Cache ] register <kv.shader> with limit=1000, timeout=3600s
[DEBUG ] [Cache ] register <kv.lang> with limit=None, timeout=Nones
[INFO ] [Text ] Provider: pygame
[DEBUG ] [App ] Loading kv <./myapplication.kv>
[DEBUG ] [Window ] Ignored <egl_rpi> (import error)
[INFO ] [Window ] Provider: pygame(['window_egl_rpi'] ignored)
[WARNING] [WinPygame ] Video: failed (multisamples=2)
[WARNING] [WinPygame ] trying without antialiasing
[ERROR ] [Window ] Unable to use pygame
[ERROR ] [Window ] The module raised an important error: "Couldn't find matching GLX visual"
Exception kivy.core.CoreCriticalException: CoreCriticalException("Couldn't find matching GLX visual",) in 'kivy.properties.dpi2px' ignored
[DEBUG ] [Window ] Ignored <egl_rpi> (import error)
[INFO ] [Window ] Provider: pygame(['window_egl_rpi'] ignored)
[WARNING] [WinPygame ] SDL wrapper failed to import!
[DEBUG ] [Window ] Ignored <sdl> (import error)
[DEBUG ] [Window ] Ignored <x11> (import error)
[CRITICAL] [Window ] Unable to find any valuable Window provider at all!
[CRITICAL] [App ] Unable to get a Window, abort.
我无法弄清楚为什么我收到错误[错误] [Window]无法使用pygame [错误] [窗口]模块引发了一个重要错误:“无法找到匹配的GLX visual”
这是因为我正在运行vncserver吗?或者我遗漏了一些东西(libs / modules) 的BeagleBoard。
我安装了以下内容:libgl1-mesa-glx:armhf libswt-glx-gtk-3-jni libxcb-glx0:armhf libva-glx1:armhf libqt5opengl5:armhf
另外,当我执行以下操作时,我得到关于GLX visual的相同错误:
ubuntu@arm:~$ python
Python 2.7.6 (default, Jan 12 2014, 08:42:26)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygame
>>> pygame.display.init()
>>> pygame.display.set_mode((640, 480), pygame.HWSURFACE|pygame.OPENGL|pygame.DOUBLEBUF)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
pygame.error: Couldn't find matching GLX visual
>>>
>>> pygame.version.ver
'1.9.1release'
>>>
提前感谢您的帮助!
更新:Stackexchange不会让我回答我自己的问题......所以用解决方案更新我的问题:
我发现了这个问题。 vncserver不提供gl功能,而是使用x11vnc。
x11vnc -display:0 -forever -bg -repeat -nowf
我没有使用密码文件,它会抱怨这个...但现在我可以使用我的beagleboard并使用GL运行kivy应用程序。
答案 0 :(得分:3)
作者自己回答:
我发现了这个问题。 vncserver不提供gl功能,而是使用x11vnc。
x11vnc -display :0 -forever -bg -repeat -nowf
我没有使用密码文件,它会抱怨这个...但现在我可以使用我的beagleboard并使用GL运行kivy应用程序。