Skip to content
This repository has been archived by the owner on Apr 6, 2018. It is now read-only.

Demo for "flashgames.DuskDrive-v0" cannot run on virtual machine guest Ubuntu 16.04 LTS #42

Closed
mr-cloud opened this issue Dec 8, 2016 · 15 comments

Comments

@mr-cloud
Copy link

mr-cloud commented Dec 8, 2016

I have just installed all the requirements in VM Ubuntu 16.04 LTS as the doc said -- https://github.com/openai/universe.

Then I started docker and opened the browser-based VNC-client, all both worked well. But when I ran the demo for "flashgames.DuskDrive-v0" in PyCharm as above guide, I got the output also errors in console:

[2016-12-09 02:34:48,212] Making new env: flashgames.DuskDrive-v0
[2016-12-09 02:34:48,276] Writing logs to file: /tmp/universe-7615.log
[2016-12-09 02:34:48,289] Using the golang VNC implementation
[2016-12-09 02:34:48,289] Using VNCSession arguments: {'start_timeout': 7, 'fine_quality_level': 50, 'encoding': 'tight', 'subsample_level': 2}. (Customize by running "env.configure(vnc_kwargs={...})"
[2016-12-09 02:34:48,327] [0] Connecting to environment: vnc://localhost:5900 password=openai. Use the browser-based VNC client: http://localhost:15900/viewer/?password=openai
2016/12/09 02:34:48 I1209 02:34:48.329181 7615 gymvnc.go:417] [0:localhost:5900] opening connection to VNC server
2016/12/09 02:34:48 I1209 02:34:48.376161 7615 gymvnc.go:550] [0:localhost:5900] connection established
libGL error: unable to load driver: vmwgfx_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: vmwgfx
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
libEGL warning: DRI2: failed to open vmwgfx (search paths /usr/lib/x86_64-linux-gnu/dri:${ORIGIN}/dri:/usr/lib/dri)
libEGL warning: DRI2: failed to open swrast (search paths /usr/lib/x86_64-linux-gnu/dri:${ORIGIN}/dri:/usr/lib/dri)
2016/12/09 02:34:48 C1209 02:34:48.549093 7615 vncgl.go:40] failed to initialize glfw: APIUnavailable: EGL: Failed to initialize EGL: EGL is not or could not be initialized

Process finished with exit code 1

And the specific page of "flashgames.DuskDrive-v0" is blank.
My host OS is Windows 10 with graphics Intel HD5500 and NVIDIA GeForce 940m, I use VMware workstation 11 to virtualize the Ubuntu 16.06 LTS. And I try Universe in Ubuntu.

Could you please give me some advice, any solution would be appreciated.

@jeremyschlatter
Copy link
Contributor

Looks like a mismatch between the OpenGL version that go_vncdriver is looking for and the version you have installed. Do you know which version of OpenGL you have installed?

@jeremyschlatter
Copy link
Contributor

Also, could you try running this example go-gl program? You'll need to set $GOPATH if you haven't done so yet:

mkdir -p $HOME/go
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin

Then run:

go get -u github.com/go-gl/examples/gl21-cube
gl21-cube

@mr-cloud
Copy link
Author

mr-cloud commented Dec 9, 2016

Hi,
I checked the version as you told:

  • $ go version
    go version go1.6.2 linux/amd64
  • $ pip list | grep vnc
    go-vncdriver (0.4.17, /home/leo/datahouse/git/go-vncdriver)
  • $ glxinfo | grep 'version'
    server glx version string: 1.4
    client glx version string: 1.4
    GLX version: 1.4
    Max core profile version: 0.0
    Max compat profile version: 2.1
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 2.0
    OpenGL version string: 2.1 Mesa 11.2.0
    OpenGL shading language version string: 1.20
    OpenGL ES profile version string: OpenGL ES 2.0 Mesa 11.2.0
    OpenGL ES profile shading language version string: OpenGL ES GLSL ES 1.0.16

