libretro / RetroArch

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

Unable to run from Snap on Ubuntu Core #16730

Open kyvaith opened 2 months ago

kyvaith commented 2 months ago

Description

Trying to run from Snappy Ubuntu Core using sudo snap install retroarch

Expected behavior

RetroArch starts imidietly and works

Actual behavior

Don't start. Manually doing sudo retroarch gives: Cannot autolaunch D-Bus without X11 $Display

Version/Commit

Newest stable

Environment information

hizzlekizzle commented 2 months ago

RetroArch can run without an X-server via DRM/KMS, but I doubt the snap package has permissions to do such a thing. Would it be possible to download and run an AppImage on there instead?

kyvaith commented 2 months ago

After some research, I think, to achieve that RetroArch snap package need to be build as a Ubuntu Frame (IoT) client.... https://mir-server.io/docs/developer-guide

hizzlekizzle commented 2 months ago

It's weird. RetroArch definitely works in wayland, and according to that doc, any wayland-compatible program should run fine :/

EDITed with debug build of RetroArch:

Thread 1 "retroarch" received signal SIGSEGV, Segmentation fault.
wl_proxy_get_version (proxy=0x0) at ../src/wayland-client.c:2248
2248        return proxy->version;
(gdb) bt
#0  wl_proxy_get_version (proxy=0x0) at ../src/wayland-client.c:2248
#1  0x00005555559fc71d in zwp_relative_pointer_manager_v1_get_relative_pointer
    (zwp_relative_pointer_manager_v1=0x0, pointer=0x5555569a63d0)
    at input/common/../../gfx/common/wayland/relative-pointer-unstable-v1.h:176
#2  0x00005555559fd926 in wl_seat_handle_capabilities (data=0x5555569a4650, 
    seat=0x5555569a59a0, caps=7) at input/common/wayland_common.c:502
#3  0x00007ffff60f8b16 in ffi_call_unix64 () at ../src/x86/unix64.S:104
#4  0x00007ffff60f53ef in ffi_call_int (cif=cif@entry=0x7fffffffc5d0, 
    fn=<optimized out>, rvalue=<optimized out>, avalue=<optimized out>, 
    closure=closure@entry=0x0) at ../src/x86/ffi64.c:673
#5  0x00007ffff60f80be in ffi_call (cif=cif@entry=0x7fffffffc5d0, 
    fn=<optimized out>, rvalue=rvalue@entry=0x0, 
    avalue=avalue@entry=0x7fffffffc6a0) at ../src/x86/ffi64.c:710
#6  0x00007ffff7ce6bfe in wl_closure_invoke (
    closure=closure@entry=0x5555569a6010, target=<optimized out>, 
    target@entry=0x5555569a59a0, opcode=opcode@entry=0, data=<optimized out>, 
    flags=1) at ../src/connection.c:1025
#7  0x00007ffff7ce7473 in dispatch_event (
    display=display@entry=0x555556998320, queue=0x555556998410)
    at ../src/wayland-client.c:1631
#8  0x00007ffff7ce771c in dispatch_queue (queue=0x555556998410, 
    display=0x555556998320) at ../src/wayland-client.c:1777
#9  wl_display_dispatch_queue_pending (display=display@entry=0x555556998320, 
--Type <RET> for more, q to quit, c to continue without paging--
    queue=queue@entry=0x555556998410) at ../src/wayland-client.c:2019
#10 0x00007ffff7ce9324 in wl_display_dispatch_queue (queue=<optimized out>, 
    display=<optimized out>) at ../src/wayland-client.c:1995
#11 0x00007ffff7cea50f in wl_display_roundtrip_queue (display=0x555556998320, 
    queue=0x555556998410) at ../src/wayland-client.c:1403
#12 0x00005555559fe119 in wl_registry_handle_global (data=0x5555569a4650, 
    reg=0x555556999be0, id=21, interface=0x5555569a5650 "wl_output", version=4)
    at input/common/wayland_common.c:731
#13 0x00007ffff60f8b16 in ffi_call_unix64 () at ../src/x86/unix64.S:104
#14 0x00007ffff60f53ef in ffi_call_int (cif=cif@entry=0x7fffffffcaa0, 
    fn=<optimized out>, rvalue=<optimized out>, avalue=<optimized out>, 
    closure=closure@entry=0x0) at ../src/x86/ffi64.c:673
#15 0x00007ffff60f80be in ffi_call (cif=cif@entry=0x7fffffffcaa0, 
    fn=<optimized out>, rvalue=rvalue@entry=0x0, 
    avalue=avalue@entry=0x7fffffffcb70) at ../src/x86/ffi64.c:710
#16 0x00007ffff7ce6bfe in wl_closure_invoke (
    closure=closure@entry=0x5555569a5570, target=<optimized out>, 
    target@entry=0x555556999be0, opcode=opcode@entry=0, data=<optimized out>, 
    flags=1) at ../src/connection.c:1025
