Closed mjbogusz closed 1 year ago
I wasn't aware you could run gui applications through WSL, its probably easier than using the gcc toolchain via msys2 on windows to build Marlin / run the sim?
I have no idea how MSYS2 setup goes, but for WSL you just have to install aforementioned VcXsrv, set it up and you can run GUI programs from any WSL shell.
Note that for the Marlin sim to work I had to DISABLE the LIBGL_ALWAYS_INDIRECT
- with it set SDL fails with Could not create GL context: GLXBadFBConfig
.
As a sidenote, VSCode integrates nicely into the equation via the WSL remote addon, so you can write, build and run Linux programs under Windows without touching a terminal.
The multisampling workaround should also help with older/simpler hardware running under native GNU/Linux - I've found numerous examples of people having this problem using e.g. older NVidia or Intel's integrated GPUs.
The included patch allows running Marlin Sim in WSL via VcXsrv (requires
LIBGL_ALWAYS_INDIRECT=0
). Without this patch it segfaults withSDL_CreateWindow: Failed to Create Window (Couldn't find matching GLX visual)
.Ref https://github.com/MarlinFirmware/Marlin/pull/24843