Ubuntu 12.10 OpenCL OpenGL 与 ATI 显卡互操作

Ubuntu 12.10 OpenCL OpenGL 与 ATI 显卡互操作

我已成功在运行 Ubuntu 12.10 的 ATI 混合图形系统上安装了 ATI Catalyst 驱动程序。我已验证 OpenCL 和 OpenGL 可以独立工作;但是 OpenCL-OpenGL 互操作无法正常运行。我进行了一些调试,但不确定下一步该怎么做。有人能帮忙吗?

细节:

我的系统是 HP Envy 6,运行 Ubuntu 12.10(已应用所有更新),配有由 Radeon 7600m 和 Intel HD3000 组成的 ATI 混合显卡系统。我按照以下说明安装了最新的 ATI Beta 驱动程序(v. 12.11):

如何让 AMD/Intel 混合显卡驱动程序正常工作?

通过这样做,我能够让 OpenGL 和 OpenCL 正常运行。 glxgears以 ~1200 fps 的速度运行,并且 AMD APP SDK 中的所有 OpenCL 专用示例都按预期运行。但是,任何 OpenCL-OpenGL 互操作应用程序都无法启动并出现错误X Error of failed request: BadMatch (invalid parameter attributes)。所有示例代码之前都在 Ubuntu 12.04 下使用包管理器 ATI 驱动程序运行。

为了获取更多调试信息,我运行了LIBGL_DEBUG=verbose /opt/AMDAPP/samples/opencl/bin/x86_64/SimpleGL。这将检测我的独立 GPU,似乎选择了正确的驱动程序,并检测到已启用 OpenCL-OpenGL 互操作:

$ LIBGL_DEBUG=verbose ./SimpleGL
ukiDynamicMajor: found major device number 250
ukiDynamicMajor: found major device number 250
ukiDynamicMajor: found major device number 250
ukiOpenDevice: node name is /dev/ati/card0
ukiOpenDevice: open result is 7, (OK)
ukiGetBusid returned 'PCI:1:0:0'
ukiOpenDevice: node name is /dev/ati/card1
ukiOpenDevice: UKI_ERR_NOT_ROOT
...
ukiOpenDevice: node name is /dev/ati/card15
ukiOpenDevice: UKI_ERR_NOT_ROOT
ukiDynamicMajor: found major device number 250
ukiOpenByBusid: Searching for BusID PCI:1:0:0
ukiOpenDevice: node name is /dev/ati/card0
ukiOpenDevice: open result is 7, (OK)
ukiOpenByBusid: ukiOpenMinor returns 7
ukiOpenByBusid: ukiGetBusid reports PCI:1:0:0
ukiDynamicMajor: found major device number 250
ukiDynamicMajor: found major device number 250
ukiOpenByBusid: Searching for BusID PCI:1:0:0
ukiOpenDevice: node name is /dev/ati/card0
ukiOpenDevice: open result is 7, (OK)
ukiOpenByBusid: ukiOpenMinor returns 7
ukiOpenByBusid: ukiGetBusid reports PCI:1:0:0
Platform 0 : Advanced Micro Devices, Inc.
Platform found : Advanced Micro Devices, Inc.

Selected Platform Vendor : Advanced Micro Devices, Inc.
Device 0 : Turks Device ID is 0x1a16b40
Number of displays 1
libGL: AtiGetClientDriverName: 9.1.11 fglrx (screen 0)
libGL: OpenDriver: trying /usr/lib/fglrx/dri/fglrx_dri.so
ukiDynamicMajor: found major device number 250
ukiDynamicMajor: found major device number 250
ukiOpenByBusid: Searching for BusID PCI:1:0:0
ukiOpenDevice: node name is /dev/ati/card0
ukiOpenDevice: open result is 10, (OK)
ukiOpenByBusid: ukiOpenMinor returns 10
ukiOpenByBusid: ukiGetBusid reports PCI:1:0:0
glXCreateContextAttribsARB 0x7f4e05938280
Number of interoperable devices 1
Interop Device ID is 0x1a16b40
libGL: OpenDriver: trying /usr/lib/fglrx/dri/tls/i965_dri.so
libGL: OpenDriver: trying /usr/lib/fglrx/dri/i965_dri.so
libGL error: dlopen /usr/lib/fglrx/dri/i965_dri.so failed     (/usr/lib/fglrx/dri/i965_dri.so: cannot open shared object file: No such file or     directory)
libGL: OpenDriver: trying /usr/lib32/fglrx/dri/tls/i965_dri.so
libGL: OpenDriver: trying /usr/lib32/fglrx/dri/i965_dri.so
libGL error: dlopen /usr/lib32/fglrx/dri/i965_dri.so failed     (/usr/lib32/fglrx/dri/i965_dri.so: cannot open shared object file: No such file or directory)
libGL error: unable to load driver: i965_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: i965
libGL: OpenDriver: trying /usr/lib/fglrx/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib/fglrx/dri/swrast_dri.so
libGL error: dlopen /usr/lib/fglrx/dri/swrast_dri.so failed (/usr/lib/fglrx/dri/swrast_dri.so: cannot open shared object file: No such file or directory)
libGL: OpenDriver: trying /usr/lib32/fglrx/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib32/fglrx/dri/swrast_dri.so
libGL error: dlopen /usr/lib32/fglrx/dri/swrast_dri.so failed (/usr/lib32/fglrx/dri/swrast_dri.so: cannot open shared object file: No such file or directory)
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  155 (GLX)
  Minor opcode of failed request:  5 (X_GLXMakeCurrent)
  Serial number of failed request:  28
  Current serial number in output stream:  28

我不知道接下来该怎么办。这可能是已知的 ATI Ubuntu 12.10 问题遗留的问题,也可能是新问题。有人有什么建议吗?

答案1

好的。搞清楚了(至少在我的情况下)。链接器未找到libGL.so文件。添加/usr/lib/fglrx

LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/lib/fglrx

到我的~/.bashrc(或~/.profile)使它工作。但这不应该是必需的,因为驱动程序安装程序会添加/usr/lib/fglrx/etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf文件中。

编辑说明:我之前的帖子将此错误归咎于 Cinnamon(错误 1483);然而,这是不正确的。记录的解决方案是正确的。

相关内容