5

I've got Ubuntu 16.04 running in Windows 10 16251.0 as a Linux subsystem, and I've got Xming-mesa 6.9.0.31 installed.

I launch Xming using Xming :0 -multiwindow -clipboard

Then in my Ubuntu bash shell I type export DISPLAY=:0 and I can launch graphical applications in Xming.

However, I do not get accelerated graphics, so when I launch an editor (e.g. sudo spyder3), I have to deal with the jerky scrolling and such that you get without acceleration.

How do I fix this? I'm sure my video card (AMD RX480 latest drivers) supports OpenGL, but for some reason I'm not activating it correctly.

geofurb
  • 153
  • 1
  • 1
  • 4
  • Related question: https://superuser.com/questions/1487555/how-to-troubleshoot-opengl-on-ubuntu-under-windows-10-wsl – Tropilio Apr 15 '20 at 10:08

1 Answers1

3

Run export LIBGL_ALWAYS_INDIRECT=1 in WSL to force rendering to happen on the Windows side of things.

Aido
  • 249
  • 3
  • 12
  • `export LIBGL_ALWAYS_INDIRECT=1` `export DISPLAY=:0` `sudo spyder3` No change :( – geofurb Aug 08 '17 at 20:04
  • @geofurb What if you try it with `glxgears`? – Aido Aug 08 '17 at 20:06
  • How would I do that? – geofurb Aug 08 '17 at 20:06
  • `glxgears` isn't realted to `spyder3`, I want you to see if `LIBGL_ALWAYS_INDIRECT` impacts `glxgears`. – Aido Aug 08 '17 at 20:07
  • ~1300FPS, but it jolts every so often. (Unless that's part of the intended behavior?) – geofurb Aug 08 '17 at 20:10
  • What's the difference when `LIBGL_ALWAYS_INDIRECT` is and isn't set. – Aido Aug 08 '17 at 20:10
  • Similar performance after executing `export LIBGL_ALWAYS_INDIRECT=0` – geofurb Aug 08 '17 at 20:11
  • Did you unset `LIBGL_ALWAYS_INDIRECT` before running it the first time? – Aido Aug 08 '17 at 20:12
  • Negative; confirmed with `export -p` that `LIBGL_ALWAYS_INDIRECT` was set for the first run and unset for the second run. – geofurb Aug 08 '17 at 20:14
  • I don't know, then. Sorry. – Aido Aug 08 '17 at 20:17
  • What's the reasoning there? – geofurb Aug 09 '17 at 02:40
  • @geofurb Oh I just remembered, it's an option in XMing as well, or at least VcXsrv has it. – Aido Aug 09 '17 at 04:40
  • So setting LIBGL_ALWAYS_INDIRECT=0 doesn't refert the framerate from glxgears to software accelerated speeds; HOWEVER, rebooting the machine restores it to software acceleration, and you get ~60fps instead of ~1300fps. What's going on that Spyder isn't benefiting from this graphical acceleration? – geofurb Aug 10 '17 at 00:16
  • Would XDMCP offer better performance or worse, since I'm rendering on the Windows computer? – geofurb Aug 10 '17 at 01:29
  • 1
    When I use this with `-wgl` it makes glxgears far slower. The only smooth animation is no `-wgl` and no `LIBGL_ALWAYS_INDIRECT`. – user541686 Apr 18 '19 at 23:42
  • @user541686 I had to do the same. See this related question for more info: https://superuser.com/questions/1487555/how-to-troubleshoot-opengl-on-ubuntu-under-windows-10-wsl – Tropilio Apr 15 '20 at 10:09