libretro / RetroArch

Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
http://www.libretro.com
GNU General Public License v3.0
10.24k stars 1.83k forks source link

Running without X? #5483

Closed lucasmr closed 7 years ago

lucasmr commented 7 years ago

[Description of the bug]

Trying to run retroarch without X installed on a gentoo machine. The relevant user flag "kms: Enable KMS context support (for OpenGL-based execution from a virtual terminal outside of a display server)" hints that this might be possible. All USE flags are below:

> + + 7zip                           : Enable 7z support
>  - - X                              : Add support for X11
>  + + alsa                           : Enable ALSA audio support
>  - - armvfp                         : Enable Vector Floating Point (VFP) instruction
>                                       set support for post-ARMv5 ARM architectures
>  + + assets                         : Add games-emulation/retroarch-assets as
>                                       dependency
>  - - cg                             : Enable Cg shader support
>  + + cheevos                        : Enable Archievment support via
>                                       http://retroachievements.org/
>  + + cores                          : Changes default retroarch.cfg to the
>                                       standardpath of the libretro* ebuilds
>  + + cpu_flags_x86_sse2             : Use the SSE2 instruction set
>  + + database                       : Add games-emulation/libretro-database as
>                                       dependency
>  + + debug                          : Enable extra debug codepaths, like asserts and
>                                       extra output. If you want to get meaningful
>                                       backtraces see https://wiki.gentoo.org/wiki/Proj
>                                       ect:Quality_Assurance/Backtraces
>  - - dispmanx                       : Enable Dispmanx video support, for arm only
>  + + egl                            : Enable EGL context support
>  + + fbo                            : Enable render-to-texture (FBO) support
>  - - ffmpeg                         : Enable FFmpeg recording support
>  - - gles2                          : Use GLESv2 instead of OpenGL
>  - - gles3                          : Enable OpenGLES3 support
>  - - jack                           : Enable JACK audio support
>  + + joypad_autoconfig              : adds games-emulation/retroarch-joypad-autoconfig
>                                       as dependency
>  + + kms                            : Enable KMS context support (for OpenGL-based
>                                       execution from a virtual terminal outside of a
>                                       display server)
>  - - lakka                          : Enable settings like in Retroarchs Linux
>                                       distrubtion Lakka
>  - - libass                         : Enable libass SSA/ASS FFmpeg-based subtitle
>                                       support
>  - - libusb                         : Enable libusb gamepad support
>  + + materialui                     : Enable materialui menu (named glui in driver
>                                       selection)
>  - - miniupnpc                      : Enable Mini UPnP client library (for NAT
>                                       traversal)
>  - - neon                           : Enable optimization support for ARM NEON
>                                       processors
>  + + netplay                        : Enable netplay support
>  + + network                        : Enable network support (recommended)
>  - - openal                         : Enable OpenAL audio support
>  + + opengl                         : Enable OpenGL display support
>  - - osmesa                         : Enable Off-screen Mesa rendering
>  - - oss                            : Enable OSS audio support
>  + + overlays                       : adds games-emulation/common-overlays as
>                                       dependency
>  - - pulseaudio                     : Enable PulseAudio support
>  - - python                         : Enable Python 3 shader support
>  + + python_single_target_python3_4 : Build for Python 3.4 only
>  - - python_single_target_python3_5 : Build for Python 3.5 only
>  - - python_single_target_python3_6 : Build for Python 3.6 only
>  + + python_targets_python3_4       : Build with Python 3.4
>  - - python_targets_python3_5       : Build with Python 3.5
>  - - python_targets_python3_6       : Build with Python 3.6
>  - - sdl                            : Enable SDL display support
>  + + sdl2                           : Enable SDL2 display support
>  + + shaders                        : Add games-emulation/common-shaders as dependency
>  + + threads                        : Threading support
>  + + truetype                       : Enable FreeType support
>  + + udev                           : Udev/Evdev gamepad support
>  - - v4l2                           : Enable video4linux2 support
>  - - videocore                      : Enables videocore context, for arm only
>  - - vulkan                         : Enable Vulkan display support
>  - - wayland                        : Enable dev-libs/wayland backend
>  - - xinerama                       : Enable Xinerama support
>  + + xmb                            : Enable xmb menu
>  + + xml                            : Enable libxml2 support
>  - - xv                             : Enable XVideo support
>  + + zlib                           : Enable zlib support (ZIP extract, PNG
>                                       decoding/encoding)

Actual behavior

