VirtualGL is designed to be used either with:

- an X proxy, which is a virtual X server (such as TurboVNC or TigerVNC
or FreeNX or Xpra, etc.) that renders X11 drawing commands into images
in main memory and then sends compressed image updates to a client or
clients.  In this mode, VirtualGL uses its built-in "X11 Transport" to
draw OpenGL-rendered frames into the X proxy using the MIT-SHM X11
extension.

... or ...

- remote X (an X server running on the client machine.)  In this mode,
VirtualGL uses its built-in "VGL Transport" to compress OpenGL-rendered
frames as JPEG images and send them to the client machine, where they
are received by the VirtualGL Client application, decompressed, and
drawn into the 2D X server using the MIT-SHM X11 extension.

(This is all in the User's Guide, BTW.)

The problem appears to be that you are trying to use the X11 Transport
with remote X.  In fact, you are forcing it to be used by passing -c 0
to vglrun, which is almost never a good idea.  VirtualGL will, by
default, automatically detect whether the 2D X server connection is
remote or local and activate the appropriate transport.  Forcing the X11
Transport when using SSH with X11 forwarding is far from optimal, since
it will result in OpenGL-rendered frames being sent over the network in
uncompressed form.  I recommend either installing TurboVNC on the server
and client machines and using that along with VirtualGL, or installing
the VirtualGL Client on the client machine and using vglconnect to
connect to the server (vglconnect is a wrapper script for starting the
VirtualGL Client and connecting to the server with SSH.)

The X11 Transport in VirtualGL *should* detect that MIT-SHM doesn't work
(which is expected when using a remote X connection) and fall back to a
slower X11 drawing method, so I'm not sure why you're getting an MIT-SHM
error.  It may be due to a problem with the 2D X server (stranger things
have happened), or maybe SSH is interfering somehow with VirtualGL's
ability to trap the MIT-SHM error.  You can try setting VGL_USEXSHM=0 in
the environment (on the server, prior to invoking vglrun) to force the
X11 Transport not to use the MIT-SHM extension.  Again, however,
performance is going to suck unless you use an X proxy or the VGL
Transport, so I really recommend that you do that rather than trying to
work around this issue.

On 3/15/19 8:49 AM, Jason wrote:
> Good Morning,
> 
>     That solution worked splendidly for bypassing the opcode 53.
> Unfortunately, I am now faced with another similar-looking error:
> 
> [VGL] Shared memory segment ID for vglconfig: 63406084
> [VGL] VirtualGL v2.6.1 64-bit (Build 20190101)
> [VGL] Opening connection to 3D X server :1
> [VGL] NOTICE: Replacing dlopen("libGL.so.1") with dlopen("libvglfaker.so")
> [VGL] NOTICE: Replacing dlopen("libGL.so.1") with dlopen("libvglfaker.so")
> Visual ID of window: 0x21
> Context is Direct
> [VGL] Using Pbuffers for rendering
> OpenGL Renderer: Radeon Pro WX 9100 (VEGA10, DRM 3.27.0,
> 4.15.0-46-generic, LLVM 7.0.1)
> X Error of failed request:  BadRequest (invalid request code or no such
> operation)
>   Major opcode of failed request:  130 (MIT-SHM)
>   Minor opcode of failed request:  1 (X_ShmAttach)
>   Serial number of failed request:  13
>   Current serial number in output stream:  14
> 
> 
> Here are a few of the steps I've tried to bypass this new issue:
> 
>   * https://bbs.archlinux.org/viewtopic.php?pid=1508298#p1508298
>       o
> 
>         |export QT_X11_NO_MITSHM=1|
> 
>       o (I know this isn't a QT issue, but it was worth a shot)
>   * https://lists.centos.org/pipermail/centos/2006-February/018416.html
>       o
> 
>         X11UseLocahost yes
> 
>       o (This modifies the /etc/ssh/sshd_config file)
>   * https://github.com/jessfraz/dockerfiles/issues/359#issuecomment-395371557
>       o
> 
>         |Section "Extensions" Option "MIT-SHM" "Disable" EndSection|
> 
>       o (This was the more promising option, but had no effect)
> 
> I greatly appreciate the help!
> 
> - Jason
> 
> On Thursday, March 14, 2019 at 2:14:47 PM UTC-4, Jason wrote:
> 
>     Good Afternoon all,
> 
>      I am trying to debug an issue with using VirtualGL with an AMD
>     card. Running the command "vglrun +v -c 0 -d :1
>     /opt/VirtualGL/bin/glxinfo" (and other subsequent commands) produces
>     the following error:
> 
>     [VGL] Shared memory segment ID for vglconfig: 28704793
>     [VGL] VirtualGL v2.6.1 64-bit (Build 20190101)
>     name of display: localhost:10.0
>     [VGL] Opening connection to 3D X server :1
>     [VGL] NOTICE: Replacing dlopen("libGL.so.1") with
>     dlopen("libvglfaker.so")
>     [VGL] NOTICE: Replacing dlopen("libGL.so.1") with
>     dlopen("libvglfaker.so")
>     [VGL] WARNING: Could not load function "glXSwapIntervalEXT"
>     [VGL] WARNING: Could not load function "glXBindSwapBarrierNV"
>     [VGL] WARNING: Could not load function "glXJoinSwapGroupNV"
>     [VGL] WARNING: Could not load function "glXQueryFrameCountNV"
>     [VGL] WARNING: Could not load function "glXQueryMaxSwapGroupsNV"
>     [VGL] WARNING: Could not load function "glXQuerySwapGroupNV"
>     [VGL] WARNING: Could not load function "glXResetFrameCountNV"
>     [VGL] Using Pbuffers for rendering
>     failed to create drawable
>     X Error of failed request:  BadValue (integer parameter out of range
>     for operation)
>       Major opcode of failed request:  53 (X_CreatePixmap)
>       Value in failed request:  0x1e
>       Serial number of failed request:  30
>       Current serial number in output stream:  31
> 
> 
>     Some details:
> 
>       * OS: 4.15.0-46-generic #49~16.04.1-Ubuntu SMP x86_64 GNU/Linux
>       * GPU:
>           o 65:00.0 VGA compatible controller: Advanced Micro Devices,
>             Inc. [AMD/ATI] Vega 10 XT [Radeon PRO WX 9100] (prog-if 00
>             [VGA controller])
>                     Subsystem: Advanced Micro Devices, Inc. [AMD/ATI]
>             Device 0c1e
>                     Flags: bus master, fast devsel, latency 0, IRQ 155
>                     Memory at 3a000000000 (64-bit, prefetchable) [size=16G]
>                     Memory at 3a400000000 (64-bit, prefetchable) [size=2M]
>                     I/O ports at 4000 [size=256]
>                     Memory at c4400000 (32-bit, non-prefetchable)
>             [size=512K]
>                     [virtual] Expansion ROM at c44a0000 [disabled]
>             [size=128K]
>                     Capabilities: <access denied>
>                     Kernel driver in use: amdgpu
>                     Kernel modules: amdgpu
>       * The connection is over SSH with X forwarding
>       * The AMD proprietary driver is installed (although, I'm skeptical
>         whether it is in use or not)
>       * We are using a custom xorg file to keep our headless
>         configuration separate:
>           o Section "Device"
>                     ### Available Driver options are:-
>                     ### Values: <i>: integer, <f>: float, <bool>:
>             "True"/"False",
>                     ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
>                     ### <percent>: "<f>%"
>                     ### [arg]: arg optional
>                     #Option     "ShadowFB"                  # [<bool>]
>                     #Option     "DefaultRefresh"            # [<bool>]
>                     #Option     "ModeSetClearScreen"        # [<bool>]
>                     Identifier  "Card1"
>                     Driver      "amdgpu"
>                     BusID       "PCI:101:0:0"
>             EndSection
>       * There is a separate graphics card installed for ensuing that we
>         can attach a display to the machine if all else fails.
>       * The VirtualGL config was setup with proper access
> 
>     Please let me know if there are any further details that you need.
>     We appreciate the help with this issue.
> 
>     Thanks,
>         Jason
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "VirtualGL User Discussion/Support" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected]
> <mailto:[email protected]>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/virtualgl-users/08d31580-77af-4efb-add3-9734d5d22abb%40googlegroups.com
> <https://groups.google.com/d/msgid/virtualgl-users/08d31580-77af-4efb-add3-9734d5d22abb%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"VirtualGL User Discussion/Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/virtualgl-users/03e88bed-5e7e-1c5a-d70d-1d087ea89792%40virtualgl.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to