And I can run the example as you mentioned and got a spinning cube. Is there anything wrong?

@moniquelive
Copy link

moniquelive commented Dec 11, 2016

@mr-cloud I stumbled on the same situation (running virtualbox here).
We solved it by turning off 3D acceleration on the VM preferences. Hope that helps.

@mr-cloud
Copy link
Author

mr-cloud commented Dec 12, 2016

@lccro I have tried as you mentioned, and now the driver vmwgfx error disappeared but the driver swrast error still exists. Can you explain this problem and how can I solve it?

@mr-cloud
Copy link
Author

Finally, I solved my problem by removing the "libstdc++.so.6" in my Anaconda environment. It seems that this library which is maintained by the newest Anaconda is out-dated. You may use locate libstdc++.so.6 to find out whether your python environment includes this library by system libraries (i.e., "/usr/lib/x86_64-linux-gnu/libstdc++.so.6" in Ubuntu 16.04 LTS).
Wish this method help anyone else like #54

@msouder
Copy link

msouder commented Dec 29, 2016

I have a similar problem to @mr-cloud. My error when I run the example code is:

2016/12/28 16:50:52 I1228 16:50:52.787594 4879 gymvnc.go:550] [0:localhost:5900] connection established
libEGL warning: DRI2: failed to authenticate
libEGL warning: DRI2: failed to open swrast (search paths /usr/lib/x86_64-linux-gnu/dri:${ORIGIN}/dri:/usr/lib/dri)
2016/12/28 16:50:54 C1228 16:50:54.125747 4879 vncgl.go:40] failed to initialize glfw: APIUnavailable: EGL: Failed to initialize EGL: EGL is not or could not be initialized

When I do locate libstdc++.so.6, the results are:

/usr/lib/x86_64-linux-gnu/libstdc++.so.6
/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22
/usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22-gdb.py

So nothing in Anaconda. Are there any other solutions?

@mr-cloud
Copy link
Author

Your console has a message: "libEGL warning: DRI2: failed to authenticate". Maybe the opengl you installed is not proper (e.g., the version collision or failed authentication).

@tlbtlbtlb
Copy link
Contributor

@msouder This is caused by your OpenGL installation. You can test it by runing

$ glxinfo

which should give a long list of info and not an error message, and

$ glxgears

which should show some gears spinning in a window. If both these don't work, look at Ubuntu forums for installing OpenGL.

@msouder
Copy link

msouder commented Dec 29, 2016

Thanks @tlbtlbtlb. $ glxinfo gives me quite a long list of information and no errors, while $ glxgears shows me some nice spinning gears at about 3k frames per second.

I am trying to get this to work on older hardware, a GeForce GT 335M that can only use the nvidia-340 driver. Maybe DRI doesn't work with that one? I tried switching to Nouveau drivers, but EGL still wouldn't initialize. I did get slightly different error messages though.

@tlbtlbtlb
Copy link
Contributor

Here's a thread with what seems like the same problem and several suggestions: https://steamcommunity.com/app/221410/discussions/2/828934089701456106/

You might try disabling DRI by setting:

$ export LIBGL_DRI3_DISABLE=1
$ export LIBGL_ALWAYS_INDIRECT=1

@mrlunk
Copy link

mrlunk commented Jan 20, 2017

I really can't tell what I did in the last few days that made it work finally after 5 tries but it works for my under virtualbox on win10 running Ubuntu 16.04 LTS ...
Video proof here:
https://www.youtube.com/watch?v=ufFVf9foYEg

@Xan-Kun
Copy link

Xan-Kun commented Feb 12, 2017

Did anybody get this to work in VirtualBox with 3D acceleration enabled?

@laksefest
Copy link

lccro's solution worked for me. Just turned off 3D acceleration in my Virtualbox settings and blam! Everything works, no messing with files :)

@Xan-Kun
Copy link

Xan-Kun commented May 11, 2017

@laksefest : Yes, that seems to do the trick. Definately worth to mention :-)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants