我在beaglebone背面安装了Ubuntu 14.04(Trusty)。我通过如下vnc会话连接到我的beaglebone black:

在Beaglebone上:vncserver:1 -geometry 1024x768 -depth 24

这是小猎犬骨头上的Xorg配置:
    “监视器”部分
        标识符“内置默认监视器”
    结束部分

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.


我无法弄清楚为什么出现错误[ERROR] [Window]无法使用pygame
    [错误] [窗口]模块引发了一个重要错误:“找不到匹配的GLX视觉对象”

这是因为我通过vncserver运行吗?还是我缺少某些东西(库/模块)
公告板。

我已安装以下软件: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-显示:0-永远-bg-重复-nowf

我没有使用密码文件,它会抱怨这一点……但是现在我可以vnc到我的beagleboard并使用GL运行kivy应用程序。

最佳答案

作者本人回答:


  我发现了问题。 vncserver不提供gl功能,请改用x11vnc。


x11vnc -display :0 -forever -bg -repeat -nowf



  我没有使用密码文件,它会对此抱怨...但是现在我可以vnc到我的beagleboard并使用GL运行kivy应用程序了。

关于python - kivy:模块引发了一个重要错误:“找不到匹配的GLX视觉效果”,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/21804913/

10-12 18:54