繁体   English   中英

OpenGL 通过 SSH 连接的问题

[英]Problem with OpenGL through SSH connection

我正在尝试在客户端/服务器模式下使用软件 (Paraview),在我的台式机 (linux, debian 10) 上打开客户端,并在远程服务器 (linux, CentOS 8) 上进行大量计算。 该软件需要 OpenGL 3.2 或更高版本的实现,它应该可以安装在我的机器上,正如您从命令 glxinfo 的 output 中看到的那样:

myaccount@desktopmachine:$ glxinfo | grep OpenGL
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: *GeForce GTX 650 Ti BOOST/PCIe/SSE2 OpenGL core*
profile version string: 4.6.0 NVIDIA 440.82 OpenGL core profile
shading language version string: 4.60 NVIDIA OpenGL core profile
context flags: (none) OpenGL core profile profile mask: core profile
OpenGL core profile extensions: OpenGL version string: 4.6.0 NVIDIA
440.82 OpenGL shading language version string: 4.60 NVIDIA OpenGL context flags: (none) OpenGL profile mask: (none) OpenGL extensions:
OpenGL ES profile version string: **OpenGL ES 3.2** NVIDIA 440.82 OpenGL
ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

问题是,当通过 SSH 连接到远程服务器时,同一命令产生的 OpenGL 是:

myaccount@server:$ glxinfo | grep "OpenGL"
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: *GeForce GTX 650 Ti BOOST/PCIe/SSE2 OpenGL*
version string: **1.4** (2.1.2 NVIDIA 440.82) OpenGL extensions:

所以看起来OpenGL的版本没有正确传输。 我应该怎么做才能解决这个不允许我运行软件的问题?

SSH 隧道 X11。 GLX 是做 OpenGL 的 X11 协议扩展,也是将 OpenGL 调用封装到 X11 中的协议,然后通过 SSH 进行隧道传输。

事情是这样的:

GLX 仅升级到 OpenGL-1.4( https://www.khronos.org/registry/OpenGL/specs/gl/glx1.4.pdf第 49 页)。 超出此范围的所有内容仅由直接渲染上下文支持,而 GLX 仅用于设置上下文,但从那时起,与 OpenGL-3.x 及更高版本相关的所有内容都绕过 GLX 并直接进入驱动程序。

当然,理论上 GLX 可以更新以支持 OpenGL-3 及更高版本。 但没有人打扰。

您现在的选择是在远程端运行所有内容,只传输渲染结果。 理想情况下,这将通过创建无 X、无头 OpenGL 上下文的应用程序来完成,然后将渲染结果复制到 X11 SHM 像素图中(但是,在您的 typical.network 上,性能将很糟糕)。

我的首选解决方案是使用 Xpra,在远程端使用 GPU。

在 ParaView 和 pvserver 的上下文中,您需要使用本地显示,而不是“X11 转发”机制。

连接时不要使用-X-Y ,然后运行DISPLAY=:0 glxinfoDISPLAY=:0 pvserver 在你的服务器上

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM