Can't execute CUDA samples (e.g. fluidsGL) that use OpenGL Error: Major opcode of failed request

Hi,

I’m new here and I can’t execute CUDA SDK code samples that use OpenGL. For instance starting the fluidsGL example results in error:

[fluidsGL] - [OpenGL/CUDA simulation] starting…
OpenGL device is Available
X Error of failed request: BadWindow (invalid Window parameter)
Major opcode of failed request: 137 (NV-GLX)
Minor opcode of failed request: 4 ()
Resource id in failed request: 0x3a00002
Serial number of failed request: 50
Current serial number in output stream: 50

I think OpenGL is not installed on my machine because if I try: “glxinfo | grep rendering” I get suggestion from Ubuntu to install: “sudo apt-get install mesa-utils”

I did it and now on glxinfo request I get the same error like if I execute fluidsGL.

Does anyone have any ideas how can I get OpenGL working?

The driver and SDK seems to be correctly installed, because another samples work well and all checks from “NVIDIA CUDA C Getting started guide for Linux” I passed successfully.

Here is a description what I’ve done:

I have i7 Intel processor and two GTX 460.

I’ve installed following packages:
devdriver_3.2_linux_64_260.19.26.run
cudatoolkit_3.2.16_linux_64_ubuntu10.04.run
gpucomputingsdk_3.2.16_linux.run

I did all the tricks (add blacklist …) according to the links:
http://developer.dow…rted_Linux.pdf
http://wiki.accelere…r_Ubuntu_10.04
http://developer.nvi…downloads.html

The PATH and LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda/lib: are set. The latter in .bashrc and in /etc/ld.so.conf.d/cuda.conf.

sudo apt-get install freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev

cd /usr/lib/
sudo rm libGL.so
sudo ln -s libGL.so.1 libGL.so

Thanks

Roman

Hi Roman,

I think the problem is that you installed the mesa GL and GLX libraries, overwriting the GL/GLX libraries the nvidia driver installs. Try reinstalling the nvidia driver and running glxinfo or glxgears again.

Hi,

initially I had nvidia driver installation from scratch. Here is a part of the nvidia-installer.log:

-> Installing both new and classic TLS OpenGL libraries.

-> Installing classic TLS 32bit OpenGL libraries.

-> Install NVIDIA’s 32-bit compatibility OpenGL libraries? (Answer: Yes)

-> Searching for conflicting X files:

-> done.

-> Searching for conflicting OpenGL files:

-> done.

-> Installing ‘NVIDIA Accelerated Graphics Driver for Linux-x86_64’

(260.19.26):

executing: ‘/sbin/ldconfig’…

executing: ‘/sbin/depmod -aq’…

-> done.

-> Driver file installation is complete.

-> Running post-install sanity check:

-> done.

-> Post-install sanity check passed.

-> Shared memory test passed.

-> Running runtime sanity check:

-> done.

-> Runtime sanity check passed.

I would expect also 64-bit OpenGL libraries but 32-bit were here. Just after “glxinfo | grep rendering” resulted in suggestion to install: “sudo apt-get install mesa-utils” I did it. So if I will just reinstall driver I will run in the same suggestion to install mesa-utils. (BTW is it ok to do: sudo apt-get --purge remove mesa-utils to uninstall it?)

Probably my installation method is wrong?

I followed one of the links above. So I edited blacklist:

sudo gedit /etc/modprobe.d/blacklist.conf

and added the following lines to the file:

blacklist vga16fb

blacklist nouveau

blacklist rivafb

blacklist nvidiafb

blacklist rivatv

then I removed NVIDIA drivers (this link claims otherwise I could not correctly install nvidia driver):

sudo apt-get --purge remove nvidia-*

After restart I set PATH and LD_LIBRARY_PATH in .bashrc and did: sudo ldconfig

I found following errors in Xorg.0.log:

(EE) Dec 30 00:26:09 NVIDIA(0): Failed to initialize the GLX module; please check in your X

(EE) Dec 30 00:26:09 NVIDIA(0): log file that the GLX module has been loaded in your X

(EE) Dec 30 00:26:09 NVIDIA(0): server, and that the module is the NVIDIA GLX module. If

(EE) Dec 30 00:26:09 NVIDIA(0): you continue to encounter problems, Please try

(EE) Dec 30 00:26:09 NVIDIA(0): reinstalling the NVIDIA driver.

In Xorg.2.log:

(EE) NVIDIA: Failed to load the NVIDIA kernel module. Please check your

(EE) NVIDIA: system’s kernel log for additional error messages.

(II) UnloadModule: “nvidia”

(II) Unloading /usr/lib/xorg/modules/drivers/nvidia_drv.so

(EE) Failed to load module “nvidia” (module-specific error, 0)

(EE) No drivers available.

Can you give me a link to description or short explanation - how should I correctly reinstall nvidia driver? As I see from Readme_Linux.txt I would just run nvidia-uninstall?

And how should I correctly install nvidia driver? Should I compile kernel somehow? Where are X log and kernel log files?

(In kern.log I found: soffice.bin[7103]: segfault at 7f22a26b2ed9 ip 00007f22a26b2ed9 sp 00007f2294921bd0 error 14 in libglib-2.0.so.0.2400.1[7f22a2953000+db000]).

Thanks,

Roman