Created attachment 621 [details] Gui with empty geometry window built with Qt and X11 on FC 32 with Wayland display server Recently I posted a problem to the Geant4 forum about using Qt and X11 which produced a "see-through" or empty geometry window ("Empty see-through graphics window in Qt session for B1 example" in "Recording, Visualizing and Persisting Data" forum category posted 2020-05-04 - see attachment). The problem was that I had built Geant4 with the Qt and X11 options, but my upgraded Linux system (Fedora 32) was using Gnome with Wayland as the default display server rather than X11. I was able to switch my session to Gnome with Xorg which uses X11 as the display server, and the Qt GUI became normal. However, Wayland is now the default display server for Fedora and some other Linux distributions and will likely continue to become default for others since it is probably superior to X11. My worry is that at some point, they may quit supporting X11. I would like there to be a Wayland build option for Geant4. Is this reasonable? Do Geant4 developers have any plans to include it as an option sometime in the future and, if not will they consider it? Thank you.
Hi John Thanks for this feedback. I think we need to be aware of this development. But as you probably can guess, we are stretched for effort in this direction. I am not aware of any expertise in Wayland in the Collaboration. It looks like this is a configuration issue rather than any (or much) C++ code. Nevertheless it needs some thought. Strictly speaking this is not a bug, so I am closing this report, but I will add it to our to-do list. Best wishes John
Hi John, Thank you for your response. I certianly understand that you are stretched thin and I agree that issue this is by no means urgent, since X11 should be available for some time to come. Thank you for your consideration. John
Hi John I broadcast this to some system and graphics "experts" in Geant4. Here are some responses: It appears that Qt support is there: https://doc.qt.io/qt-5/wayland-and-qt.html. We have Qt drivers that might work without much trouble. https://wiki.archlinux.org/index.php/wayland indicates that there is an "XWayland" package that allows running legacy X11 apps in it. So it might not be too difficult to get something running (but nothing is ever easy) and if your requirement remains we would welcome some collaboration with you. John
Hi John, I do not have a short term requirement, but if X11 support ever gets dropped by Fedora and other Linux distributions, I will. That being said, I am running Fedora 32. I checked and I have the xorg-x11-server-Xwayland package installed. I am definitely willing to collaborate with you, but you should be aware that I am a nuclear physicist and not a computer scientist. My coding ability sadly reflects that fact. John
As a follow up to the XWayland comment, I ran example B1 under Fedora 32 in a Gnome Wayland session, with the default mutter compositor and then the Weston compositor, and ran a bunch of tests to see if the B1 gui window was recognized as an X window. There are about a half a dozen standard ways to do this which I won't go into here, but all of them failed to recognize any part of the B1 window as being an X application. As I said previously, XWayland is installed and is supposed to automatically allow X applications to work under Wayland. Interestingly, when I opened other X applications such as xterm or xclock under Gnome Wayland, they were recognized as X windows. (As a control, I ran the same tests in a Gnome X session and all the windows were recognized as X applications.) Thus, XWayland seems to not work only for the Geant4 application. This may suggest that the problem originates in the interaction of X11, Qt and/or OpenGl during the Geant4 building process. I will try to raise this question on the most appropriate forum or problem tracker, likely a Fedora forum and/or Red Hat Bugzilla. John
Thanks for following up on this. We may have to dig into our build system to understand why our viewer windows are not recognised as X windows. As a thought... Could you build Geant4 with *only* X11 -DGEANT4_USE_RAYTRACER_X11=ON \ -DGEANT4_USE_OPENGL_X11=ON \ i.e., without Qt? (Maybe you have already done this - apologies.)
Hi John, Thanks for your reply. Recompiling with no Qt was on my to do list. I just hadn't got there yet. I recompiled Geant4 with only X11 (no Qt) and then recompiled B1. It runs OK with the geometry being displayed in an X window. If I run B1 under Wayland, the X window is recognized. John
Thanks for this feedback, John. I have observed "interference" between Qt and X11, but that was some time ago, and it seems to have disappeared, possibly with newer Qt releases (I'm on Qt 15.5.0). I've marked this report as fixed. Perhaps we can add something in the Release Notes?
Hi John, I am OK with closing this report. It would be nice if the release notes said something about the issue, namely that if X11 is needed under a Wayland environment, do not compile Geant4 with Qt too (at least under Fedora with Gnome). As a final note, I am running Qt version 5.14.2. When I run example B1 with X and Qt under Wayland and actually run a macro such as run2.mac in the qt session sub window, I get the following error in the output sub window: qt.qpa.wayland: Wayland does not support QWindow::requestActivate() It doesn't mean much to me, but it might give a hint to the Geant developers. Thanks for your help. John