From: Thomas Griffiths (tmg994_at_uowmail.edu.au)
Date: Tue Apr 11 2017 - 02:07:46 CDT

Hi John, Ryan;

I may have a solution to this Xquartz and VMD issue. It is indeed an issue
with XQuartz. I believe it has something to do with allowing XQuartz to
allow indirect GLX contexts. (What that specifically means I don't know. My
expertise here is lacking, but that's what I found being discussed online.)
The following fixes my implementation.

The fix is this: Quit XQuartz, then in the macOS Terminal application (on
your own machine, *not* logged into the reomte cluster) run:

    defaults write org.macosforge.xquartz.X11 enable_iglx -bool true

Reload your terminal and you should then be able to log into a remote
machine and launch remote XQuartz sessions for VMD

---
More indepth:
Apparently, version 2.7.8 was the last release of XQuartz where indirect
glx rendering was enabled by default. Which is why rolling back to this
version works. There are a couple of posts out there (
https://www.visitusers.org/index.php?title=Re-enabling_
INdirect_glx_on_your_X_server) regarding enabling this indirect rendering.
But the best advice I found was here (Actually for XQuartz and Gaussview 5,
the viewer for Gaussian 09, but enabled remote VMD view again.) See the
section 'XQuartz and macOS'
    https://opus.nci.org.au/display/Help/GaussView
My current system is OS 10.11.6 and XQuartz version 2.7.11 (the latest
XQuartz at the time of writing). Applying the above defaults allows me to
run remote VMD sessions again (also fixed Gaussview for any wandering
quantum chemists who might land on this page).
Before setting the above default, or by setting it to false, I get the same
errors as Ryan for glxinfo (without the libGL errors though)
    name of display: raijin3:14.0
    X Error of failed request:  BadValue (integer parameter out of range
for operation)
      Major opcode of failed request:  149 (GLX)
      Minor opcode of failed request:  3 (X_GLXCreateContext)
      Value in failed request:  0x0
      Serial number of failed request:  19
      Current serial number in output stream:  20
This is fixed with the default set to true. glxinfo  then prints a very
verbose list, too big to paste here.
Hope this helps.
Tom.
On 18 March 2017 at 06:25, John Stone <johns_at_ks.uiuc.edu> wrote:
> Hi Ryan,
>   I bounced a copy of your reply to VMD-L so that others using VMD on
> MacOS X and and/or with XQuartz can see it as well.  The errors you get
> when you run 'glxinfo' and 'glxgears' on the remote linux machine indicate
> that the XQuartz window server on your Mac is (for some reason) failing to
> respond to GLX protocol requests being performed on the remote Linux
> system.
> GLX is that part of OpenGL responsible for managing graphics resources
> and negotiating how the OpenGL framebuffer is mapped onto the
> windows and shown on the physical display.  I'm most concerned with the
> fact
> that 'glxinfo' doesn't run, since that is the simplest test of whether the
> X server has an operable OpenGL interface, and that is failing too.
> I note that your libGL implementation on the Linux server is emitting
> some errors about "failed to load driver: swrast", which makes me wonder
> if the OpenGL system software on your Linux machine is complete or if there
> are some software components missing.  It is possible that the source of
> trouble is actually the Linux machine rather than the XQuartz server,
> but you may be able to determine that better based on what configurations
> had worked for you in the past vs. the specific details of the software
> configurations you're trying to use here.  Did a previous version of
> XQuartz work properly with the same Linux system?  Does a different Linux
> system work with this XQuartz version?  Is XQuartz the only thing that
> changed vs. the setup that had worked previously?
>
> Cheers,
>   John Stone
>   vmd_at_ks.uiuc.edu
>
> On Thu, Mar 16, 2017 at 02:28:19PM -0600, Ryan P. Steele wrote:
> > Thanks for the response, John.
> >
> > When I run those two commands, I receive the following:
> >
> > kingspeak1  > glxinfo
> > name of display: 10.242.128.31:20.0
> > libGL error: No matching fbConfigs or visuals found
> > libGL error: failed to load driver: swrast
> > X Error of failed request:  GLXBadContext
> >   Major opcode of failed request:  149 (GLX)
> >   Minor opcode of failed request:  6 (X_GLXIsDirect)
> >   Serial number of failed request:  23
> >   Current serial number in output stream:  22
> >
> > kingspeak1  > glxgears
> > libGL error: No matching fbConfigs or visuals found
> > libGL error: failed to load driver: swrast
> > X Error of failed request:  BadValue (integer parameter out of range
> > for operation)
> >   Major opcode of failed request:  149 (GLX)
> >   Minor opcode of failed request:  3 (X_GLXCreateContext)
> >   Value in failed request:  0x0
> >   Serial number of failed request:  28
> >   Current serial number in output stream:  30
> >
> >
> > It certainly sounds like something isn't working here, but I'm not
> > familiar with these sorts of display configurations.
> >
> > Ryan
> >
> >
> >
> >
> > On 3/16/17 1:56 PM, John Stone wrote:
> > >Ryan,
> > >   Are you able to run either 'glxinfo' or 'glxgears' on this system in
> > >the same way that you tried running VMD?  If so, do they work, or do
> they
> > >fail?
> > >
> > >Cheers,
> > >   John Stone
> > >   vmd_at_ks.uiuc.edu
> > >
> > >On Thu, Mar 16, 2017 at 01:50:53PM -0600, Ryan P. Steele wrote:
> > >>    Hi, folks -
> > >>
> > >>    We seem to be having an issue with Mac users when running a
> server-side
> > >>    VMD window.\001 This version of VMD is a 'common' installation for
> all
> > >>    users on a cluster.\001 With Windows or all tested Linux
> terminals, things
> > >>    work fine when running it through tunneled x connections.\001
> However, the
> > >>    recent version of XQuartz on OS X does not work.\001
> > >>
> > >>    Upon startup, VMD gives the error copied below (the errors shown
> here are
> > >>    for a user-installed version, but the common version behaves the
> same
> > >>    way).\001 A locally installed version on the same Mac machine
> works fine,
> > >>    and the server version, when run in text-only mode, also works
> fine.\001
> > >>    It seems as though the x-tunneled graphics are not playing nicely
> with
> > >>    XQuartz.
> > >>
> > >>    Any suggestions?
> > >>
> > >>    Thanks -
> > >>    Ryan
> > >>
> > >>    > vmd
> > >>    /uufs/chpc.utah.edu/common/home/u0764443/mybin/vmd2/lib/
> vmd_LINUXAMD64:
> > >>    /usr/lib64/libGL.so.1: no version information available (required
> by
> > >>    /uufs/chpc.utah.edu/common/home/u0764443/mybin/vmd2/lib/
> vmd_LINUXAMD64)
> > >>    Info) VMD for LINUXAMD64, version 1.9.3 (November 30, 2016)
> > >>    Info) [1]http://www.ks.uiuc.edu/Research/vmd/
> > >>    Info) Email questions and bug reports to [2]vmd_at_ks.uiuc.edu
> > >>    Info) Please include this reference in published work using VMD:
> > >>    Info)\001\001\001 Humphrey, W., Dalke, A. and Schulten, K., `VMD -
> Visual
> > >>    Info)\001\001\001 Molecular Dynamics', J. Molec. Graphics 1996,
> 14.1,
> > >>    33-38.
> > >>    Info) ------------------------------------------------------------
> -
> > >>    Info) Multithreading available, 32 CPUs detected.
> > >>    Info)\001\001 CPU features: SSE2 AVX
> > >>    Info) Free system memory: 43GB (67%)
> > >>    NVIDIA: no NVIDIA devices found
> > >>    Info) No CUDA accelerator devices available.
> > >>    libGL error: No matching fbConfigs or visuals found
> > >>    libGL error: failed to load driver: swrast
> > >>    XRequest.149: BadValue (integer parameter out of range for
> operation) 0x0
> > >>    XRequest.149: GLXBadContext 0xa00001
> > >>    XRequest.149: 0 0x0
> > >>    Info) OpenGL renderer: ErrorUnknown
> > >>    Info)\001\001 Features: STENCIL
> > >>    Info)\001\001 GLSL rendering mode is NOT available.
> > >>    XRequest.149: BadMatch (invalid parameter attributes) 0xa00009
> > >>    NVIDIA: no NVIDIA devices found
> > >>    NVIDIA: no NVIDIA devices found
> > >>    Info) Dynamically loaded 2 plugins in directory:
> > >>    Info)
> > >>    /uufs/chpc.utah.edu/common/home/u0764443/mybin/vmd2/lib/
> plugins/LINUXAMD64/molfile
> > >>    XRequest.149: GLXBadContext 0xa00001
> > >>    XRequest.149: 0 0x0
> > >>    XRequest.149: BadMatch (invalid parameter attributes) 0xa00009
> > >>    XRequest.149: GLXBadContext 0xa00001
> > >>    XRequest.149: 0 0x0
> > >>    XRequest.149: BadMatch (invalid parameter attributes) 0xa00009
> > >>    XRequest.149: GLXBadContext 0xa00001
> > >>    XRequest.149: 0 0x0
> > >>    XRequest.149: BadMatch (invalid parameter attributes) 0xa00009
> > >>    XRequest.149: GLXBadContext 0xa00001
> > >>
> > >>    (repeats thousands of times...)
> > >>
> > >>  --
> > >>  ==========================
> > >>   Ryan P. Steele
> > >>   Assistant Professor
> > >>   University of Utah
> > >>   Dept. of Chemistry
> > >>   315 South 1400 East
> > >>   Salt Lake City, UT 84112
> > >>   Phone : 801-587-3800
> > >>   Office: Thatcher 4611
> > >>  ==========================
> > >>
> > >>References
> > >>
> > >>    Visible links
> > >>    1. http://www.ks.uiuc.edu/Research/vmd/
> > >>    2. mailto:vmd_at_ks.uiuc.edu
> >
> > --
> > ==========================
> >  Ryan P. Steele
> >  Assistant Professor
> >  University of Utah
> >  Dept. of Chemistry
> >  315 South 1400 East
> >  Salt Lake City, UT 84112
> >  Phone : 801-587-3800
> >  Office: Thatcher 4611
> > ==========================
>
> --
> NIH Center for Macromolecular Modeling and Bioinformatics
> Beckman Institute for Advanced Science and Technology
> University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> http://www.ks.uiuc.edu/~johns/           Phone: 217-244-3349
> http://www.ks.uiuc.edu/Research/vmd/
>
>
-- 
*Thomas GriffithsPhD CandidateSchool of Chemistry | Faculty of Science
Medicine & HealthUniversity of Wollongong NSW 2522 AustraliaAcademic Senate
– Postgraduate MemberScience Medicine & Health – Postgraduate
RepresentativeT +612 4221 3559 | M +614 1527 1006uow.edu.au
<http://www.uow.edu.au/science/chem/>*
University of Wollongong CRICOS: 00102E
NOTICE: This email is intended for the addressee named and may contain
confidential information. If you are not the intended recipient, please
delete it and notify the sender. Please consider the environment before
printing this email.