google-deepmind / lab

A customisable 3D platform for agent-based AI research
Other
7.11k stars 1.37k forks source link

SDL_Init( SDL_INIT_VIDEO ) FAILED (No available displays) #124

Closed lionminhu closed 5 years ago

lionminhu commented 5 years ago

Hello, I am not sure if it is appropriate to post this question here, but I have been installing DMLab by following these instructions in the readme.md and have run into a problem when trying to run bazel run :python_random_agent --define graphics=sdl -- --length=10000 --width=640 --height=480. This produces the following output.

kbkim@doota:~/mwlee/lab$ bazel run :python_random_agent --define graphics=sdl -- --length=10000 --width=640 --height=480
INFO: Invocation ID: 4bbfedf0-efc5-4665-965e-6259c4e2fbba
INFO: Build options --compilation_mode and --define have changed, discarding analysis cache.
INFO: Analysed target //:python_random_agent (0 packages loaded, 3766 targets configured).
INFO: Found 1 target...
Target //:python_random_agent up-to-date:
  bazel-bin/python_random_agent
INFO: Elapsed time: 0.527s, Critical Path: 0.03s
INFO: 0 processes.
INFO: Build completed successfully, 1 total action
INFO: Build completed successfully, 1 total action
Failed to get __file__ attribute.
GLimp_Init() - could not load OpenGL subsystem
GLimp_Init() - could not load OpenGL subsystem. See "/tmp/dmlab_temp_folder_bViTxY/baselab/crashlog.txt" for details.kbkim@doota:~/mwlee/lab$

The crash log file (/tmp/dmlab_temp_folder_bViTxY/baselab/crashlog.txt) is as follows.

deepmind_lab 1.36 linux-x86_64-debug redacted
SSE instruction set enabled
----- FS_Startup -----
We are looking in the current search path:
./baselab
./baselab/vm.pk3 (7 files)
./baselab/assets_oa.pk3 (17 files)
./baselab/assets_bots.pk3 (119 files)
./baselab/assets.pk3 (775 files)
/tmp/dmlab_temp_folder_bViTxY/baselab
/tmp/dmlab_temp_folder_bViTxY/baselab/empty_room.pk3 (1 files)

----------------------
919 files in pk3 files
execing default.cfg
execing q3config.cfg
couldn't exec autoexec.cfg
Hunk_Clear: reset the hunk ok
----- Client Initialization -----
Couldn't read q3history.
----- Initializing Renderer ----
-------------------------------
QKEY building random string
QKEY generated
----- Client Initialization Complete -----
----- R_Init -----
SDL_Init( SDL_INIT_VIDEO ) FAILED (No available displays)
SDL_Init( SDL_INIT_VIDEO ) FAILED (No available displays)
Setting r_mode -1 failed, falling back on r_mode 3
SDL_Init( SDL_INIT_VIDEO ) FAILED (No available displays)
----- Client Shutdown (Client fatal crashed: GLimp_Init() - could not load OpenGL subsystem) -----
RE_Shutdown( 1 )
Hunk_Clear: reset the hunk ok
-----------------------
GLimp_Init() - could not load OpenGL subsystem
GLimp_Init() - could not load OpenGL subsystem. See "/tmp/dmlab_temp_folder_bViTxY/baselab/crashlog.txt" for details.

Some additional information, such as OS and GPU, are as follows.

kbkim@doota:~/mwlee/lab$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.5 LTS
Release:    16.04
Codename:   xenial
kbkim@doota:~/mwlee/lab$ glxinfo | grep OpenGL
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 630 (Kaby Lake GT2) 
OpenGL core profile version string: 4.5 (Core Profile) Mesa 18.0.5
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 18.0.5
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 18.0.5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

I have not changed python.BUILD during the build. Also, I have Bazel release 0.21.0 and Python 3.6.8.

I am not sure if this will be useful, but previously, I had NVidia drivers installed but did not actually have NVidia GPU, I purged the NVidia driver:

sudo apt-get purge nvidia*
sudo apt-get install --reinstall libgl1-mesa-glx libgl1-mesa-dri xserver-xorg-core

Thank you in advance.

tkoeppe commented 5 years ago

Just to confirm the obvious, but are you actually working on a terminal with a screen? I.e. is DISPLAY set, and you're not, say, on a text-only TTY or SSH connection?

lionminhu commented 5 years ago

I am working with an external monitor attached through HDMI, but it turns out that the display is actually not detected: display undetected While I need to find a solution for this, I believe the rest of this problem may be unrelated to the DMLab, so I will close this issue for now. I will reopen it later if necessary.

Thank you for your quick help.