#17 0x00007ffff7ce7473 in dispatch_event (
    display=display@entry=0x555556998320, queue=0x555556998410)
    at ../src/wayland-client.c:1631
#18 0x00007ffff7ce771c in dispatch_queue (queue=0x555556998410, 
--Type <RET> for more, q to quit, c to continue without paging--
    display=0x555556998320) at ../src/wayland-client.c:1777
#19 wl_display_dispatch_queue_pending (display=display@entry=0x555556998320, 
    queue=queue@entry=0x555556998410) at ../src/wayland-client.c:2019
#20 0x00007ffff7ce9324 in wl_display_dispatch_queue (queue=<optimized out>, 
    display=<optimized out>) at ../src/wayland-client.c:1995
#21 0x00007ffff7cea50f in wl_display_roundtrip_queue (display=0x555556998320, 
    queue=0x555556998410) at ../src/wayland-client.c:1403
#22 0x0000555555a02798 in gfx_ctx_wl_init_common (
    toplevel_listener=0x555556753780 <toplevel_listener>, wwl=0x7fffffffcdb0)
    at gfx/common/wayland_common.c:672
#23 0x00005555559fb7b0 in gfx_ctx_wl_init (data=0x555556995fa0)
    at gfx/drivers_context/wayland_ctx.c:275
#24 0x0000555555762d9c in video_context_driver_init (
    core_set_shared_context=false, settings=0x7ffff50d0010, 
    data=0x555556995fa0, ctx=0x555556753820 <gfx_ctx_wayland>, 
    ident=0x7ffff50d1ef9 "", api=GFX_CTX_OPENGL_API, major=3, minor=2, 
    hw_render_ctx=false, ctx_data=0x7fffffffced8) at gfx/video_driver.c:892
#25 0x0000555555767420 in video_context_driver_init_first (
    data=0x555556995fa0, ident=0x7ffff50d1ef9 "", api=GFX_CTX_OPENGL_API, 
    major=3, minor=2, hw_render_ctx=false, ctx_data=0x7fffffffced8)
    at gfx/video_driver.c:2738
#26 0x0000555555a37764 in gl3_get_context (gl=0x555556995fa0)
    at gfx/drivers/gl3.c:1319
--Type <RET> for more, q to quit, c to continue without paging--
#27 0x0000555555a38e24 in gl3_init (video=0x7fffffffd070, 
    input=0x5555567e3c40 <input_driver_st+672>, 
    input_data=0x5555567e3c48 <input_driver_st+680>) at gfx/drivers/gl3.c:1785
#28 0x000055555576887d in video_driver_init_internal (
    video_is_threaded=0x7fffffffd103, verbosity_enabled=true)
    at gfx/video_driver.c:3263
#29 0x000055555560bbf4 in drivers_init (settings=0x7ffff50d0010, flags=4095, 
    lifetime_flags=0, verbosity_enabled=true) at retroarch.c:1652
#30 0x0000555555617a78 in retroarch_main_init (argc=3, argv=0x7fffffffda48)
    at retroarch.c:7733
#31 0x0000555555721cec in content_load (info=0x7fffffffd8d0, 
    p_content=0x55555678a198 <runloop_state+1912>) at tasks/task_content.c:1459
#32 0x0000555555723dc9 in task_load_content_internal (
    content_info=0x7fffffffd8d0, loading_from_menu=true, 
    loading_from_cli=true, loading_from_companion_ui=false)
    at tasks/task_content.c:2629
#33 0x000055555572408c in task_push_load_content_from_cli (core_path=0x0, 
    fullpath=0x0, content_info=0x7fffffffd8d0, type=CORE_TYPE_PLAIN, cb=0x0, 
    user_data=0x0) at tasks/task_content.c:2725
#34 0x0000555555613e65 in rarch_main (argc=3, argv=0x7fffffffda48, data=0x0)
    at retroarch.c:5915
#35 0x0000555555613eec in main (argc=3, argv=0x7fffffffda48)
    at retroarch.c:6027
gouchi commented 2 months ago

@kyvaith Is this issue fixed since this PR has been merged ?

Thank you.

viachaslavic commented 3 weeks ago

Fix #57 solves the issue described by @kyvaith and now runs successfully in DRM/KMS mode on Ubuntu Core (but I could not pick up a working input driver on my VM)

But RetroArch cannot run on Ubuntu Frame even with the standard build https://github.com/libretro/RetroArch/issues/16730#issuecomment-2187578032. On Ubuntu Desktop 20.04 i can run RetroArch version 1.7.3 on Ubuntu Frame. But last commits worked on Weston, Sway but not Ubuntu Frame. @hizzlekizzle maybe it makes sense to create a separate issue for running on Ubuntu Frame?

hizzlekizzle commented 3 weeks ago

maybe it makes sense to create a separate issue for running on Ubuntu Frame?

Sure, go for it :)