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.
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
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.
Hmmm I just ran SimpleGL using sudo and it worked....without sudo the above error message appears. Does that work for you OP?
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?
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
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.
yes but somehow OpenCL pick up /usr/lib/libGL.so. this is old issue but was resolved when Ubuntu 12.04 moved libGL.so into /usr/lib/x86_64-linux-gnu/