$ retroarch --verbose [INFO] RetroArch 1.6.7 (Git 61810cfd8) [INFO] === Build ======================================= Capabilities: MMX MMXEXT SSE1 SSE2 Built: Sep 28 2017 [INFO] Version: 1.6.7 [INFO] Git: 61810cfd8 [INFO] ================================================= [INFO] [Config]: Loading default config. [INFO] [Config]: loading config from: (null). [INFO] Looking for config in: "/root/.config/retroarch/retroarch.cfg". [WARN] screenshot_directory is not an existing directory, ignoring ... [WARN] savefile_directory is not a directory, ignoring ... [WARN] savestate_directory is not a directory, ignoring ... [INFO] Environ SET_PIXEL_FORMAT: RGB565. [INFO] Version of libretro API: 1 [INFO] Compiled against API: 1 [INFO] [Audio]: Set audio input rate to: 29970.03 Hz. [INFO] Found shader "/usr/share/libretro/shaders/slang-conversion-template.glsl" [INFO] Found shader "/usr/share/libretro/shaders/stock.glsl" [INFO] [Video]: Video @ 960x720 [ERROR] [KMS]: Couldn't find a suitable DRM device. [WARN] [SDL_GL]: Failed to initialize SDL gfx context driver: No available video device [INFO] [GL]: Found GL context: null [INFO] [GL]: Detecting screen resolution 320x240. [INFO] [GL]: Vendor: (null), Renderer: (null). [INFO] [GL]: Version: (null). Segmentation fault

No DRM device is found. Mesa is compiled on the system with these USE flags:

>  - - bindist              : Disable patent-encumbered ARB_texture_float,
>                             EXT_texture_shared_exponent, and EXT_packed_float
>                             extensions.
>  + + classic              : Build drivers based on the classic architecture.
>  - - d3d9                 : Enable Direct 3D9 API through Nine state tracker. Can be
>                             used together with patched wine.
>  - - debug                : Enable extra debug codepaths, like asserts and extra
>                             output. If you want to get meaningful backtraces see https
>                             ://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtrac
>                             es
>  + + dri3                 : Enable DRI3 support.
>  + + egl                  : Enable EGL support.
>  + + gallium              : Build drivers based on Gallium3D, the new architecture for
>                             3D graphics drivers.
>  + + gbm                  : Enable the Graphics Buffer Manager for EGL on KMS.
>  - - gles1                : Enable GLESv1 support.
>  + + gles2                : Enable GLESv2 support.
>  + + llvm                 : Enable LLVM backend for Gallium3D.
>  + + nptl                 : Enable support for Native POSIX Threads Library, the new
>                             threading module (requires linux-2.6 or better usually)
>  - - opencl               : Enable the Clover Gallium OpenCL state tracker.
>  - - openmax              : Enable OpenMAX video decode/encode acceleration for
>                             Gallium3D.
>  - - osmesa               : Build the Mesa library for off-screen rendering.
>  - - pax_kernel           : Enable if the user plans to run the package under a pax
>                             enabled hardened kernel
>  - - pic                  : disable optimized assembly code that is not PIC friendly
>  - - vaapi                : Enable Video Acceleration API for hardware decoding
>  - - valgrind             : Compile in valgrind memory hints
>  + + vdpau                : Enable the VDPAU acceleration interface for the Gallium3D
>                             Video Layer.
>  - - video_cards_i915     : VIDEO_CARDS setting to build driver for Intel i915 video
>                             cards
>  - - video_cards_i965     : VIDEO_CARDS setting to build driver for Intel i965 video
>                             cards
>  - - video_cards_imx      : VIDEO_CARDS setting to build driver for Freescale i.MX
>                             video cards
>  - - video_cards_intel    : VIDEO_CARDS setting to build driver for Intel video cards
>  - - video_cards_nouveau  : VIDEO_CARDS setting to build reverse-engineered driver for
>                             nvidia cards
>  - - video_cards_r100     : VIDEO_CARDS setting to build only r100 based chips code
>                             for radeon
>  - - video_cards_r200     : VIDEO_CARDS setting to build only r200 based chips code
>                             for radeon
>  + + video_cards_r300     : VIDEO_CARDS setting to build only r300, r400 and r500
>                             based chips code for radeon
>  - - video_cards_r600     : VIDEO_CARDS setting to build only r600, r700, Evergreen
>                             and Northern Islands based chips code for radeon
>  - - video_cards_radeon   : VIDEO_CARDS setting to build driver for ATI radeon video
>                             cards
>  - - video_cards_radeonsi : VIDEO_CARDS setting to build only Southern Islands based
>                             chips code for radeon
>  - - video_cards_vmware   : VIDEO_CARDS setting to build driver for vmware video cards
>  - - vulkan               : Enable Vulkan drivers
>  - - wayland              : Enable support for dev-libs/wayland
>  - - xa                   : Enable the XA (X Acceleration) API for Gallium3D.
>  - - xvmc                 : Enable the XvMC acceleration interface for the Gallium3D
>                             Video Layer.

Would the X USE flag be mandatory then?

Version/Commit

Environment information

lucasmr commented 7 years ago

Nevermind. RADEON_FB was enabled on the kernel, which blocked DRM KMS from being available. Removing kernel framebuffer fixed.