首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >基于OpenGL转发的X11渲染

基于OpenGL转发的X11渲染
EN

Unix & Linux用户
提问于 2018-03-12 15:33:28
回答 2查看 33.8K关注 0票数 24

我试图在远程服务器上运行可执行文件,并通过ssh -Y连接到该服务器。我认为可执行文件使用openGL

服务器运行Ubuntu,本地系统运行OSX。

ssh -Y通常通过X11在我的本地计算机上打开一个显示。这适用于其他应用程序(firefox、matlab等)

这一次我收到了这样的信息:

代码语言:javascript
复制
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
X Error of failed request:  GLXBadContext
  Major opcode of failed request:  149 (GLX)
  Minor opcode of failed request:  6 (X_GLXIsDirect)
  Serial number of failed request:  35
  Current serial number in output stream:  34
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  149 (GLX)
  Minor opcode of failed request:  24 (X_GLXCreateNewContext)
  Value in failed request:  0x0
  Serial number of failed request:  34
  Current serial number in output stream:  35

我还运行了glxinfo (我正在尝试在论坛上找到的东西),并得到了这个

代码语言:javascript
复制
name of display: localhost:11.0
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
X Error of failed request:  GLXBadContext
  Major opcode of failed request:  149 (GLX)
  Minor opcode of failed request:  6 (X_GLXIsDirect)
  Serial number of failed request:  23
  Current serial number in output stream:  22

有人能帮忙吗?

谢谢!

EN

回答 2

Unix & Linux用户

发布于 2021-03-31 15:43:41

编辑2021年5月5日:随着XQuartz 2.8.0的发布,配置路径似乎已经从org.macosforge.xquartz.X11更改为org.xquartz.X11。同样的说明仍然适用,如果您来自未来,只需将旧路径替换为新路径即可。

虽然这里的答案是有修正的,但当这个问题每隔一年在我的工作中出现时,我会提交另一个可以供将来参考的答案:)

它经常发生在X转发(通过SSH,码头等)。您需要允许OpenGL绘图(iglx),默认情况下,它在许多X11服务器(比如XQuarts或Ubuntu上的标准X11服务器)上被禁用。与此相关的其他一些日志如下所示。

代码语言:javascript
复制
XRequest.155: GLXBadContext 0x500003a
XRequest.155: BadValue (integer parameter out of range for operation) 0x0
XRequest.155: GLXBadContext 0x500003b
[xcb] Unknown sequence number while processing queue
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
../../src/xcb_io.c:259: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.

修复方法是启用iglx。首先,检查是否有支持此特性的XQuarts版本。这篇文章的最新版本确实如此,但它被废弃了,所以将来可能不会。我的版本是XQuartz 2.7.11 (xorg-server 1.18.4)

接下来,运行defaults write org.macosforge.xquartz.X11 enable_iglx -bool true。您应该能够通过运行

代码语言:javascript
复制
$ defaults read org.macosforge.xquartz.X11
{
    "app_to_run" = "/opt/X11/bin/xterm";
    "cache_fonts" = 1;
    "done_xinit_check" = 1;
    "enable_iglx" = 1; ####### this should be truthy
    "login_shell" = "/bin/sh";
    "no_auth" = 0;
    "nolisten_tcp" = 0;
    "startx_script" = "/opt/X11/bin/startx -- /opt/X11/bin/Xquartz";
}

最后,重新启动x石英(或整个机器)。您可能需要重新运行xhost +来禁用安全性和身份验证(对于孤立的机器来说很好,对于互联网公开是危险的)。您现在应该能够按照预期运行GUI应用程序了。希望这能有所帮助!

票数 11
EN

Unix & Linux用户

发布于 2020-09-17 00:03:08

我在Mojave上使用了默认值;在一个终端应用程序中编写org.macports.X11 enable_iglx -bool true,然后在同一个终端上运行X石英+扩展GLX`。

然后,我可以运行玻璃齿轮和光栅工作,但它把显示器扔到我的外部显示器的左上角(而不是默认/视网膜显示),不绘制任何框架来调整大小/移动它。

这让我想起了我对Nvidia显卡的糟糕的驱动支持,并试图在1990年运行Linux桌面,S :)

我查了一下freedesktop.org bug回购,现在还没有看到X石英/X11支持Retina显示。有几个黑客,但这让我想起几年前在我的Mac电脑上运行Wireshark是多么笨拙。我只想让X11转发工作正常,在这里重绘帧不需要3到5分钟。请参阅https://gitlab.freedesktop.org/xorg/xserver/-/issues/187

票数 1
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/429760

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档