Failed visuals, can't get output window example B1

I’m working on setting up Geant4 and made it to running examples. I seem to be able to run the macros well with no problem and get the correct outputs however I cannot get the visual from running the example. I see the output window with the visual very briefly and it disappears as soon as it loads. I’m also getting this error:
qt.qpa.xcb: QXcbConnection: XCB error: 1 (BadRequest), sequence: 165, resource id: 90, major code: 130 (Unknown), minor code: 47
qt.qpa.xcb: QXcbConnection: XCB error: 170 (Unknown), sequence: 180, resource id: 90, major code: 146 (Unknown), minor code: 20
The X11 connection broke: I/O error (code 1)
XIO: fatal IO error 2 (No such file or directory) on X server “localhost:0.0”
after 607 requests (605 known processed) with 0 events remaining.

I was having problems with getting gui earlier so I followed Linux Terminal & GUI Inside of Windows 10 (WSL) - YouTube and installed Xming which is running in the background. I can run other gui programs like xeyes and xcalc etc with no issues and they do not disappear, but I cannot get the detector visual of example B1 to stay. My system information is here:
Geant4 Version: v11.1.1
Operating System: Ubuntu for WSL
Compiler/Version: Ubuntu 2204.2.33.0

Thanks in advance for the help,

Gosh, Deniz, you are ambitious!! We are seeing problems on the latest Ubuntu (see Visualisation problem in example B3)…and you also hope it will work under WSL?!! This is a configuration we have not tested—not possible to test all thousands of possibilities.

Is there any way you can get hold of a more straightforward platform for Geant4?


Unfortunately I’m confined to using WSL. I have a college who was able to make it work. I can try installing Ubuntu 22.04.2 LTS or Ubuntu 20.04.6 LTS is the issue does not appear to be a problem there. What do you recommend?

I’m afraid I am not in a position to recommend a Ubuntu version—I do not use it. Sorry, hope someone else can help.


Managed to fix the issue by switching from Xming to Vcxsrv for the x server. Everything is running fine even though I still don’t understand what was wrong.

Ah. Good to hear you fixed it.

Using Ubuntu 20.04 under WSL I have experienced many failures of Windows X servers, including Xming and Vcxsrv. This is partly a matter of keeping the display driver up to date and will depend on the hardware, but sometimes even this doesn’t help.
If you have further problems I would recommend updating your WSL to or newer (wsl --update). Then you will not require a Windows X server as the X graphics will be handled internally by Wayland. This has been working flawlessly for me.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.