I am:
- Running a program on a Ubuntu 20.04 AWS instance
- Using SSH & X11 forwarding in PuTTY, with the VcXsrv X-server, to run program GUIs on my local Windows 11 machine
The GUIs of test programs like xclock/xeyes successfully run on my local machine. The issue arises when trying to run the GUI of interest (NVIDIA's Isaac Gym). I run a test script that activates the GUI. It opens up for a second, closes, then I get the following error:
X Error of failed request: BadIDChoice (invalid resource ID chosen for this connection)
Major opcode of failed request: 148 ()
Minor opcode of failed request: 3
Resource id in failed request: 0x200002
Serial number of failed request: 26
Current serial number in output stream: 18
The Opcodes
As per the Xorg opcode page (thanks Kenster):
- Major opcode: PRESENT extension (apparently called for things related to "frame representation timing" - screen refreshing, tear-free rendering, etc.)
- Minor opcode: X_PresentSelectInput request (apparently "selects a set of Present events to be delivered for the specified window on the X server specified by display" - source)
It sounds like it's just an initial request that's sent when setting up/running PRESENT-related things.
How do I fix this? Some help would be greatly appreciated.
More System Info
Server
As per this well-known post for setting up X11 forwarding:
/etc/ssh/sshd_configlooks as follows:#AllowAgentForwarding yes # unspecified X11Forwarding yes # activated #X11DisplayOffset 10 # unspecified #X11UseLocalhost yes # unspecified/etc/ssh/ssh_configlooks as follows:# FowardX11 yes # unspecified # ForwardX11Trusted yes # unspecifiedxauthis installed$ xauth -V 1.1- The server's
DISPLAYvariable seems to be set correctly$ env | grep DISPLAY DISPLAY=localhost:10.0 - The
XAUTHORITYvariable seems empty$ env | grep XAUTHORITY $
PuTTY
X Server (VcXsrv)
Using XLaunch:
- "Display number" is -1 (to let vcxsrv automatically choose one)
- "Disable access control" box is unchecked
What I've Tried
The following all yield the BadIDChoice error mentioned up top:
- (After reading David G.'s answer) Enabled
ForwardX11Trustedin/etc/ssh/ssh_config, together with "Disable access control" in XLaunch- Tried once with
X11UseLocalhost noin/etc/ssh/sshd_config - Tried once with
#X11UseLocalhost yes(commented out)
- Tried once with
- Changing VcXsrv "Display number" to
0 - Changing PuTTY "X display location" to
localhost:0
Other Errors:
- Changing VcXsrv "Display number" to
1or10--> yields (4 times for some reason):PuTTY X11 proxy: unable to connect to forwarded X server: Network error: Connection refused
