From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Thu Jan 21 2021 - 07:15:46 CST

Maria,

the situation is not quite as simple as you might think it is. While X11 is
a protocol that is designed for remote display, OpenGL is not. OpenGL is
very hardware specific and thus you have to a have a custom libGL.so
library implementing how to render OpenGL graphics for your local hardware.
Thus when trying to view OpenGL content from a remote display this doesn't
work since the remote libGL.so library can write into the remote graphics
device but not into your local hardware.
There are three ways to get around this issue:
1) have all OpenGL content rendered remotely and then translated into X11
calls and display them over the X11 link. this is usually *very* slow. This
can be done by compiling the Mesa OpenGL library (which knows how to do
this) and then change LD_LIBRARY_PATH so that that library is loaded
instead of the system OpenGL library.
2) use the GLX (OpenGL over X) extension to encapsulate OpenGL requests
into X11 requests and have them rendered locally. That requires to have a
fully compatible libGL.so *and* proper support for glx on both sides. That
is sometimes the case, but not always and it is less likely if you have
different OS variants or different versions of it.
3) use an OpenGL capable remote desktop application (e.g. some VNC variant)
and then use the ssh X11 tunnel simply to view the remote rendered display.
This is most likely to work with different operating systems and versions,
but also the most complex and laborious to compile/install/setup.

HTH,
   Axel.

On Thu, Jan 21, 2021 at 7:47 AM Maria Dimitrova <maria.dimitrova_at_helsinki.fi>
wrote:

