Root TCanvas weird behavior in vscode WSL system

Hello everyone, I’m currently attempting to run the precompiled version of root_v6.22.00_Linux-ubuntu20-x86_64-gcc9.3 through VScode on WSL (ubuntu 20.04). It seems to be functioning correctly overall, but I’m encountering some strange behavior when opening TCanvas. I’ve attached a few screenshots illustrating the issue.

Firstly, if you observe the taskbar with options such as file, edit, view, etc., the drop-down box is opening at random positions instead of directly below the corresponding taskbar option. Additionally, the fonts appear unusually small. Also, the mouse pointer is mirrored compared to its usual orientation.

I didn’t experience these problems on my previous Ubuntu system. Is there a fix for this issue, perhaps related to Windows or something else? Thanks in advance.




@dastudillo, Thank you for sharing the thread. However, I find myself a bit confused regarding the measures that should be taken to address this issue. Could you please offer some guidance or suggestions on how to effectively tackle this problem? Thanks again.

Hello,

I’m not sure if you have resolved your issue, but I’m encountering a similar problem. As a workaround for display issues I was having in VSCode, I used Mobaxterm to launch WSL, which successfully displays the ROOT canvas.

However, the performance of the built-in Xming server in Mobaxterm is quite poor. The plots it renders are coarse and sluggish. When I rotate a 3D plot, there is noticeable ghosting and trailing. The visual quality is far inferior to rendering directly in the VSCode terminal, where the plots are crisp and vibrant.

My goal is to either fix this performance issue with Mobaxterm’s Xming or, preferably, solve the original display problem in VSCode. I have already tried using VcXsrv, but it failed; when I attempted to fill the canvas with data, the application crashed / the window became corrupted.

Any help would be greatly appreciated.

In my case, it was working after installing VcXsrv (didn’t use VSCode, though) as I said in my last post of the thread I linked.

However, in more recent versions (of WSL, I suppose) the problem partially reappeared: the menus again show up in random locations, but at least I am able to click on them –with the cursor seen at a different place, but the menu items are highlighted and clicking works. By the way, VcXsrv is no longer needed; ROOT works the same (and the same visual issues) with or without the additional (apart from WSL itself) X server.

From what I have read online it seems to be something related to the GUI toolkit (Tk, I guess?), but that’s beyond my current understanding, so I just live with it and hope it continues to work :slight_smile: I use linux most of the time, so fortunately I don’t face these issues too often. In any case, ROOT is moving to opening the canvas/browsers in web tabs or windows, so maybe this will not matter at some point; perhaps you can try that, you just may or may not need to install a browser inside WSL for this to work, if it doesn’t open on the browser you have on Windows –I have not done it on WSL, so I’m not sure.

I’m using WSL2 with VcXsrv, and it overall works fine. However, as I mentioned earlier, the toolbar options appear in random locations on the screen instead of directly beneath the toolbar, which is quite annoying - especially when using multiple monitors. Despite this, it doesn’t affect functionality, so after dealing with it for a year or two, I’ve made peace with it.

That said, I’m a bit surprised to hear that it’s crashing in your case. In case you’re wondering, I’ve followed the instructions mentioned in the thread above.