我有一台配备 NVIDIA GeForce 的机器不用于显示目的(即显示器未连接到它),以及一些平淡的板载图形芯片。 (您将在下面找到相关lshw
列表。)
我的 X 会话运行得很好;但是当我的大多数 X 应用程序(需要任何花哨的 GFX 或工具包)运行时,它们会发出以下错误消息:
Xlib: extension "GLX" missing on display ":0".
我的问题是:如何让我的应用程序注意到非 NVIDIA GLX 库并使用它(无需移除 NVIDIA 卡,当然也无需将显示器切换到其输出端口)?
我正在使用 Debian/Linux Stretch 64 位、内核版本 4.2.6 和 LXDE。
输出lshw -c display
:
*-display
description: VGA compatible controller
product: GK106 [GeForce GTX 650 Ti Boost]
vendor: NVIDIA Corporation
physical id: 0
bus info: pci@0000:02:00.0
version: a1
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
configuration: driver=nvidia latency=0
resources: irq:17 memory:f6000000-f6ffffff memory:e0000000-e7ffffff memory:e8000000-e9ffffff ioport:e000(size=128) memory:f7000000-f707ffff
*-display
description: VGA compatible controller
product: Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller
vendor: Intel Corporation
physical id: 2
bus info: pci@0000:00:02.0
version: 09
width: 64 bits
clock: 33MHz
capabilities: msi pm vga_controller bus_master cap_list rom
configuration: driver=i915 latency=0
resources: irq:30 memory:f7400000-f77fffff memory:d0000000-dfffffff ioport:f000(size=64)
输出glxinfo
:
Xlib: extension "GLX" missing on display ":0".
Xlib: extension "GLX" missing on display ":0".
Xlib: extension "GLX" missing on display ":0".
Xlib: extension "GLX" missing on display ":0".
Xlib: extension "GLX" missing on display ":0".
Xlib: extension "GLX" missing on display ":0".
Xlib: extension "GLX" missing on display ":0".
Error: couldn't find RGB GLX visual or fbconfig
Xlib: extension "GLX" missing on display ":0".
Xlib: extension "GLX" missing on display ":0".
Xlib: extension "GLX" missing on display ":0".
Xlib: extension "GLX" missing on display ":0".
Xlib: extension "GLX" missing on display ":0".
Xlib: extension "GLX" missing on display ":0".
Xlib: extension "GLX" missing on display ":0".
Xlib: extension "GLX" missing on display ":0".
Xlib: extension "GLX" missing on display ":0".
Xlib: extension "GLX" missing on display ":0".
输出cat /var/log/Xorg.0.log | grep glx
:
[ 19.287] (II) LoadModule: "glx"
[ 19.787] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[ 22.727] (II) Module glx: vendor="X.Org Foundation"
附加信息:
答案1
nvidia-current
我从软件包存储库安装后到达这里,并得到了陷入登录循环。我查看了登录~/.xsession-errors
并发现了上述错误:
Xlib: extension "GLX" missing on display ":0".
我已经卸载了nvidia-current
,问题依然存在。我的也没有glx-alternative-nvidia
安装过。作为最后的手段,我只是卸载了nvidia
Ubuntu 上的所有内容(包括 CUDA 的东西),并且在重新启动后它就可以工作了。
答案2
首先确定正在使用哪个 glx 模块:
$ cat /var/log/Xorg.0.log | grep glx
[ 3.622] (II) LoadModule: "glx"
[ 3.624] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[ 3.705] (II) Module glx: vendor="NVIDIA Corporation"
在 Debian 8 Jessie 中,我的解决方案是删除glx-alternative-nvidia
package.json。所以重启后:
$ cat /var/log/Xorg.0.log | grep glx
[ 3.581] (II) LoadModule: "glx"
[ 3.582] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[ 3.592] (II) Module glx: vendor="X.Org Foundation"
$ glxinfo | grep "OpenGL renderer"
OpenGL renderer string: Mesa DRI Intel(R) Haswell Desktop
答案3
我通过卸载 glx-alternative-nvidia 解决了这个问题
apt-get remove glx-alternative-nvidia