Sample Header Ad - 728x90

SSH X11 Forwarding - GUI Crashes with X Error of failed request: BadIDChoice

0 votes
1 answer
63 views
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_config looks as follows:
#AllowAgentForwarding yes   # unspecified
  X11Forwarding yes           # activated
  #X11DisplayOffset 10        # unspecified
  #X11UseLocalhost yes        # unspecified
- /etc/ssh/ssh_config looks as follows:
#   FowardX11 yes           # unspecified
  #   ForwardX11Trusted yes   # unspecified
- xauth is installed
$ xauth -V
  1.1
- The server's DISPLAY variable seems to be set correctly
$ env | grep DISPLAY
  DISPLAY=localhost:10.0
- The XAUTHORITY variable seems empty
$ env | grep XAUTHORITY
  $
**PuTTY** - Obviously "Enable X11 forwarding" box is checked - "X display location" is empty PuTTY SSH > X11 settings **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 ForwardX11Trusted in /etc/ssh/ssh_config, together with "Disable access control" in XLaunch - Tried once with X11UseLocalhost no in /etc/ssh/sshd_config - Tried once with #X11UseLocalhost yes (commented out) - Changing VcXsrv "Display number" to 0 - Changing PuTTY "X display location" to localhost:0 Other Errors: - Changing VcXsrv "Display number" to 1 or 10 --> yields (4 times for some reason):
PuTTY X11 proxy: unable to connect to forwarded X server: Network error: Connection refused
----------
Asked by sumsamson (1 rep)
Jun 13, 2025, 05:35 AM
Last activity: Jun 17, 2025, 10:33 PM