NatronGitHub / Natron

Open-source video compositing software. Node-graph based. Similar in functionalities to Adobe After Effects and Nuke by The Foundry.
http://NatronGitHub.github.io
GNU General Public License v2.0
4.62k stars 337 forks source link

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

Open garyo opened 2 years ago

garyo commented 2 years ago

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?

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.
devernay commented 2 years ago

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

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

garyo commented 2 years ago

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

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

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

garyo commented 2 years ago

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 commented 2 years ago

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!

garyo commented 2 years ago

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 commented 2 years ago

https://github.com/microsoft/WSL/discussions/6154 seems to be related.

garyo commented 2 years ago

@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.