5 Replies Latest reply: Dec 11, 2012 11:31 PM by nou RSS

OpenCL-OpenGL Interop on Ubuntu 12.10 broken?

bkloppenborg Newbie
Currently Being Moderated

Greetings,

 

This is a cross-post from AskUbuntu (http://askubuntu.com/questions/226526/ubuntu-12-10-opencl-opengl-interop-with-ati-graphics)

 

I just finished installing Ubuntu 12.10 and managed to get OpenGL and OpenCL working on my Radeon HD 7600m + Intel HD 3000 hybrid graphics laptop running the latest Catalyst 12.11 beta drivers.  Note: There are known issues with ATI drivers on Ubuntu 12.10 (see https://bugs.launchpad.net/fglrx/+bug/1068661). 

 

Applications that exclusively use OpenGL work (i.e. glxgears runs at 1500+ fps) and those that exclusively use OpenCL work (i.e. FFT in the AMD APP SDK package); however, any application I attempt to launch that uses OpenCL + OpenGL interoperability fails to launch with the following error:

 

X Error of failed request: BadMatch (invalid parameter attributes)

 

On Ubuntu 12.04 with the package manager drivers everything worked (including OpenCL + OpenGL interop).  To get a little more debugging information on this problem, I ran the SimpleGL example which produced the output in the attached text file.  It appears my Radeon HD 7600m doesn't provide something that is required for the context selection process.  CodeXL identifies that the card does support the "cl_khr_gl_sharing" extension

 

Does anyone have an idea how I could proceed debugging this or recognize what is failing?

 

Thanks in advance,

Brian

  • Re: OpenCL-OpenGL Interop on Ubuntu 12.10 broken?
    bkloppenborg Newbie
    Currently Being Moderated

    This is not a driver issue. (Edit, see post below)  The sample program runs fine on Ubuntu 12.10 in Gnome3, but fails in Cinnamon.  I've taken the discussion to the Cinnamon UI folks too.

    • Re: OpenCL-OpenGL Interop on Ubuntu 12.10 broken?
      McMonkeyMcBean Newbie
      Currently Being Moderated

      I get:

       

      Platform 0 : Advanced Micro Devices, Inc.

      Platform found : Advanced Micro Devices, Inc.

       

      Selected Platform Vendor : Advanced Micro Devices, Inc.

      Device 0 : Loveland Device ID is 0x1b5bde0

      Number of displays 1

      glXCreateContextAttribsARB 0x7f5e29533280

      Number of interoperable devices 1

      Interop Device ID is 0x1b5bde0

      X Error of failed request:  BadMatch (invalid parameter attributes)

        Major opcode of failed request:  160 (GLX)

        Minor opcode of failed request:  5 (X_GLXMakeCurrent)

        Serial number of failed request:  28

        Current serial number in output stream:  28

       

      when running SimpleGL  on Ubuntu 12.04 with the latest 12.11beta11 driver - maybe it is down to the beta driver since the last time I ran SimpleGL with Catalyst 12.9 it worked fine.

       

       

      EDIT:

       

      Hmmm  I just ran SimpleGL using sudo and it worked....without sudo the above error message appears. Does that work for you OP?

      • Re: OpenCL-OpenGL Interop on Ubuntu 12.10 broken?
        bkloppenborg Newbie
        Currently Being Moderated

        After successfully running the SimpleGL example (without sudo) in Gnome3, SimpleGL also works in Cinnamon (without sudo).  I am not sure if this is a change caused by running the program in Gnome3, or because I installed some intermediate packages.  For starters, I installed and then purged the OpenCL ICD packages (ocl-icd-libopencl1, opencl-headers, ocl-icd-opencl-dev) and then later purged them.  I was just setting up my computer on 12.10, so I kept installing packages I needed which included the Steam beta client (installs multiarch-support and the 32-bit versions of libgl1-mesa-glx, libgl1-mesa-dri along with several other non-OpenGL/CL related packages) and several other programs and dependencies which shouldn't have touched anything related to OpenCL-OpenGL interoperability (eclipse-cdt-valgrind, stellarium, gimp 2.8, recordmydesktop, gtk-recordmydesktop, flashplugin-installer, and inkscape).

         

        Because it is working now, I cannot replicate the issue.  As you were able to duplicate my results on 12.04 with the Catalyst 12.11beta drivers this isn't a Ubuntu 12.10 issue.  Perhaps it is simply a permissions thing in the Catalyst 12.11 beta drivers?  Is it possible that one of the aforementioned packages is changing permissions on a file?

         

        What window manager were you using?  Can we exclude this being an issue with Cinnamon?

      • Re: OpenCL-OpenGL Interop on Ubuntu 12.10 broken?
        bkloppenborg Newbie
        Currently Being Moderated

        Ok.  Figured it out (at least in my case).  The libGL.so file in /usr/lib/fglrx is not found by by the linker. Adding

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

         

        to my ~/.bashrc (or ~/.profile) made it work.  This shouldn't be required though because the driver installer adds /usr/lib/fglrx to the /etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf file.

More Like This

Legend

  • Correct Answers - 4 points
  • Helpful Answers - 2 points