Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Natron doesn't start on WSL2/Win10 with VcXsrv #682

Open
8 of 11 tasks
garyo opened this issue Oct 18, 2021 · 7 comments
Open
8 of 11 tasks

Bug: Natron doesn't start on WSL2/Win10 with VcXsrv #682

garyo opened this issue Oct 18, 2021 · 7 comments
Labels
type:bug Something isn't working

Comments

@garyo
Copy link

garyo commented Oct 18, 2021

  • I'm using the latest version of Natron (not required but recommended)
  • I've restarted Natron and the issue persists
  • I've run Natron via the command line and the issue persists
  • I've followed the contributing guidelines to the best of my understanding
  • My issue is not on the issue tracker and is not a duplicate of a forum thread
  • This bug is reproducible
  • This issue is not a feature request or a pull request

Natron version

Natron 2.4.0

Operating system

WSL2 running Ubuntu 20.04 on Windows 10

System specs

RAM: 64GB
CPU: AMD Threadripper
GPU: 2x NVIDIA

Did you install Natron using the official installer?

  • Yes, I used the official installer
  • No, I installed from a binary archive
  • No, I compiled Natron from sources
  • No, I installed Natron via another method

If you installed to a custom '(non-default)' location please include it here':'

No response

What were you trying to do?

Start Natron in a WSL2 container, displaying on Windows using VcXsrv.

What did you expect to happen? What happened instead?

Expected it to run OK, at least with LIBGL_ALWAYS_SOFTWARE=1. But it doesn't start; gives these errors on the cmdline:

% LIBGL_ALWAYS_INDIRECT=1 LIBGL_ALWAYS_SOFTWARE=1 /tmp/Natron-2.4.0-Linux-64-no-installer/Natron
Natron Version 2.4
(C) 2018-2021 The Natron developers
(C) 2013-2018 INRIA and Alexandre Gauthier-Foichat
>>>Use the --help or -h option to print usage.<<<
Error while loading OpenGL: GLX: Created context is not doing direct rendering
OpenGL rendering is disabled.
GLX: Created context is not doing direct rendering
GLX: Created context is not doing direct rendering
Info: init.py script not loaded (this is not an error)
Info: initGui.py script not loaded (this is not an error)
GLX: Created context is not doing direct rendering

and then a dialog box where clicking OK causes Natron to exit:



### Step-by-step reproduction instructions

```markdown
* On Windows 10, enable and set up WSL2
* Install Ubuntu 20.04 in WSL2
* Install & start vcXsrv, configure it with (or without) native OpenGL and turn off X11 security
* Install Natron in Ubuntu
* Start Natron
* Observe errors and exit

Additional details

It does run OK in the new Windows 11 version which has a built-in X11 server, but not in Windows 10 using VcXsrv. Happy to provide more info; just ask.
@garyo garyo added the type:bug Something isn't working label Oct 18, 2021
@devernay
Copy link
Member

Hi Gary, I didn't know you were a Natron user, and welcome!

  • Is native openGL enabled or disabled in VcXsrv?
  • Does "glxgears" work fine? Of course, set the same environment variables to the same values when running it.
  • Can you please please attach the output of "glxinfo" (from mesa-utils package) and "glewinfo" (from glew-utils) to this ticket? Both on Win10+VcXsrv and Win11 would be nice. Same environment variables too.
  • This comment mentions that one should use LIBGL_ALWAYS_INDIRECT=0 AND diable native OpenGL, did you try that as well? Does WSL support openGL? microsoft/WSL#2855 (comment)

If none of these fixes the issue, I'm not sure we can do something about it, though.

@garyo
Copy link
Author

garyo commented Oct 18, 2021

Hi! Yes, I use it quite a bit these days.

  • VcXsrv has native openGL enabled
  • glxgears seems to work OK, both with & without LIBGL_ALWAYS_INDIRECT: 337 fps w/ indirect, 228 fps without indirect. However it does give these errors on startup:
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast

I tried disabling native OpenGL, it didn't seem to make any difference to Natron. (I'll try it again though.)

On the Win10 machine with vcXrsv, where it doesn't work:

I'll add the files from Win11 in a minute.

@garyo
Copy link
Author

garyo commented Oct 18, 2021

Here are the same logs from the Win11 system where Natron works OK. I note that on that system, glxgears doesn't print those errors.

glewinfo.txt
glxinfo.txt

@devernay
Copy link
Member

Thanks!
Does this impair your productivity, and do you have a need for running it under WSL2 with Win10? Or does the fallback solution (using Win11) fix the issue for you?
If that's OK with you, we could mark the issue as wontfix, and state this is an unsupported configuration. It may work again when we switch to Qt5/6 (which will not happen soon).
Anyway, thanks for testing this! I didn't even know WSL2 now had X11 graphics under Win11, this opens a new world for Windows users!

@devernay devernay changed the title Bug: Natron doesn't start on WSL2 Bug: Natron doesn't start on WSL2/Win10 with VcXsrv Oct 19, 2021
@garyo
Copy link
Author

garyo commented Oct 19, 2021

My main system is still Win10 (uses older Threadripper CPU & can't upgrade to Win11 for various reasons) so yes it would be very nice if I could do Linux OFX development there... but if it needs the newer OpenGL features maybe there's nothing that can be done? If there's anything I can try, please let me know.

@rodlie
Copy link
Contributor

rodlie commented Oct 19, 2021

microsoft/WSL#6154 seems to be related.

@garyo
Copy link
Author

garyo commented Oct 20, 2021

@rodlie absolutely. It creates the WSLg distro that runs in the background, running Wayland, X11, as well as sound etc. But requires Win11 at this point.

Actually I was able to get Win11 on my main dev machine today! So I don't need this as much anymore. Natron works OK in that situation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants