ROOT with WSLg

Hi,

As noted previously, recent versions of WSL (Windows Subsystem for Linux) now support WSLg on both Windows 10 and 11. WSLg allows full GUI support over Weyland or a built-in X11 server. This is a game-changer: no longer do you have to start an X11 server before running ROOT, and it seems to display much faster than using a native Windows X11 server.

Displaying output works really nicely and quickly, but unfortunately the ROOT GUI menus are almost unusable. The problem is that the menu pops up on a different part of the screen, detached from its parent. This is definitely a WSLg display problem, because I see the issue whether I run ROOT locally in my (CentOS7 or Ubuntu) WSL distro, or remotely from lxplus (7, 8, or 9) with the X11 tunneling over ssh. I see the same behaviour with ROOT 6.22 and 6.28. On the other hand, I never see this issue using a native Windows X11 server.

This has already been reported as a WSL issue, and similar problems are seen with a few other programs (eg. kdiff3). The suggestion there is this is a problem with Qt4, and it is resolved with Qt5.

Does ROOT (primarily ROOT built for LCG on CentOS/Alma) use Qt4 for its X11 GUI? Or is there a commonality that could explain why ROOT sees this problem? I’m asking here, because there doesn’t seem to be much activity in fixing the bug in WSL. If the only advice is to “upgrade to Qt5”, then it would be good to have some feedback about whether that (or something analogous) is possible for ROOT.

At the very least we can feed back this information to the WSL github issue. Best of all is if we can come up with a workaround or fix to get ROOT to work with WSLg. (Probably off-topic, but can ROOT use Weyland directly?)

I’m surprised I can’t find more reports of this issue, so just possibly it doesn’t affect everyone. If so, it would be great to hear from anyone for whom the WSLg GUI works correctly. Maybe I (and one or two others) have some setting or installation that can be fixed.

Thanks,
Tim.

ROOT Version: 6.28/00, 6.22/06
Platform: x86_64-centos9, x86_64-centos7, x86_64-ubuntu2004
Compiler: gcc12, gcc11, gcc9


Check out this thread, I saw the same over a year ago. In the end I stayed with WSL2 and an X server, and I haven’t tried again WSLg since then.

Thanks for the pointer. It’s good to know it isn’t just me here. Of course I too still have to use an X server because of this bug. That is a great pity for all the reasons you and I have outlined, and (perhaps saddest of all) makes using ROOT on Windows harder to get going for a new user (the Windows native app is nice, but has troubles of its own).

I hope my post adds the clue about Qt. Even if no one else has a better idea, can the ROOT team confirm whether LCG ROOT uses Qt, what version it is, and what prospects there are for using something else.

No, we don’t use Qt.

Interesting. Does it use another GUI manager, or raw X11 calls? I can follow up on the github issue I mentioned, but of course would be delighted to defer to you.

It uses X11 via the TVirtualX interface (on Linux)

Thanks for the pointer.

So if I understand the docs correctly, ROOT’s X11 implementation, TGX11 uses GX11Gui.cxx to handle the GUI. I guess that includes the misplaced menus, but I didn’t yet find anything specific. Is that right?

If no one has a better idea, I guess we can feed this back to the WSL developers.

Correct. But if it’s a bug in WSLg, I’m not going to invest time in trying to debug it (and I’m mostly working on native Windows anyway)

I posted a summary of my understanding of the issue and background on wslg #671. Let’s hope with this information, the WSLg experts can help.

1 Like

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