Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Apr 2016 16:33:54 +0100 (BST)
From:      Anton Shterenlikht <mexas@bris.ac.uk>
To:        mexas@bris.ac.uk, till.oliver.knoll@gmail.com
Cc:        freebsd-questions@freebsd.org, freebsd-x11@freebsd.org
Subject:   Re: when do I need to set JAVA_HOME?
Message-ID:  <201604051533.u35FXskq060149@mech-as222.men.bris.ac.uk>
In-Reply-To: <0B98F374-862C-4433-A774-56D266CA4CDB@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
>From till.oliver.knoll@gmail.com Mon Apr  4 21:57:13 2016
>
>> Am 04.04.2016 um 13:04 schrieb Anton Shterenlikht <mexas@bris.ac.uk>:
>> 
>> I'm having troubles running an openGL
>> 3D visualisation over ssh -Y:
>> 
>> javax.media.opengl.GLException: Error making context current
>>        at com.sun.opengl.impl.x11.X11GLContext.makeCurrentImpl(X11GLContext.java:141)
>>        at com.sun.opengl.impl.x11.X11OnscreenGLContext.makeCurrentImpl(X11OnscreenGLContext.java:69)
>>        at 
>
>Hello list,
>
>The exception above sais that "OpenGL cannot activate ("make current") the desired (requested) graphic context". That is usually the case when the GPU (graphic card) does not provide the requested features such as bit depth or features such as double-buffering (actually that would fail already at OpenGL context /creation/ time, but let's skip over the details here, shall ww ;)).
>
>The point is to me it doesn't look like a class is missing, which would hint at a missing CLASSPATH. It is really an error at runtime, after all classes have been loaded.
>
>It could still be that some (non-mandatory) OpenGL driver is not found (in the JAVA CLASSPATH), but my suspicion goes towards SSH: we are talking about a remote connection, right? Could well be that your remote X client (or was it the X Server? IIRC those X11 people have a weitd notion of "server" and "client" - but never mind ;)), that is the display "where you eventually show the app", claims to have features (for the created GL context) which it doesn't (or the "X Server" on the remote display is simply buggy).
>
>All that said: does the application run locally (without SSH)?

Oliver, thank you.

I haven't got the application locally.
Need to build from sources and it will
pull in lots of other dependencies.
However, I can give it a go if all else fails.

What I can see is that locally, i.e. on the X server (the
local laptop where I view the results) glxgears
runs fine and glxinfo returns this:

GLX version: 1.4
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Intel Open Source Technology Center (0x8086)
    Device: Mesa DRI Intel(R) Haswell Mobile  (0xa16)
    Version: 11.1.2
    Accelerated: yes
    Video memory: 1534MB
    Unified memory: yes
    Preferred profile: core (0x1)
    Max core profile version: 3.3
    Max compat profile version: 3.0
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.0

which looks fine, no?

> Do other OpenGL applications run over SSH
> (with a comparable feature set, that is,
> do they make use of the same OpenGL version features, e.g. "OpenGL 3.3" or even 4.x)?

Don't know for sure.
Maybe you can suggest a test application?

I sometimes use the Abaqus, a proprietary CAD
software on the remote cluster.
If I want to view the 3D via ssh, I have
to launch the application with "-mesa" switch,
otherwise it fails with the following errors,
which, as I understand mean that there are
no GL acceleration on the remote cluster side.
Maybe I'm wrong?

$ abaqus viewer 
libGL error: failed to open drm device: No such file or directory
libGL error: failed to load driver: i965
libGL error: dlopen /usr/lib64/dri/swrast_dri.so failed (/usr/lib64/dri/swrast_dri.so: undefined symbol: drm_intel_get_reset_stats)
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
X Error: code 2 major 154 minor 3: BadValue (integer parameter out of range for operation).
X Error: code 170 major 154 minor 5: GLXBadContext.
X Error: code 0 major 154 minor 26: 0.
X Error: code 2 major 154 minor 3: BadValue (integer parameter out of range for operation).
X Error: code 170 major 154 minor 5: GLXBadContext.

Warning: Your system needs to be reconfigured to allow OpenGL
rendering to a pixmap or Pbuffer; otherwise, you will not be
able to print or use the probe function in Abaqus/CAE.

X Error: code 170 major 154 minor 5: GLXBadContext.
X Error: code 0 major 154 minor 26: 0.
terminate called after throwing an instance of 'nex_PrimException<ipc_IPCMsgErrorTypeEnm, 1>'
Abaqus Error: Abaqus/CAE Kernel exited with an error.
Abaqus Error: Abaqus/Viewer exited with an error
$

Many thanks again

Anton



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604051533.u35FXskq060149>