> Dear Ashar,
>
>
> Thank you for your reply.
>
>
> I use VMD both locally and from the cluster. When I set up calculations I
> do not want to scp back and forth xyz files. In other cases I need to
> render some picture locally.
>
>
> As I said in my previous email, VMD on the cluster runs fine on all other
> computers over ssh. It was running on mine, too, before switching to
> Ubuntu. So the installation is unlikely to be broken. X forwarding works
> with other programs and I also see VMD's main window, just that the OpenGL
> does not function properly.
>
>
> Running VMD only locally is undesirable, given that it used to work before
> I changed my OS.
>
>
> Best regards,
>
> Maria
>
>
> On 21/01/2021 14:24, Ashar Malik wrote:
>
> I don't fully understand this - but will try listing down a few things for
> you to check.
>
> If you install VMD on your computer and you are sitting in front of your
> own computer - why are you using ssh?
>
> If you use ssh - you are connecting to a remote machine. Is the remote
> machine a cluster? If it is then you probably have the text version
> (command-line only) of vmd on cluster. And you should not expect it to have
> a GUI. Unless it's a dedicated node allowing GUI-support. When you say
> " Visualisation over ssh works from other computers" this is not likely
> unless your ssh command is aliased.
>
> if you use ssh and you are connecting to a remote machine which is a
> standard desktop - and that standard desktop has a GUI based vmd - then you
> need to do something more on the remote desktop side (e.g. VNC etc) and
> connect to that machine using more than just ssh. SSH alone will not
> support GUI and will probably give the error you are quoting.
>
> If you use ssh to connect to a remote machine - and then as you show in
> the above example that during the ssh session vmd is failing - that is
> because during the ssh session your shell is connected to the remote
> machine -- and any commands you will run will run on the remote machine. So
> while using ssh - if you want to run vmd on your own computer - open a new
> terminal window and run vmd there.
>
>
> On Thu, Jan 21, 2021 at 7:37 PM Maria Dimitrova <
> maria.dimitrova_at_helsinki.fi> wrote:
>
>> Hello,
>>
>>
>> I have a fresh installation of Ubuntu 20.04 and running the proprietary
>> drivers by NVidia for my 980 Ti GPU. I have installed vmd locally and it
>> renders fine, the GPU and CUDA are available.
>>
>>
>> Then I connect over ssh to our cluster and suddenly I get issues with
>> OpenGL. Visualisation over ssh works from other computers, so there is
>> something wrong about mine. It looks like the driver is supposedly
>> working fine. Maybe something regarding X.org?
>>
>>
>> The startup output over ssh to the cluster:
>>
>> $ vmd
>>
>> /opt/vmd-1.9.4a51/build/lib//vmd_LINUXAMD64: /lib64/libGL.so.1: no
>> version information available (required by
>> /opt/vmd-1.9.4a51/build/lib//vmd_LINUXAMD64)
>> Info) VMD for LINUXAMD64, version 1.9.4a51 (December 21, 2020)
>> Info) http://www.ks.uiuc.edu/Research/vmd/
>> Info) Email questions and bug reports to vmd_at_ks.uiuc.edu
>> Info) Please include this reference in published work using VMD:
>> Info) Humphrey, W., Dalke, A. and Schulten, K., `VMD - Visual
>> Info) Molecular Dynamics', J. Molec. Graphics 1996, 14.1, 33-38.
>> Info) -------------------------------------------------------------
>> Info) Multithreading available, 192 CPUs detected.
>> Info) CPU features: SSE2 SSE4.1 AVX AVX2 FMA F16 AVX512F AVX512CD HT
>> Info) Free system memory: 1391GB (92%)
>> Info) No CUDA accelerator devices available.
>> Warning) Detected X11 'Composite' extension: if incorrect display occurs
>> Warning) try disabling this X server option. Most OpenGL drivers
>> Warning) disable stereoscopic display when 'Composite' is enabled.
>> libGL error: No matching fbConfigs or visuals found
>> libGL error: failed to load driver: swrast
>> XRequest.152: BadValue (integer parameter out of range for operation) 0x0
>> XRequest.152: GLXBadContext 0x165
>> XRequest.152: GLXBadContext 0x0
>> Info) OpenGL renderer: ErrorUnknown
>> Info) Features:
>> Info) GLSL rendering mode is NOT available.
>> XRequest.152: GLXBadDrawable 0x5400105
>> Info) Dynamically loaded 3 plugins in directory:
>> Info) /opt/vmd-1.9.4a51/build/lib/plugins/LINUXAMD64/molfile
>> XRequest.152: GLXBadContext 0x5400105
>> XRequest.152: GLXBadContext 0x0
>> XRequest.152: GLXBadDrawable 0x5400105
>> XRequest.152: GLXBadContext 0x5400105
>> XRequest.152: GLXBadContext 0x0
>> XRequest.152: GLXBadDrawable 0x5400105
>> XRequest.152: GLXBadContext 0x5400105
>> XRequest.152: GLXBadContext 0x0
>> XRequest.152: GLXBadDrawable 0x5400105
>> XRequest.152: GLXBadContext 0x5400105
>> XRequest.152: GLXBadContext 0x0
>> XRequest.152: GLXBadDrawable 0x5400105
>> XRequest.152: GLXBadContext 0x5400105
>> XRequest.152: GLXBadContext 0x0
>> XRequest.152: GLXBadDrawable 0x5400105
>> XRequest.152: GLXBadContext 0x5400105
>> XRequest.152: GLXBadContext 0x0
>> XRequest.152: GLXBadDrawable 0x5400105
>> XRequest.152: GLXBadContext 0x5400105
>> XRequest.152: GLXBadContext 0x0
>> XRequest.152: GLXBadDrawable 0x5400105
>> XRequest.152: GLXBadContext 0x5400105
>> XRequest.152: GLXBadContext 0x0
>> XRequest.152: GLXBadDrawable 0x5400105
>> XRequest.152: GLXBadContext 0x5400105
>> XRequest.152: GLXBadContext 0x0
>> XRequest.152: GLXBadDrawable 0x5400105
>> XRequest.152: GLXBadContext 0x5400105
>> XRequest.152: GLXBadContext 0x0
>> /opt/vmd-1.9.4a51/build/lib/scripts/tcl8.5
>> /opt/vmd-1.9.4a51/build/lib/scripts /opt/vmd-1.9.4a51/build/lib
>> /Projects/johns/tcl/8.5.6/lib_LINUXAMD64/lib
>> /opt/vmd-1.9.4a51/build/lib/scripts/tk8.5
>> /opt/vmd-1.9.4a51/build/lib/scripts/tk8.5/ttk
>> /opt/vmd-1.9.4a51/build/lib//scripts/vmd
>> /opt/vmd-1.9.4a51/build/lib/plugins/LINUXAMD64/tcl
>> /opt/vmd-1.9.4a51/build/lib/plugins/noarch/tcl
>> /trunk/opt/vmd-1.9.1/vmd/scripts/orient
>> /opt/vmd-1.9.4a51/build/lib/scripts/tcl8.5
>> /opt/vmd-1.9.4a51/build/lib/scripts /opt/vmd-1.9.4a51/build/lib
>> /Projects/johns/tcl/8.5.6/lib_LINUXAMD64/lib
>> /opt/vmd-1.9.4a51/build/lib/scripts/tk8.5
>> /opt/vmd-1.9.4a51/build/lib/scripts/tk8.5/ttk
>> /opt/vmd-1.9.4a51/build/lib//scripts/vmd /opt/vmd-1.9.4a51/build/lib/plug
>>
>>
>>
>> But on my computer:
>>
>>
>> $ vmd
>> /usr/local/lib/vmd/vmd_LINUXAMD64: /lib/x86_64-linux-gnu/libGL.so.1: no
>> version information available (required by
>> /usr/local/lib/vmd/vmd_LINUXAMD64)
>> Info) VMD for LINUXAMD64, version 1.9.4a51 (December 21, 2020)
>> Info) http://www.ks.uiuc.edu/Research/vmd/
>> Info) Email questions and bug reports to vmd_at_ks.uiuc.edu
>> Info) Please include this reference in published work using VMD:
>> Info) Humphrey, W., Dalke, A. and Schulten, K., `VMD - Visual
>> Info) Molecular Dynamics', J. Molec. Graphics 1996, 14.1, 33-38.
>> Info) -------------------------------------------------------------
>> Info) Multithreading available, 4 CPUs detected.
>> Info) CPU features: SSE2 SSE4.1 AVX F16 HT
>> Info) Free system memory: 12GB (67%)
>> Info) Creating CUDA device pool and initializing hardware...
>> Info) Detected 1 available CUDA accelerator::
>> Info) [0] GeForce GTX 980 Ti 22 SM_5.2 1.2 GHz, 5.9GB RAM SP32 KT AE2 ZC
>> Warning) Detected X11 'Composite' extension: if incorrect display occurs
>> Warning) try disabling this X server option. Most OpenGL drivers
>> Warning) disable stereoscopic display when 'Composite' is enabled.
>> Info) OpenGL renderer: GeForce GTX 980 Ti/PCIe/SSE2
>> Info) Features: STENCIL MSAA(4) MDE CVA MTX NPOT PP PS GLSL(OVFGS)
>> Info) Full GLSL rendering mode is available.
>> Info) Textures: 2-D (16384x16384), 3-D (2048x2048x2048), Multitexture
>> (4)
>> Info) Detected 1 available TachyonL/OptiX ray tracing accelerator
>> Info) Compiling OptiX shaders on 1 target GPU...
>> Info) Dynamically loaded 3 plugins in directory:
>> Info) /usr/local/lib/vmd/plugins/LINUXAMD64/molfile
>> vmd > Info) VMD for LINUXAMD64, version 1.9.4a51 (December 21, 2020)
>> Info) Exiting normally.
>>
>>
>> Details about my computer:
>>
>> # uname -a
>> Linux XXXX 5.8.0-38-generic #43~20.04.1-Ubuntu SMP Tue Jan 12 16:39:47
>> UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
>>
>>
>> $ glxinfo | grep -i opengl
>> OpenGL vendor string: NVIDIA Corporation
>> OpenGL renderer string: GeForce GTX 980 Ti/PCIe/SSE2
>> OpenGL core profile version string: 4.6.0 NVIDIA 460.32.03
>> OpenGL core profile shading language version string: 4.60 NVIDIA
>> OpenGL core profile context flags: (none)
>> OpenGL core profile profile mask: core profile
>> OpenGL core profile extensions:
>> OpenGL version string: 4.6.0 NVIDIA 460.32.03
>> OpenGL shading language version string: 4.60 NVIDIA
>> OpenGL context flags: (none)
>> OpenGL profile mask: (none)
>> OpenGL extensions:
>> OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 460.32.03
>> OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
>> OpenGL ES profile extensions:
>>
>>
>> # nvidia-smi
>> Thu Jan 21 12:53:46 2021
>>
>> +-----------------------------------------------------------------------------+
>> | NVIDIA-SMI 460.32.03 Driver Version: 460.32.03 CUDA Version:
>> 11.2 |
>>
>> |-------------------------------+----------------------+----------------------+
>> | GPU Name Persistence-M| Bus-Id Disp.A | Volatile
>> Uncorr. ECC |
>> | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util
>> Compute M. |
>> | | | MIG M. |
>>
>> |===============================+======================+======================|
>> | 0 GeForce GTX 980 Ti Off | 00000000:01:00.0 On
>> | N/A |
>> | 0% 62C P0 83W / 325W | 1863MiB / 6082MiB | 14% Default
>> |
>> | | | N/A |
>>
>> +-------------------------------+----------------------+----------------------+
>>
>>
>> +-----------------------------------------------------------------------------+
>> | Processes: |
>> | GPU GI CI PID Type Process name GPU Memory |
>> | ID ID Usage |
>>
>> |=============================================================================|
>> | 0 N/A N/A 2504 G /usr/lib/xorg/Xorg
>> 1587MiB |
>> | 0 N/A N/A 2811 G /usr/bin/gnome-shell
>> 185MiB |
>> | 0 N/A N/A 1314497 G ...lib/vmware/bin/vmware-vmx
>> 17MiB |
>>
>> +-----------------------------------------------------------------------------+
>>
>>
>> Best regards,
>>
>> Maria
>>
>>
>>

-- 
Dr. Axel Kohlmeyer  akohlmey_at_gmail.com  https://urldefense.com/v3/__http://goo.gl/1wk0__;!!DZ3fjg!oXCMP0G9wldiv2fK1KfAukmEgMb_99uKM2gITdU7FtEFJfYRH2xYDTR7CNGTud8yFg$ 
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.