如何使用 Nvidia (1050Ti) 在 Ubuntu 18.04 上启用“AllowIndirectGLX”

Oli*_* R. 7 ssh nvidia xorg graphics 18.04

以下场景:我喜欢通过“ssh -X”从仅远程 cli 的服务器(带有 matrox 显卡)运行 opengl 应用程序。我的本地机器运行带有 Nvidia 显卡的 Ubuntu 18.04。我已经谷歌搜索并发现,我需要在本地启用“AllowIndirectGLX”。不幸的是,我还没有找到如何以正确的方式做到这一点。

似乎有两种可能性:
1. 将 '"AllowIndirectGLX" = "on"' 添加到某些 xorg.conf。
2. 在 Xorg 命令中添加“+iglx”作为启动参数。

问题:“/etc/X11”下没有“xorg.conf”。与此接近的唯一文件是“/usr/share/X11/xorg.conf.d/10-nvidia.conf”。对于解决方案 2,我最好的猜测是“/usr/bin/Xorg”。但也许我需要为 GDM 配置设置这个?

我想避免无休止的跟踪和错误会话。希望大家帮帮忙!

先感谢您!

小智 2

正如 @NightwishFan 对这个问题的回答中提到的,您必须创建一个 xorg.conf 文件。

“启动进入恢复模式并选择 Root Shell。然后运行:

X -configure

其次是

cp /root/xorg.conf.new /etc/X11/xorg.conf

重新启动后,使用任何文本编辑器打开这个新创建的 xorg.conf 文件(如果需要,请使用 sudo)并添加

Section "ServerFlags" Option "AllowIndirectGLX" "on" Option "IndirectGLX" "on" EndSection

是您可能会觉得有用的 NVidia 线程。

希望能帮助到你。