损坏的 OpenGL:glxinfo 和 inxi 中的错误 GLX 渲染器(Nvidia 而不是 Intel)

损坏的 OpenGL:glxinfo 和 inxi 中的错误 GLX 渲染器(Nvidia 而不是 Intel)

我花了一整天时间试图解决这个问题,我希望这个友好论坛中的某个人可以提供帮助:

我正在运行以下设置:

Distribution: Ubuntu 14.04.01 
Kernel: 3.13.0-43-generic
Hardware: Intel Core i7-3840QM CPU with integrated Intel HD Graphics IvyBridge GPU

当我运行 glxinfo 时,我得到:

$ glxinfo                                                                                                                   
name of display: localhost:10.0
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
display: localhost:10  screen: 0
direct rendering: No (If you want to find out why, try setting LIBGL_DEBUG=verbose)
server glx vendor string: NVIDIA Corporation
server glx version string: 1.4
server glx extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_profile, 
    GLX_ARB_create_context_robustness, GLX_ARB_fbconfig_float, 
    GLX_ARB_multisample, GLX_EXT_buffer_age, 
    GLX_EXT_create_context_es2_profile, GLX_EXT_create_context_es_profile, 
    GLX_EXT_framebuffer_sRGB, GLX_EXT_swap_control, GLX_EXT_swap_control_tear, 
    GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, GLX_EXT_visual_rating, 
    GLX_NV_float_buffer, GLX_NV_multisample_coverage, GLX_SGIX_fbconfig, 
    GLX_SGIX_pbuffer, GLX_SGI_swap_control, GLX_SGI_video_sync
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
client glx extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_profile, 
    GLX_ARB_create_context_robustness, GLX_ARB_fbconfig_float, 
    GLX_ARB_framebuffer_sRGB, GLX_ARB_get_proc_address, GLX_ARB_multisample, 
    GLX_EXT_buffer_age, GLX_EXT_create_context_es2_profile, 
    GLX_EXT_fbconfig_packed_float, GLX_EXT_framebuffer_sRGB, 
    GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, 
    GLX_EXT_visual_rating, GLX_INTEL_swap_event, GLX_MESA_copy_sub_buffer, 
    GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer, 
    GLX_MESA_swap_control, GLX_OML_swap_method, GLX_OML_sync_control, 
    GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, 
    GLX_SGIX_visual_select_group, GLX_SGI_make_current_read, 
    GLX_SGI_swap_control, GLX_SGI_video_sync
GLX version: 1.4
GLX extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_profile, 
    GLX_ARB_create_context_robustness, GLX_ARB_fbconfig_float, 
    GLX_ARB_framebuffer_sRGB, GLX_ARB_get_proc_address, GLX_ARB_multisample, 
    GLX_EXT_buffer_age, GLX_EXT_create_context_es2_profile, 
    GLX_EXT_framebuffer_sRGB, GLX_EXT_import_context, 
    GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, GLX_EXT_visual_rating, 
    GLX_MESA_multithread_makecurrent, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, 
    GLX_SGI_make_current_read, GLX_SGI_swap_control, GLX_SGI_video_sync
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVS 5100M/PCIe/SSE2
OpenGL version string: 1.4 (2.1.2 NVIDIA 331.113)
[...]

问题似乎出在上面以下两行:

server glx vendor string: NVIDIA Corporation
[...]
client glx vendor string: Mesa Project and SGI

事实上,此安装从未安装过 Nvidia 显卡/驱动程序。所以不知道为什么我在这里有 nVidia 引用。以下是一些可能有帮助的信息:

$ lshw -C 视频

  *-display               
       description: VGA compatible controller
       product: 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:47 memory:f7800000-f7bfffff memory:e0000000-efffffff ioport:f000(size=64)

$ dpkg -l英伟达

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                         Version             Architecture        Description
+++-============================-===================-===================-==============================================================
un  libgl1-nvidia-alternatives   <none>              <none>              (no description available)
un  nvidia-libopencl1-dev        <none>              <none>              (no description available)
un  nvidia-va-driver             <none>              <none>              (no description available)
un  nvidia-vdpau-driver          <none>              <none>              (no description available)

$ inxi-G

Graphics:  Card: Intel 3rd Gen Core processor Graphics Controller 
           X.Org: 1.15.1 drivers: intel (unloaded: fbdev,vesa) Resolution: [email protected], [email protected] 
           GLX Renderer: NVS 5100M/PCIe/SSE2 GLX Version: 1.4 (2.1.2 NVIDIA 331.113)

非常感谢任何有关如何摆脱 nvidia/NVS 引用的帮助!

问候

答案1

OpenGL 使用间接渲染,将数据发送回您的本地系统以便在本地进行呈现,并且它会检测并列出该硬件而不是您服务器上的硬件。

我也有同样的困惑,但服务器中有一块 Nvidia 卡,检测到的是 AMD 卡。以下是来自 glxinfo 的相关部分:

$ glxinfo | egrep 'direct|client|server|OpenGL'
direct rendering: No (If you want to find out why, try setting LIBGL_DEBUG=verbose)
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
client glx vendor string: NVIDIA Corporation
client glx version string: 1.4
client glx extensions:
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: AMD Radeon HD 6770M OpenGL Engine
OpenGL version string: 1.4 (2.1 ATI-1.24.38)
OpenGL extensions:

我的系统中根本没有 AMD 硬件,所以我也很困惑,直到我意识到我的本地系统拥有 Radeon HD 6770M。当 glxinfo 报告客户端和服务器时,它看起来就像 X 一样定义它们;服务器是运行 $DISPLAY 中指向的 X 服务器的主机,而客户端是运行 glxinfo 的主机。因此,即使如您所说,服务器计算机上没有 X 服务器,但仍有一个正在运行并通过网络被 glxinfo 查询的服务器。我猜您的本地系统上确实有运行 X 的 Nvidia 硬件。

作为一个实验,您可以尝试在未指定显示的情况下运行 glxinfo,您会发现它甚至无法工作:

$ DISPLAY="" glxinfo
Error: unable to open display

如果您在远程服务器上运行 X 服务器,将其配置为使用直接渲染,并使用 VNC 之类的工具与 X 交互,则可以在服务器上使用硬件加速。在这种情况下,它只会将完成的图像发送到您的本地系统。

这是一个旧帖子,但相关概念:

https://serverfault.com/questions/174003/how-can-opengl-graphics-be-displayed-remotely-using-vnc

此页面也提到了 x11vnc:

https://help.ubuntu.com/community/VNC/Servers

相关内容