oplaTech About Teaching Archive
Oplatek's external memory

Fight with Nvidia under Linux

OpenGL tips
posted Sep 6, 2011 4:15 PM by ondrej platek

Nehe formats
lesson[0-9[0-9]_glut.zip is windows format
lesson[0-9[0-9]_linux.tar.gz is linux format works for me at aao and in mfflab
lesson[0-9[0-9]_linux.tar.gz is linux_GLX format works for me at aao and in mfflab BUT THE LESSON02 BLOCKS COVERS MY WHOLE DISPLAY AND CAPTURES ALL INPUT-> IT BLOCKS THE COMPUTER


(Edit post)
Back to ssh -X
posted Sep 6, 2011 12:58 AM by ondrej platek [ updated Sep 6, 2011 2:31 PM ]

In http://www.csse.monash.edu.au/~jonmc/CSE3313/Assessment/opengl.html I have read, that ssh with set up X Forwarding
and mesa library http://www.mesa3d.org/ is the solution of my problem.

During the reading I realized, that I need the same openGL driver on both sites.
I knew that I have the same one form glxinfo command.
Suddenly, it hit me. The examples are compiled staticly with other openGL library!

I discover how to set up LD_LIBRARY_PATH in order let the linux search for shared libraries
in directories specified in $LD_LIBRARY_PATH.

(Edit post)
Sending no openGL commands just pictures with VNC?
posted Aug 29, 2011 12:04 AM by ondrej platek [ updated Sep 6, 2011 12:57 AM ]

Does it work in mff lab? Yes it works.
The procedure I followed is:

VNC CAN NOT RENDER OPENGL
1)

# service vncserver start // I have skipped this step, because at mfflab this service was currently running
vncpasswd // It is needed (I suppose) only for the first time
vncserver // and I started vncserver

2)
I used /sbin/ifconfig to find out public IP address

3) I ran java TightVNC viewer with port mentioned at ~/.vnc/u-pl??\:1.log a IP address from step 2

4) Then I tested ./simpleGL and it returns me an error

Xlib: extension "NV-GLX" missing on display ":1".
Xlib: extension "NV-GLX" missing on display ":1".
ERROR: Support for necessary OpenGL extensions missing.Error: API mismatch: the NVIDIA kernel module has version 270.41.06,
but this NVIDIA driver component has version 270.41.19. Please make
sure that the kernel module and all NVIDIA driver components
have the same version.


So I have to solve the error

(Edit post)
OpenGL remotely rendering over ssh
posted Aug 27, 2011 11:57 PM by ondrej platek [ updated Sep 14, 2011 4:34 PM ]

I have discovered that OpenGL is rendered on the client site when I am connected over ssh to computer where I run CUDA and OpenGL program on computer with NVIDIA graphics card.
Because my client notebook has no NVIDIA card I got an error (running ~/cuda_sdk/bin/../simpleGL) .
Xlib: extension "NV-GLX" missing on display "u-pl2:11.0".
Xlib: extension "NV-GLX" missing on display "u-pl2:11.0".
ERROR: Support for necessary OpenGL extensions missing.


I have hopefully found a solution in this tutorial:
http://timelordz.com/wiki/Nvidia_CUDA#VirtualGL

However I need to run virtualGL on the server side with superuser permissions (I do now have them)

(Edit post)
OpenGL is working in mfflab
posted Aug 27, 2011 11:24 PM by ondrej platek [ updated Aug 27, 2011 11:34 PM ]

I tried to compile sources from tutorial http://www.videotutorialsrock.com/opengl_tutorial/basics/home.php

I have to add new library to Makefile:

CC = g++
CFLAGS = -Wall
PROG = cube

SRCS = main.cpp imageloader.cpp

ifeq ($(shell uname),Darwin)
LIBS = -framework OpenGL -framework GLUT
else
#I have added -lGLU so "LIBS = -lglut -lGLU"
LIBS = -lglut -lGLU
endif

all: $(PROG)

$(PROG): $(SRCS)
$(CC) $(CFLAGS) -o $(PROG) $(SRCS) $(LIBS)

clean:
rm -f $(PROG)



(Edit post)
Trying out CUDA at Rotunda lab
posted Aug 26, 2011 3:57 PM by ondrej platek [ updated Aug 26, 2011 4:08 PM ]

I tried compile and run CUDA SDK examples, which were installed on linux machine (u-pl12) in Rotunda lab. Nvidia driver is installed and it can be accessed over ssh,
which is neccessary for me, because I have no Nvidia graphic card.


Most of examples ran OK, but the graphical ones complained about lack of OpenGL
Xlib: extension "NV-GLX" missing on display "u-pl2:10.0".
ERROR: Support for necessary OpenGL extensions missing.


Tech specs at u-pl12 after running ~/BIG/cuda_sdk/C/bin/linux/release/deviceQuery
(I compile it using makefile at ~/BIG/cuda_sdk/C and alterning cuda path to /opt/cuda in ~/BIG/cuda_sdk/C/common/Makefile)

CUDA Device Query (Runtime API) version (CUDART static linking)

There is 1 device supporting CUDA

Device 0: "GeForce 210"
CUDA Driver Version: 4.0
CUDA Runtime Version: 3.20
CUDA Capability Major/Minor version number: 1.2
Total amount of global memory: 536150016 bytes
Multiprocessors x Cores/MP = Cores: 2 (MP) x 8 (Cores/MP) = 16 (Cores)
Total amount of constant memory: 65536 bytes
Total amount of shared memory per block: 16384 bytes
Total number of registers available per block: 16384
Warp size: 32
Maximum number of threads per block: 512
Maximum sizes of each dimension of a block: 512 x 512 x 64
Maximum sizes of each dimension of a grid: 65535 x 65535 x 1
Maximum memory pitch: 2147483647 bytes
Texture alignment: 256 bytes
Clock rate: 1.40 GHz
Concurrent copy and execution: Yes
Run time limit on kernels: Yes
Integrated: No
Support host page-locked memory mapping: Yes
Compute mode: Default (multiple host threads can use this device simultaneously)
Concurrent kernel execution: No
Device has ECC support enabled: No
Device is using TCC driver mode: No

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 4.0, CUDA Runtime Version = 3.20, NumDevs = 1, Device = GeForce 210


PASSED

Press to Quit...