GWSL-Source
GWSL-Source copied to clipboard
Modify VcxSrv launch options?
When trying to create an OpenGL context, I get the following error:
GLFW error 65543: GLX: Failed to create context: GLXBadFBConfig Could not create an OpenGL 3.2 context!
According this SO thread, this issue can be resolved by modifying VcxSrv launch options. Is there a way to do this for gWSL?
Thanks!
Yes. Simply start GWSL, right click the GWSL systray icon, Xserver Profiles, Add a Profile. Create a profile with the vcxsrv flags you want and save it. Then go to the right click menu again and switch to the newly created profile.
Thanks. I tried it, but it turns out, that wasn't the problem. I couldn't create an OpenGL 3.2 context because the highest version supported was 1.4. The reason for that was that LIBGL_ALWAYS_INDIRECT
was set.
To check if you have this problem, run:
glxinfo | grep 'direct rendering:'
If this returns: direct rendering: No (LIBGL_ALWAYS_INDIRECT set)
, you have the same problem. You can't use indirect rendering, because indirect only supports opengl up to version 1.4
; I need 3.2. Edit .bashrc
or config.fish
to not define this variable (just setting to 0 didn't work for me); in my case, I had to erase it becaus it was defined elsewhere (in fish: set -e LIBGL_ALWAYS_INDIRECT
).
This wasn't enough yet though, I also had to upgrade opengl
to a newer version. Info's from here, which links to source command here; instructions are:
sudo add-apt-repository ppa:oibaf/graphics-drivers
sudo apt update
sudo apt upgrade
This will add a new apt
repository with a newer opengl (and other) version, which get installed once you do update & upgrade.
At your own risk.
Note that the first source says
From the link you are using LIBGL_ALWAYS_INDIRECT=1. The person (if any) who directed you to do that was proffering dubious guidance.
Your tool enabled LIBGL_ALWAYS_INDIRECT. Don't now enough about the topic to make judgements, though.
Huh. It does not enable libgl indirect by default, however. There is a button for it for convenience (and for some reason some tutorials I don't control say you have to click it) but I intentionally leave it off. Maybe I'll make a note in the manual saying it is not required
True. I think I actually pressed that button. It enables LIBGL_ALWAYS_INDIRECT
, but there's no way to disable it afterwards, which made me think that it is probably something that is a no-brainer to enable... perhaps a way to disable it again would be useful? Thanks for the work you're doing btw, this app is great!
I could actually do it for you & create a PR if you're interested :) Just point me in the general direction of which files to modify.
No worries. I can put it on my list to try to do next update (maybe later this month)