GBM Video Driver - Retro Gaming - Tinkering Image Howto

User avatar
memeka
Posts: 4420
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Has thanked: 2 times
Been thanked: 60 times
Contact:

Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

Post by memeka »

crashoverride wrote:
Wed Oct 16, 2019 7:16 pm
It seems that EGL_EXT_image_dma_buf_import is not supported in this Mali driver. The following are the extension strings when using GBM platform:

Code: Select all

EGL: Extensions=EGL_KHR_partial_update EGL_KHR_config_attribs EGL_KHR_image EGL_KHR_image_base EGL_KHR_fence_sync EGL_KHR_wait_sync EGL_KHR_gl_colorspace EGL_KHR_get_all_proc_addresses EGL_IMG_context_priority EGL_ARM_pixmap_multisample_discard EGL_ARM_implicit_external_sync EGL_KHR_gl_texture_2D_image EGL_KHR_gl_renderbuffer_image EGL_KHR_create_context EGL_KHR_surfaceless_context EGL_KHR_gl_texture_cubemap_image EGL_EXT_create_context_robustness
EGL: ClientExtensions=EGL_EXT_client_extensions EGL_EXT_platform_base EGL_KHR_client_get_all_proc_addresses EGL_KHR_platform_x11 EGL_EXT_platform_x11 EGL_KHR_platform_gbm
Any call to eglCreateImageKHR with EGL_LINUX_DMA_BUF_EXT return an error: EGL_BAD_PARAMETER. This behavior also occurs in ARM's GBM/Wayland driver posted on their website. Can this be corrected and EGL_EXT_image_dma_buf_import enabled?
you are correct, EGL_EXT_image_dma_buf_import is not supported.
i tested an internal build with it enabled, but I am not sure if HK can distribute the build. it was a GBM only driver, no wayland...

EDIT: in theory it should work to have 2 separate libmali drivers, one for GBM and one for wayland (actually this is how it was initially released in r10p0), but it's a bit of a hassle...

crashoverride
Posts: 5125
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 374 times
Contact:

Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

Post by crashoverride »

memeka wrote:
Wed Oct 16, 2019 7:35 pm
it was a GBM only driver, no wayland...
I only require GBM. I have no current or future plans for wayland.

AreaScout
Posts: 1455
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: german, english
ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
N1, Go, VU5A, Show2, CloudShell2,
H2, N2, VU7A, VuShell, Go2, C4
Has thanked: 71 times
Been thanked: 226 times
Contact:

Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

Post by AreaScout »

    I also would love to have that extension added to the GBM driver, mdrjr was providing that driver, if he is still in business, he would the right man to ask I think

    RG

    User avatar
    odroid
    Site Admin
    Posts: 35506
    Joined: Fri Feb 22, 2013 11:14 pm
    languages_spoken: English, Korean
    ODROIDs: ODROID
    Has thanked: 1171 times
    Been thanked: 867 times
    Contact:

    Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

    Post by odroid »

    Yes! contact him via PM.
    He will post the driver package publicly in the forum probably. ;)
    These users thanked the author odroid for the post:
    rooted (Sat Oct 19, 2019 10:53 am)

    AreaScout
    Posts: 1455
    Joined: Sun Jul 07, 2013 3:05 am
    languages_spoken: german, english
    ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
    N1, Go, VU5A, Show2, CloudShell2,
    H2, N2, VU7A, VuShell, Go2, C4
    Has thanked: 71 times
    Been thanked: 226 times
    Contact:

    Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

    Post by AreaScout »

      Thank you odroid, I did that, PM is out :)

      RG
      These users thanked the author AreaScout for the post:
      rooted (Sat Oct 19, 2019 10:53 am)

      ring-0
      Posts: 28
      Joined: Fri Jan 03, 2020 4:59 am
      languages_spoken: english
      ODROIDs: XU4 and N2
      Has thanked: 1 time
      Been thanked: 0
      Contact:

      Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

      Post by ring-0 »

      Hey! Thanks for redirecting me here. I'm interested in making this work with the RetroPie setup script, since it would automate a ton of stuff for us. Anyone done this too? Also, can I have kodi built to use GBM without impacting anything else?

      ring-0
      Posts: 28
      Joined: Fri Jan 03, 2020 4:59 am
      languages_spoken: english
      ODROIDs: XU4 and N2
      Has thanked: 1 time
      Been thanked: 0
      Contact:

      Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

      Post by ring-0 »

      Building lr-ppsspp from RetroPie with a patched (also unpatched) header file yields this for me:

      Code: Select all

      /home/user/RetroPie-Setup/tmp/build/lr-ppsspp/lr-ppsspp/ext/native/gfx/../gfx_es2/gl3stub.h:506:147: error: ‘GLint (* glGetProgramResourceLocationIndexEXT)(GLuint, GL
      enum, const GLchar*)’ redeclared as different kind of symbol
       extern GL_APICALL GLint          (* GL_APIENTRY glGetProgramResourceLocationIndexEXT) (GLuint program, GLenum programInterface, const GLchar *name);
                                                                                                                                                         ^
      In file included from /home/user/RetroPie-Setup/tmp/build/lr-ppsspp/lr-ppsspp/ext/native/gfx/gl_common.h:8:0,
                       from /home/user/RetroPie-Setup/tmp/build/lr-ppsspp/lr-ppsspp/ext/native/gfx/gl_debug_log.cpp:4:
      /usr/include/GLES2/gl2ext.h:1127:30: note: previous declaration ‘GLint glGetProgramResourceLocationIndexEXT(GLuint, GLenum, const GLchar*)’
       GL_APICALL GLint GL_APIENTRY glGetProgramResourceLocationIndexEXT (GLuint program, GLenum programInterface, const GLchar *name);
                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      In file included from /home/user/RetroPie-Setup/tmp/build/lr-ppsspp/lr-ppsspp/ext/native/gfx/gl_common.h:25:0,
                       from /home/user/RetroPie-Setup/tmp/build/lr-ppsspp/lr-ppsspp/ext/native/gfx/gl_debug_log.cpp:4:
      /home/user/RetroPie-Setup/tmp/build/lr-ppsspp/lr-ppsspp/ext/native/gfx/../gfx_es2/gl3stub.h:507:107: error: ‘GLint (* glGetFragDataIndexEXT)(GLuint, const GLchar*)’ r
      edeclared as different kind of symbol
       extern GL_APICALL GLint          (* GL_APIENTRY glGetFragDataIndexEXT) (GLuint program, const GLchar *name);
                                                                                                                 ^
      In file included from /home/user/RetroPie-Setup/tmp/build/lr-ppsspp/lr-ppsspp/ext/native/gfx/gl_common.h:8:0,
                       from /home/user/RetroPie-Setup/tmp/build/lr-ppsspp/lr-ppsspp/ext/native/gfx/gl_debug_log.cpp:4:
      /usr/include/GLES2/gl2ext.h:1128:30: note: previous declaration ‘GLint glGetFragDataIndexEXT(GLuint, const GLchar*)’
       GL_APICALL GLint GL_APIENTRY glGetFragDataIndexEXT (GLuint program, const GLchar *name);
                                    ^~~~~~~~~~~~~~~~~~~~~
      In file included from /home/user/RetroPie-Setup/tmp/build/lr-ppsspp/lr-ppsspp/ext/native/gfx/gl_common.h:25:0,
                       from /home/user/RetroPie-Setup/tmp/build/lr-ppsspp/lr-ppsspp/ext/native/gfx/gl_debug_log.cpp:4:
      /home/user/RetroPie-Setup/tmp/build/lr-ppsspp/lr-ppsspp/ext/native/gfx/../gfx_es2/gl3stub.h:515:289: error: ‘void (* glCopyImageSubDataOES)(GLuint, GLenum, GLint, GLi
      nt, GLint, GLint, GLuint, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei)’ redeclared as different kind of symbol
       extern GL_APICALL void           (* GL_APIENTRY glCopyImageSubDataOES) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint 
      dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
                                                                                                                                                                            
                                                                                                                                 ^
      In file included from /home/user/RetroPie-Setup/tmp/build/lr-ppsspp/lr-ppsspp/ext/native/gfx/gl_common.h:8:0,
                       from /home/user/RetroPie-Setup/tmp/build/lr-ppsspp/lr-ppsspp/ext/native/gfx/gl_debug_log.cpp:4:
      /usr/include/GLES2/gl2ext.h:290:29: note: previous declaration ‘void glCopyImageSubDataOES(GLuint, GLenum, GLint, GLint, GLint, GLint, GLuint, GLenum, GLint, GLint, G
      Lint, GLint, GLsizei, GLsizei, GLsizei)’
       GL_APICALL void GL_APIENTRY glCopyImageSubDataOES (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTa
      rget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
      Not too sure what is the best way to proceed, but it seems an internal copy of a header file is being used with mismatching symbol definitions/prototypes. Is there a CFLAG I can add? So far I've been able to take advantage of the GBM driver and got Emulation Station and Kodi 18.5 working just fine together.

      AreaScout
      Posts: 1455
      Joined: Sun Jul 07, 2013 3:05 am
      languages_spoken: german, english
      ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
      N1, Go, VU5A, Show2, CloudShell2,
      H2, N2, VU7A, VuShell, Go2, C4
      Has thanked: 71 times
      Been thanked: 226 times
      Contact:

      Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

      Post by AreaScout »

        @ring-0

        I can't help you on that by just looking on it, I would have to reproduce with the same error and then find a solution for it, but basically it's a redeclared error, so the function is declared twice and with different kind of symbol so the function differs

        RG

        ring-0
        Posts: 28
        Joined: Fri Jan 03, 2020 4:59 am
        languages_spoken: english
        ODROIDs: XU4 and N2
        Has thanked: 1 time
        Been thanked: 0
        Contact:

        Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

        Post by ring-0 »

        Encountered some interesting hiccups:

        Code: Select all

        (gdb) run -L /opt/retropie/libretrocores/lr-mupen64plus/mupen64plus_libretro.so --config /opt/retropie/configs/n64/retroarch.cfg "/home/user/RetroPie/roms/n64/007 - GoldenEye (USA).z64" --appendconfig /dev/shm/retroarch.cfg
        Starting program: /opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-mupen64plus/mupen64plus_libretro.so --config /opt/retropie/configs/n64/retroarch.cfg "/home/user/RetroPie/roms/n64/007 - GoldenEye (USA).z64" --appendconfig /dev/shm/retroarch.cfg
        Cannot parse expression `.L1207 4@r4'.
        warning: Probes-based dynamic linker interface failed.
        Reverting to original interface.
        
        [Thread debugging using libthread_db enabled]
        Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
        [New Thread 0xb074c1f0 (LWP 3073)]
        Failed to open /home/user/RetroPie/roms/n64/007 - GoldenEye (USA).srm: No such file or directory
        [New Thread 0xa63ff1f0 (LWP 3075)]
        [New Thread 0xa4dae1f0 (LWP 3076)]
        [New Thread 0xa35ac1f0 (LWP 3077)]
        [New Thread 0xa2dab1f0 (LWP 3078)]
        [New Thread 0xa25aa1f0 (LWP 3079)]
        [New Thread 0xa1da91f0 (LWP 3080)]
        [New Thread 0xa15a81f0 (LWP 3081)]
        [New Thread 0xa0da71f0 (LWP 3082)]
        [New Thread 0xa05a61f0 (LWP 3083)]
        [New Thread 0x9fda51f0 (LWP 3084)]
        [New Thread 0x9f5a41f0 (LWP 3085)]
        
        Thread 1 "retroarch" received signal SIGSEGV, Segmentation fault.
        0xb4103fd4 in _XSend () from /usr/lib/arm-linux-gnueabihf/libX11.so.6
        (gdb) back
        #0  0xb4103fd4 in _XSend () at /usr/lib/arm-linux-gnueabihf/libX11.so.6
        #1  0xb41042da in _XFlush () at /usr/lib/arm-linux-gnueabihf/libX11.so.6
        #2  0xb4105ece in _XGetRequest () at /usr/lib/arm-linux-gnueabihf/libX11.so.6
        #3  0xb40f9480 in XNoOp () at /usr/lib/arm-linux-gnueabihf/libX11.so.6
        #4  0xb5ec8f20 in validate_display () at /usr/lib/arm-linux-gnueabihf/libgbm.so
        I will recompile retroarch and test again.
        HDMI CEC is not working, TV is a 2019 model from Samsung, no issues with the same cable and two RPi devices.

        AreaScout
        Posts: 1455
        Joined: Sun Jul 07, 2013 3:05 am
        languages_spoken: german, english
        ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
        N1, Go, VU5A, Show2, CloudShell2,
        H2, N2, VU7A, VuShell, Go2, C4
        Has thanked: 71 times
        Been thanked: 226 times
        Contact:

        Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

        Post by AreaScout »

          @ring-0

          You need a special libcec, follow this guide https://wiki.odroid.com/odroid-xu4/soft ... ce?s[]=cec

          Strange that X11 library is involved, it shouldn't ! Is that Emulationstation running from fbdev and retroarch from gbm ?

          RG

          ring-0
          Posts: 28
          Joined: Fri Jan 03, 2020 4:59 am
          languages_spoken: english
          ODROIDs: XU4 and N2
          Has thanked: 1 time
          Been thanked: 0
          Contact:

          Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

          Post by ring-0 »

          @AreaScout

          Regarding the symbol redefinition: I can guide you through the steps of building a base image with RetroPie from -minimal. That would be the best course of action to reproduce it consistently.

          Re: libcec: just did it, but unfortunately removing libcec4 will also remove kodi and kodi-bin due to deps. Maybe we can just manually relocate the DSO from the package elsewhere? And symlink to the new one in /usr/local. If they are symbol compatible it should not break anything.
          "Strange that X11 library is involved, it shouldn't ! Is that Emulationstation running from fbdev and retroarch from gbm ?"
          I rebuilt both a few times with the SDL2 library installed to /usr/local with the flags as you documented. ES is definitely using fbdev AFAIK. How can I verify this?

          ring-0
          Posts: 28
          Joined: Fri Jan 03, 2020 4:59 am
          languages_spoken: english
          ODROIDs: XU4 and N2
          Has thanked: 1 time
          Been thanked: 0
          Contact:

          Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

          Post by ring-0 »

          A little digging, the retroarch patch should not be needed anymore if building from the RetroPie setup script off Github, check this out:

          Code: Select all

          function platform_odroid-xu() {
              __default_cflags="-O2 -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -ftree-vectorize -funsafe-math-optimizations"
              # required for mali-fbdev headers to define GL functions
              __default_cflags+=" -DGL_GLEXT_PROTOTYPES"
              __default_asflags=""
              __default_makeflags="-j2"
              __platform_flags="arm armv7 neon mali gles"
          }
          They are properly defining the GL_GLEXT_PROTOTYPES. I'm now on to verifying the flags passed to retroarch... maybe we could test for the presence of your package? And apply whatever flags are needed accordingly.

          The output when running the build (added opengles3 to the ./configure in the .sh lib for retroarch inside the RetroPie setup directory).

          Code: Select all

          = = = = = = = = = = = = = = = = = = = = =
          Building 'retroarch' : RetroArch - frontend to the libretro emulator cores - required by all lr-* emulators
          = = = = = = = = = = = = = = = = = = = = =
          
          Checking operating system ... Linux (Ubuntu 18.04.3 LTS 18.04)
          Checking for suitable working C compiler ... /usr/bin/gcc works
          Checking for suitable working C++ compiler ... /usr/bin/g++ works
          Checking for pkg-config ... /usr/bin/pkg-config
          Checking for availability of switch -std=gnu99 in /usr/bin/gcc ... yes
          Checking for availability of switch -Wno-unused-result in /usr/bin/gcc ... yes
          Checking for availability of switch -Wno-unused-variable in /usr/bin/gcc ... yes
          Checking function sd_get_machine_names in -lsystemd ... no
          Checking presence of package bcm_host ... no
          Checking function bcm_host_init in -lbcm_host ... no
          Checking presence of header file EGL/eglext.h ... yes
          Checking presence of package egl ... 13.0.6
          Checking function ass_library_init in -lass ... no
          Checking function pthread_create in -lpthread ... yes
          Checking function pthread_key_create in -lpthread ... yes
          Checking presence of header file scsi/sg.h ... yes
          Checking function dlopen in -ldl ... yes
          Checking function socket in -lc ... yes
          Checking function getaddrinfo in -lc ... yes
          Checking existence of -lminiupnpc ... no
          Checking function fcntl in -lc ... yes
          Checking function getopt_long in -lc ... yes
          Checking presence of package alsa ... 1.1.3
          Checking presence of package caca ... 0.99.beta19
          Checking presence of package libsixel >= 1.6.0 ... no
          Checking presence of predefined macro AUDIO_SETINFO in sys/audioio.h ... no
          Checking presence of package rsound >= 1.1 ... no
          Checking presence of package libroar >= 1.0.12 ... no
          Checking presence of package sdl2 >= 2.0.0 ... 2.0.11
          Checking presence of package flac ... 1.3.2
          Checking presence of header file mbedtls/entropy.h ... no
          Checking existence of -lmbedx509 ... no
          Checking existence of -lmbedcrypto ... no
          Checking presence of package libusb-1.0 >= 1.0.13 ... 1.0.21
          Checking existence of -ldinput8 ... no
          Checking existence of -ld3d9 ... no
          Checking existence of -ldsound ... no
          Checking existence of -ld3dx8 ... no
          Checking existence of -ld3dx9 ... no
          Notice: OpenGL is disabled, Cg support will also be disabled.
          Notice: OpenGL is disabled, OpenGL1 support will also be disabled.
          Checking presence of package zlib ... 1.2.11
          Checking presence of package libavcodec >= 54 ... 57.107.100
          Checking presence of package libavformat >= 54 ... 57.83.100
          Checking presence of package libavdevice ... 57.10.100
          Checking presence of package libswresample ... 2.9.100
          Checking presence of package libavresample ... 3.7.0
          Checking presence of package libavutil >= 51 ... 55.78.100
          Checking presence of package libswscale >= 2.1 ... 4.8.100
          Checking presence of header file libavutil/channel_layout.h ... yes
          Checking function dlopen in -ldl ... yes
          Checking presence of package gbm >= 9.0 ... 19.0.0
          Checking presence of package libdrm ... 2.4.97
          Checking presence of package glesv2 ... 13.0.6
          Checking presence of package vg ... no
          Checking presence of package libudev ... 237
          Checking presence of package libv4l2 ... no
          Checking presence of package freetype2 ... 21.0.15
          Notice: X11 not present. Skipping X11 code paths.
          Notice: X11 is disabled, Xinerama support will also be disabled.
          Notice: X11 is disabled, Xrandr support will also be disabled.
          Notice: X11 is disabled, XVideo support will also be disabled.
          Checking presence of package xkbcommon >= 0.3.2 ... 0.8.2
          Checking presence of package wayland-cursor >= 1.12 ... 1.16.0
          Checking presence of package wayland-protocols >= 1.15 ... no
          Checking presence of package wayland-scanner >= 1.12 ... 1.16.0
          Notice: wayland libraries not found, disabling wayland support.
          Checking presence of header file linux/parport.h ... yes
          Checking presence of header file linux/ppdev.h ... yes
          Checking function strcasestr in -lc ... yes
          Checking function mmap in -lc ... yes
          Checking presence of predefined macro __ARM_NEON__ ... yes
          Creating make config: config.mk
          Creating config header: config.h
          Last edited by ring-0 on Tue Jan 07, 2020 5:14 am, edited 1 time in total.

          AreaScout
          Posts: 1455
          Joined: Sun Jul 07, 2013 3:05 am
          languages_spoken: german, english
          ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
          N1, Go, VU5A, Show2, CloudShell2,
          H2, N2, VU7A, VuShell, Go2, C4
          Has thanked: 71 times
          Been thanked: 226 times
          Contact:

          Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

          Post by AreaScout »

            Did you try to configure retroarch with --disable-x11 ? dunno if that will run through

            Just copy the new library over to the old one i.e.

            sudo cp src/libcec/libcec.so /usr/lib/arm-linux-gnueabihf/libcec.so.4.0.4


            RG

            AreaScout
            Posts: 1455
            Joined: Sun Jul 07, 2013 3:05 am
            languages_spoken: german, english
            ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
            N1, Go, VU5A, Show2, CloudShell2,
            H2, N2, VU7A, VuShell, Go2, C4
            Has thanked: 71 times
            Been thanked: 226 times
            Contact:

            Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

            Post by AreaScout »

              What stops you from building PPSSPP for GBM only ?

              Code: Select all

              cd ppsspp/ffmpeg
              ./linux_armhf.sh
              cd ..
              cmake -DUSING_EGL=OFF -DUSING_GLES2=ON -DUSE_FFMPEG=YES -DUSE_SYSTEM_FFMPEG=NO .
              
              P.S.: The newest PPSSPP needs to reverts to run as fast like in the past

              RG

              ring-0
              Posts: 28
              Joined: Fri Jan 03, 2020 4:59 am
              languages_spoken: english
              ODROIDs: XU4 and N2
              Has thanked: 1 time
              Been thanked: 0
              Contact:

              Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

              Post by ring-0 »

              AreaScout wrote:
              Tue Jan 07, 2020 5:10 am
                Did you try to configure retroarch with --disable-x11 ? dunno if that will run through

                Just copy the new library over to the old one i.e.

                sudo cp src/libcec/libcec.so /usr/lib/arm-linux-gnueabihf/libcec.so.4.0.4


                RG
                Done, the libcec workaround seems to work, unverified with Kodi but will give it a go. I will also check if ES responds to it.

                I edited my post to include the build output, X11 seems disabled actually.

                ring-0
                Posts: 28
                Joined: Fri Jan 03, 2020 4:59 am
                languages_spoken: english
                ODROIDs: XU4 and N2
                Has thanked: 1 time
                Been thanked: 0
                Contact:

                Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

                Post by ring-0 »

                OK, this is different now:

                Code: Select all

                Thread 1 "retroarch" received signal SIGSEGV, Segmentation fault.
                0xb5b7291a in cmemp_subhoard_alloc () from /usr/lib/arm-linux-gnueabihf/libgbm.so
                (gdb) back
                #0  0xb5b7291a in cmemp_subhoard_alloc () at /usr/lib/arm-linux-gnueabihf/libgbm.so
                #1  0xffd90000 in  ()
                After the rebuild.

                Code: Select all

                user@odroid:~/libcec/build$ ls -l /usr/lib/arm-linux-gnueabihf/libgbm.so
                lrwxrwxrwx 1 root root 10 Jan  6 20:13 /usr/lib/arm-linux-gnueabihf/libgbm.so -> libmali.so
                user@odroid:~/libcec/build$ ls -l /usr/lib/arm-linux-gnueabihf/lib^C
                user@odroid:~/libcec/build$ dpkg -S /usr/lib/arm-linux-gnueabihf/libgbm.so
                libgbm-dev:armhf: /usr/lib/arm-linux-gnueabihf/libgbm.so
                user@odroid:~/libcec/build$ dpkg -S /usr/lib/arm-linux-gnueabihf/libmali.so 
                mali-x11-gbm-fbdev: /usr/lib/arm-linux-gnueabihf/libmali.so
                More interesting:

                Code: Select all

                (gdb) r -vv --menu
                Starting program: /opt/retropie/emulators/retroarch/bin/retroarch -vv --menu
                Cannot parse expression `.L1207 4@r4'.
                warning: Probes-based dynamic linker interface failed.
                [Thread debugging using libthread_db enabled]
                Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
                [INFO] RetroArch 1.7.9 (Git 4dcd7a0)
                [INFO] Built: Jan  6 2020
                [INFO] Version: 1.7.9
                [New Thread 0xb074c1f0 (LWP 26549)]
                [INFO] [Environ]: SET_PIXEL_FORMAT: RGB565.
                [INFO] Version of libretro API: 1
                [INFO] Compiled against API: 1
                [INFO] [Audio]: Set audio input rate to: 30000.00 Hz.
                [INFO] [Video]: Video @ 960x720
                [New Thread 0xaf7241f0 (LWP 26552)]
                [New Thread 0xaef231f0 (LWP 26553)]
                [New Thread 0xae7221f0 (LWP 26554)]
                [New Thread 0xadf211f0 (LWP 26555)]
                [New Thread 0xad7201f0 (LWP 26556)]
                [New Thread 0xacf1f1f0 (LWP 26557)]
                [New Thread 0xab71c1f0 (LWP 26560)]
                [New Thread 0xaaf1b1f0 (LWP 26561)]
                [ERROR] [EGL]: #0x3001, Unknown
                [ERROR] [Mali fbdev]: EGL error: 12288.
                [INFO] [DRM]: Found 1 connectors.
                [INFO] [DRM]: Connector 0 connected: yes
                [INFO] [DRM]: Connector 0 has 21 modes.
                [INFO] [DRM]: Connector 0 assigned to monitor index: #1.
                [INFO] [DRM]: Mode 0: (1920x1080) 1920 x 1080, 60 Hz
                [INFO] [DRM]: Mode 1: (1920x1080i) 1920 x 1080, 60 Hz
                [INFO] [DRM]: Mode 2: (1920x1080) 1920 x 1080, 50 Hz
                [INFO] [DRM]: Mode 3: (1920x1080i) 1920 x 1080, 50 Hz
                [INFO] [DRM]: Mode 4: (1920x1080) 1920 x 1080, 30 Hz
                [INFO] [DRM]: Mode 5: (1920x1080) 1920 x 1080, 25 Hz
                [INFO] [DRM]: Mode 6: (1920x1080) 1920 x 1080, 24 Hz
                [INFO] [DRM]: Mode 7: (1680x1050) 1680 x 1050, 60 Hz
                [INFO] [DRM]: Mode 8: (1600x900) 1600 x 900, 60 Hz
                [INFO] [DRM]: Mode 9: (1280x1024) 1280 x 1024, 60 Hz
                [INFO] [DRM]: Mode 10: (1440x900) 1440 x 900, 60 Hz
                [INFO] [DRM]: Mode 11: (1280x800) 1280 x 800, 60 Hz
                [INFO] [DRM]: Mode 12: (1152x864) 1152 x 864, 75 Hz
                [INFO] [DRM]: Mode 13: (1280x720) 1280 x 720, 60 Hz
                [INFO] [DRM]: Mode 14: (1280x720) 1280 x 720, 50 Hz
                [INFO] [DRM]: Mode 15: (1024x768) 1024 x 768, 60 Hz
                [INFO] [DRM]: Mode 16: (800x600) 800 x 600, 60 Hz
                [INFO] [DRM]: Mode 17: (720x576) 720 x 576, 50 Hz
                [INFO] [DRM]: Mode 18: (720x480) 720 x 480, 60 Hz
                [INFO] [DRM]: Mode 19: (720x480) 720 x 480, 60 Hz
                [INFO] [DRM]: Mode 20: (640x480) 640 x 480, 60 Hz
                [INFO] [GL]: Found GL context: kms
                [INFO] [GL]: Detecting screen resolution 1920x1080.
                [INFO] [EGL] Found EGL_EXT_platform_base, trying eglGetPlatformDisplayEXT
                
                [New Thread 0xaa3ff1f0 (LWP 26565)]
                [New Thread 0xa9bfe1f0 (LWP 26566)]
                [New Thread 0xa93fd1f0 (LWP 26567)]
                [New Thread 0xa8bfc1f0 (LWP 26568)]
                [New Thread 0xa83fb1f0 (LWP 26569)]
                [New Thread 0xa7bfa1f0 (LWP 26570)]
                [New Thread 0xa73f91f0 (LWP 26571)]
                [New Thread 0xa6bf81f0 (LWP 26572)]
                [New Thread 0xa63f71f0 (LWP 26573)]
                [New Thread 0xa5bf61f0 (LWP 26574)]
                [INFO] [EGL]: EGL version: 1.4
                [INFO] [EGL]: Current context: 0xfa8af0.
                [INFO] [KMS]: New FB: 1920x1080 (stride: 7680).
                [INFO] [GL]: Vendor: ARM, Renderer: Mali-T628.
                [INFO] [GL]: Version: OpenGL ES 3.1 v1.r17p0-01rel0.d17cf84c10daf186c21e3efcfae21a65.
                [INFO] [GL]: Using resolution 1920x1080
                [INFO] [GL]: Default shader backend found: glsl.
                [INFO] [Shader driver]: Using GLSL shader backend.
                [WARN] [GL]: Stock GLSL shaders will be used.
                [INFO] [GLSL]: Found GLSL vertex shader.
                [INFO] [GLSL]: Found GLSL fragment shader.
                [INFO] [GLSL]: Linking GLSL program.
                [INFO] [GLSL]: Found GLSL vertex shader.
                [INFO] [GLSL]: Found GLSL fragment shader.
                [INFO] [GLSL]: Linking GLSL program.
                [INFO] [GLSL]: Found GLSL vertex shader.
                [INFO] [GLSL]: Found GLSL fragment shader.
                [INFO] [GLSL]: Linking GLSL program.
                [INFO] Setting up menu pipeline shaders for XMB ... 
                [INFO] [GLSL]: Compiling ribbon shader..
                [INFO] [GLSL]: Found GLSL vertex shader.
                [INFO] [GLSL]: Found GLSL fragment shader.
                [INFO] [GLSL]: Linking GLSL program.
                [INFO] [GLSL]: Compiling simple ribbon shader..
                [INFO] [GLSL]: Found GLSL vertex shader.
                [INFO] [GLSL]: Found GLSL fragment shader.
                [INFO] [GLSL]: Linking GLSL program.
                [INFO] [GLSL]: Compiling snow shader..
                [INFO] [GLSL]: Found GLSL vertex shader.
                [INFO] [GLSL]: Found GLSL fragment shader.
                [INFO] [GLSL]: Linking GLSL program.
                [INFO] [GLSL]: Compiling modern snow shader..
                [INFO] [GLSL]: Found GLSL vertex shader.
                [INFO] [GLSL]: Found GLSL fragment shader.
                [INFO] [GLSL]: Linking GLSL program.
                [INFO] [GLSL]: Compiling bokeh shader..
                [INFO] [GLSL]: Found GLSL vertex shader.
                [INFO] [GLSL]: Found GLSL fragment shader.
                [INFO] [GLSL]: Linking GLSL program.
                [INFO] [GLSL]: Compiling snowflake shader..
                [INFO] [GLSL]: Found GLSL vertex shader.
                [INFO] [GLSL]: Found GLSL fragment shader.
                [INFO] [GLSL]: Linking GLSL program.
                [INFO] [GL]: Using 4 textures.
                [INFO] [GL]: Loaded 1 program(s).
                
                Thread 1 "retroarch" received signal SIGSEGV, Segmentation fault.
                0x0061bf36 in gl2_init_textures.isra ()
                Seems like something is off with the Mali driver.

                AreaScout
                Posts: 1455
                Joined: Sun Jul 07, 2013 3:05 am
                languages_spoken: german, english
                ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
                N1, Go, VU5A, Show2, CloudShell2,
                H2, N2, VU7A, VuShell, Go2, C4
                Has thanked: 71 times
                Been thanked: 226 times
                Contact:

                Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

                Post by AreaScout »

                  Do you have two libmali now on your system ? One with gbm and the other one with fbdev ?

                  What kernel version do you have ?

                  RG

                  ring-0
                  Posts: 28
                  Joined: Fri Jan 03, 2020 4:59 am
                  languages_spoken: english
                  ODROIDs: XU4 and N2
                  Has thanked: 1 time
                  Been thanked: 0
                  Contact:

                  Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

                  Post by ring-0 »

                  AreaScout wrote:
                  Tue Jan 07, 2020 5:33 am
                    Do you have two libmali now on your system ? One with gbm and the other one with fbdev ?

                    What kernel version do you have ?

                    RG

                    Code: Select all

                    $ uname -a
                    Linux odroid 4.14.157-171 #1 SMP PREEMPT Wed Dec 4 08:21:54 -03 2019 armv7l armv7l armv7l GNU/Linux
                    How can I check the installed mali driver versions? I did not copy/install anything manually other than your package.

                    AreaScout
                    Posts: 1455
                    Joined: Sun Jul 07, 2013 3:05 am
                    languages_spoken: german, english
                    ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
                    N1, Go, VU5A, Show2, CloudShell2,
                    H2, N2, VU7A, VuShell, Go2, C4
                    Has thanked: 71 times
                    Been thanked: 226 times
                    Contact:

                    Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

                    Post by AreaScout »

                      can you run ldd retroarch and post the output here ?

                      ring-0
                      Posts: 28
                      Joined: Fri Jan 03, 2020 4:59 am
                      languages_spoken: english
                      ODROIDs: XU4 and N2
                      Has thanked: 1 time
                      Been thanked: 0
                      Contact:

                      Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

                      Post by ring-0 »

                      AreaScout wrote:
                      Tue Jan 07, 2020 5:42 am
                        can you run ldd retroarch and post the output here ?

                        Code: Select all

                        linux-vdso.so.1 (0xbedf6000)
                        	librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0xb644f000)
                        	libasound.so.2 => /usr/lib/arm-linux-gnueabihf/libasound.so.2 (0xb639e000)
                        	libfreetype.so.6 => /usr/lib/arm-linux-gnueabihf/libfreetype.so.6 (0xb6323000)
                        	libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0xb62fe000)
                        	libxkbcommon.so.0 => /usr/lib/arm-linux-gnueabihf/libxkbcommon.so.0 (0xb62bf000)
                        	libudev.so.1 => /lib/arm-linux-gnueabihf/libudev.so.1 (0xb629b000)
                        	libusb-1.0.so.0 => /lib/arm-linux-gnueabihf/libusb-1.0.so.0 (0xb627a000)
                        	libgbm.so => /usr/lib/arm-linux-gnueabihf/libgbm.so (0xb4ecb000)
                        	libdrm.so.2 => /usr/lib/arm-linux-gnueabihf/libdrm.so.2 (0xb4eb0000)
                        	libcaca.so.0 => /usr/lib/arm-linux-gnueabihf/libcaca.so.0 (0xb4de5000)
                        	libSDL2-2.0.so.0 => /usr/local/lib/libSDL2-2.0.so.0 (0xb4cf1000)
                        	libavcodec.so.57 => /usr/lib/arm-linux-gnueabihf/libavcodec.so.57 (0xb3c42000)
                        	libavformat.so.57 => /usr/lib/arm-linux-gnueabihf/libavformat.so.57 (0xb3a9b000)
                        	libavutil.so.55 => /usr/lib/arm-linux-gnueabihf/libavutil.so.55 (0xb3a19000)
                        	libswscale.so.4 => /usr/lib/arm-linux-gnueabihf/libswscale.so.4 (0xb39b8000)
                        	libswresample.so.2 => /usr/lib/arm-linux-gnueabihf/libswresample.so.2 (0xb3996000)
                        	libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0xb3983000)
                        	libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0xb3870000)
                        	libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0xb37ef000)
                        	libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0xb37c6000)
                        	libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb36ce000)
                        	/lib/ld-linux-armhf.so.3 (0xb6f8f000)
                        	libpng16.so.16 => /usr/lib/arm-linux-gnueabihf/libpng16.so.16 (0xb369e000)
                        	libz.so.1 => /lib/arm-linux-gnueabihf/libz.so.1 (0xb3674000)
                        	libX11.so.6 => /usr/lib/arm-linux-gnueabihf/libX11.so.6 (0xb3583000)
                        	libX11-xcb.so.1 => /usr/lib/arm-linux-gnueabihf/libX11-xcb.so.1 (0xb3571000)
                        	libxcb.so.1 => /usr/lib/arm-linux-gnueabihf/libxcb.so.1 (0xb3549000)
                        	libxcb-dri2.so.0 => /usr/lib/arm-linux-gnueabihf/libxcb-dri2.so.0 (0xb3535000)
                        	libslang.so.2 => /lib/arm-linux-gnueabihf/libslang.so.2 (0xb3382000)
                        	libncursesw.so.5 => /lib/arm-linux-gnueabihf/libncursesw.so.5 (0xb3355000)
                        	libtinfo.so.5 => /lib/arm-linux-gnueabihf/libtinfo.so.5 (0xb332a000)
                        	libwebp.so.6 => /usr/lib/arm-linux-gnueabihf/libwebp.so.6 (0xb32db000)
                        	libva.so.2 => /usr/lib/arm-linux-gnueabihf/libva.so.2 (0xb32b2000)
                        	libzvbi.so.0 => /usr/lib/arm-linux-gnueabihf/libzvbi.so.0 (0xb3245000)
                        	libxvidcore.so.4 => /usr/lib/arm-linux-gnueabihf/libxvidcore.so.4 (0xb3173000)
                        	libx265.so.146 => /usr/lib/arm-linux-gnueabihf/libx265.so.146 (0xb2f70000)
                        	libx264.so.152 => /usr/lib/arm-linux-gnueabihf/libx264.so.152 (0xb2e2f000)
                        	libwebpmux.so.3 => /usr/lib/arm-linux-gnueabihf/libwebpmux.so.3 (0xb2e19000)
                        	libwavpack.so.1 => /usr/lib/arm-linux-gnueabihf/libwavpack.so.1 (0xb2ded000)
                        	libvpx.so.5 => /usr/lib/arm-linux-gnueabihf/libvpx.so.5 (0xb2d26000)
                        	libvorbisenc.so.2 => /usr/lib/arm-linux-gnueabihf/libvorbisenc.so.2 (0xb2c94000)
                        	libvorbis.so.0 => /usr/lib/arm-linux-gnueabihf/libvorbis.so.0 (0xb2c63000)
                        	libtwolame.so.0 => /usr/lib/arm-linux-gnueabihf/libtwolame.so.0 (0xb2c36000)
                        	libtheoraenc.so.1 => /usr/lib/arm-linux-gnueabihf/libtheoraenc.so.1 (0xb2bfa000)
                        	libtheoradec.so.1 => /usr/lib/arm-linux-gnueabihf/libtheoradec.so.1 (0xb2bd8000)
                        	libspeex.so.1 => /usr/lib/arm-linux-gnueabihf/libspeex.so.1 (0xb2bb7000)
                        	libsnappy.so.1 => /usr/lib/arm-linux-gnueabihf/libsnappy.so.1 (0xb2ba1000)
                        	libshine.so.3 => /usr/lib/arm-linux-gnueabihf/libshine.so.3 (0xb2b87000)
                        	librsvg-2.so.2 => /usr/lib/arm-linux-gnueabihf/librsvg-2.so.2 (0xb2b53000)
                        	libgobject-2.0.so.0 => /usr/lib/arm-linux-gnueabihf/libgobject-2.0.so.0 (0xb2b0b000)
                        	libglib-2.0.so.0 => /usr/lib/arm-linux-gnueabihf/libglib-2.0.so.0 (0xb2a2e000)
                        	libcairo.so.2 => /usr/lib/arm-linux-gnueabihf/libcairo.so.2 (0xb2971000)
                        	libopus.so.0 => /usr/lib/arm-linux-gnueabihf/libopus.so.0 (0xb292d000)
                        	libopenjp2.so.7 => /usr/lib/arm-linux-gnueabihf/libopenjp2.so.7 (0xb28e3000)
                        	libmp3lame.so.0 => /usr/lib/arm-linux-gnueabihf/libmp3lame.so.0 (0xb2873000)
                        	libgsm.so.1 => /usr/lib/arm-linux-gnueabihf/libgsm.so.1 (0xb285b000)
                        	liblzma.so.5 => /lib/arm-linux-gnueabihf/liblzma.so.5 (0xb2831000)
                        	libssh-gcrypt.so.4 => /usr/lib/arm-linux-gnueabihf/libssh-gcrypt.so.4 (0xb27d0000)
                        	libopenmpt.so.0 => /usr/lib/arm-linux-gnueabihf/libopenmpt.so.0 (0xb2680000)
                        	libbluray.so.2 => /usr/lib/arm-linux-gnueabihf/libbluray.so.2 (0xb2639000)
                        	libgnutls.so.30 => /usr/lib/arm-linux-gnueabihf/libgnutls.so.30 (0xb2539000)
                        	libxml2.so.2 => /usr/lib/arm-linux-gnueabihf/libxml2.so.2 (0xb2417000)
                        	libgme.so.0 => /usr/lib/arm-linux-gnueabihf/libgme.so.0 (0xb23d8000)
                        	libchromaprint.so.1 => /usr/lib/arm-linux-gnueabihf/libchromaprint.so.1 (0xb23bb000)
                        	libbz2.so.1.0 => /lib/arm-linux-gnueabihf/libbz2.so.1.0 (0xb239f000)
                        	libvdpau.so.1 => /usr/lib/arm-linux-gnueabihf/libvdpau.so.1 (0xb238c000)
                        	libva-x11.so.2 => /usr/lib/arm-linux-gnueabihf/libva-x11.so.2 (0xb2378000)
                        	libva-drm.so.2 => /usr/lib/arm-linux-gnueabihf/libva-drm.so.2 (0xb2365000)
                        	libsoxr.so.0 => /usr/lib/arm-linux-gnueabihf/libsoxr.so.0 (0xb2308000)
                        	libXau.so.6 => /usr/lib/arm-linux-gnueabihf/libXau.so.6 (0xb22fd000)
                        	libXdmcp.so.6 => /usr/lib/arm-linux-gnueabihf/libXdmcp.so.6 (0xb22e9000)
                        	libogg.so.0 => /usr/lib/arm-linux-gnueabihf/libogg.so.0 (0xb22dc000)
                        	libgdk_pixbuf-2.0.so.0 => /usr/lib/arm-linux-gnueabihf/libgdk_pixbuf-2.0.so.0 (0xb22b2000)
                        	libgio-2.0.so.0 => /usr/lib/arm-linux-gnueabihf/libgio-2.0.so.0 (0xb21a3000)
                        	libpangocairo-1.0.so.0 => /usr/lib/arm-linux-gnueabihf/libpangocairo-1.0.so.0 (0xb218a000)
                        	libpangoft2-1.0.so.0 => /usr/lib/arm-linux-gnueabihf/libpangoft2-1.0.so.0 (0xb216b000)
                        	libpango-1.0.so.0 => /usr/lib/arm-linux-gnueabihf/libpango-1.0.so.0 (0xb2125000)
                        	libfontconfig.so.1 => /usr/lib/arm-linux-gnueabihf/libfontconfig.so.1 (0xb20e6000)
                        	libcroco-0.6.so.3 => /usr/lib/arm-linux-gnueabihf/libcroco-0.6.so.3 (0xb20b1000)
                        	libffi.so.6 => /usr/lib/arm-linux-gnueabihf/libffi.so.6 (0xb209b000)
                        	libpcre.so.3 => /lib/arm-linux-gnueabihf/libpcre.so.3 (0xb203e000)
                        	libpixman-1.so.0 => /usr/lib/arm-linux-gnueabihf/libpixman-1.so.0 (0xb1fb7000)
                        	libxcb-shm.so.0 => /usr/lib/arm-linux-gnueabihf/libxcb-shm.so.0 (0xb1fa4000)
                        	libxcb-render.so.0 => /usr/lib/arm-linux-gnueabihf/libxcb-render.so.0 (0xb1f89000)
                        	libXrender.so.1 => /usr/lib/arm-linux-gnueabihf/libXrender.so.1 (0xb1f72000)
                        	libXext.so.6 => /usr/lib/arm-linux-gnueabihf/libXext.so.6 (0xb1f57000)
                        	libgcrypt.so.20 => /lib/arm-linux-gnueabihf/libgcrypt.so.20 (0xb1ea5000)
                        	libgssapi_krb5.so.2 => /usr/lib/arm-linux-gnueabihf/libgssapi_krb5.so.2 (0xb1e6a000)
                        	libmpg123.so.0 => /usr/lib/arm-linux-gnueabihf/libmpg123.so.0 (0xb1e17000)
                        	libvorbisfile.so.3 => /usr/lib/arm-linux-gnueabihf/libvorbisfile.so.3 (0xb1e01000)
                        	libp11-kit.so.0 => /usr/lib/arm-linux-gnueabihf/libp11-kit.so.0 (0xb1d3f000)
                        	libidn2.so.0 => /usr/lib/arm-linux-gnueabihf/libidn2.so.0 (0xb1d14000)
                        	libunistring.so.2 => /usr/lib/arm-linux-gnueabihf/libunistring.so.2 (0xb1ba9000)
                        	libtasn1.so.6 => /usr/lib/arm-linux-gnueabihf/libtasn1.so.6 (0xb1b8b000)
                        	libnettle.so.6 => /usr/lib/arm-linux-gnueabihf/libnettle.so.6 (0xb1b50000)
                        	libhogweed.so.4 => /usr/lib/arm-linux-gnueabihf/libhogweed.so.4 (0xb1b18000)
                        	libgmp.so.10 => /usr/lib/arm-linux-gnueabihf/libgmp.so.10 (0xb1ac0000)
                        	libicuuc.so.60 => /usr/lib/arm-linux-gnueabihf/libicuuc.so.60 (0xb198a000)
                        	libXfixes.so.3 => /usr/lib/arm-linux-gnueabihf/libXfixes.so.3 (0xb1976000)
                        	libgomp.so.1 => /usr/lib/arm-linux-gnueabihf/libgomp.so.1 (0xb1947000)
                        	libbsd.so.0 => /lib/arm-linux-gnueabihf/libbsd.so.0 (0xb1925000)
                        	libgmodule-2.0.so.0 => /usr/lib/arm-linux-gnueabihf/libgmodule-2.0.so.0 (0xb1912000)
                        	libselinux.so.1 => /lib/arm-linux-gnueabihf/libselinux.so.1 (0xb18e9000)
                        	libresolv.so.2 => /lib/arm-linux-gnueabihf/libresolv.so.2 (0xb18c7000)
                        	libmount.so.1 => /lib/arm-linux-gnueabihf/libmount.so.1 (0xb187f000)
                        	libharfbuzz.so.0 => /usr/lib/arm-linux-gnueabihf/libharfbuzz.so.0 (0xb17fd000)
                        	libthai.so.0 => /usr/lib/arm-linux-gnueabihf/libthai.so.0 (0xb17e6000)
                        	libexpat.so.1 => /lib/arm-linux-gnueabihf/libexpat.so.1 (0xb17b4000)
                        	libgpg-error.so.0 => /lib/arm-linux-gnueabihf/libgpg-error.so.0 (0xb1796000)
                        	libkrb5.so.3 => /usr/lib/arm-linux-gnueabihf/libkrb5.so.3 (0xb16fe000)
                        	libk5crypto.so.3 => /usr/lib/arm-linux-gnueabihf/libk5crypto.so.3 (0xb16c9000)
                        	libcom_err.so.2 => /lib/arm-linux-gnueabihf/libcom_err.so.2 (0xb16b6000)
                        	libkrb5support.so.0 => /usr/lib/arm-linux-gnueabihf/libkrb5support.so.0 (0xb169f000)
                        	libicudata.so.60 => /usr/lib/arm-linux-gnueabihf/libicudata.so.60 (0xafce4000)
                        	libblkid.so.1 => /lib/arm-linux-gnueabihf/libblkid.so.1 (0xafca3000)
                        	libgraphite2.so.3 => /usr/lib/arm-linux-gnueabihf/libgraphite2.so.3 (0xafc78000)
                        	libdatrie.so.1 => /usr/lib/arm-linux-gnueabihf/libdatrie.so.1 (0xafc64000)
                        	libkeyutils.so.1 => /lib/arm-linux-gnueabihf/libkeyutils.so.1 (0xafc51000)
                        	libuuid.so.1 => /lib/arm-linux-gnueabihf/libuuid.so.1 (0xafc3b000)
                        

                        ring-0
                        Posts: 28
                        Joined: Fri Jan 03, 2020 4:59 am
                        languages_spoken: english
                        ODROIDs: XU4 and N2
                        Has thanked: 1 time
                        Been thanked: 0
                        Contact:

                        Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

                        Post by ring-0 »

                        Just some extra information (besides the small diff I sent you over PM):

                        This is exactly what the RetroPie setup script uses for the retroarch build:

                        $ ./configure --prefix=/opt/retropie/emulators/retroarch --disable-sdl --enable-sdl2 --disable-oss --disable-al --disable-jack --disable-qt --disable-pulse --disable-x11 --enable-opengles --enable-opengles3 --enable-floathard --enable-neon --disable-vulkan --disable-wayland

                        And this is what I am testing now, it builds and runs correctly:

                        Code: Select all

                        diff --git a/scriptmodules/emulators/retroarch.sh b/scriptmodules/emulators/retroarch.sh
                        index 15334b7..d5ecd2c 100644
                        --- a/scriptmodules/emulators/retroarch.sh
                        +++ b/scriptmodules/emulators/retroarch.sh
                        @@ -39,7 +39,7 @@ function depends_retroarch() {
                         }
                         
                         function sources_retroarch() {
                        -    gitPullOrClone "$md_build" https://github.com/libretro/RetroArch.git v1.7.9.2
                        +    gitPullOrClone "$md_build" https://github.com/libretro/RetroArch.git v1.8.2
                             applyPatch "$md_data/01_hotkey_hack.diff"
                             applyPatch "$md_data/02_disable_search.diff"
                             applyPatch "$md_data/03_shader_path_config_enable.diff"
                        @@ -54,11 +54,11 @@ function build_retroarch() {
                             if compareVersions "$__os_debian_ver" lt 9; then
                                 params+=(--disable-ffmpeg)
                             fi
                        -    isPlatform "gles" && params+=(--enable-opengles)
                        +    isPlatform "gles" && params+=(--enable-opengles --enable-opengles3)
                             isPlatform "rpi" && isPlatform "mesa" && params+=(--disable-videocore)
                             # Temporarily block dispmanx support for fkms until upstream support is fixed
                             isPlatform "dispmanx" && ! isPlatform "kms" && params+=(--enable-dispmanx --disable-opengl1)
                        -    isPlatform "mali" && params+=(--enable-mali_fbdev)
                        +    isPlatform "mali" && ! isPlatform "xugbm" && params+=(--enable-mali_fbdev)
                             isPlatform "kms" && params+=(--enable-kms --enable-egl)
                             isPlatform "arm" && params+=(--enable-floathard)
                             isPlatform "neon" && params+=(--enable-neon)
                        diff --git a/scriptmodules/emulators/retroarch/02_disable_search.diff b/scriptmodules/emulators/retroarch/02_disable_search.diff
                        index ec26f4a..9bf772f 100644
                        --- a/scriptmodules/emulators/retroarch/02_disable_search.diff
                        +++ b/scriptmodules/emulators/retroarch/02_disable_search.diff
                        @@ -1,13 +1,13 @@
                        -diff --git a/menu/menu_driver.c b/menu/menu_driver.c
                        -index cf3a8c3..aae5231 100644
                        ---- a/menu/menu_driver.c
                        -+++ b/menu/menu_driver.c
                        -@@ -785,7 +785,7 @@ int menu_entry_action(menu_entry_t *entry,
                        -                   entry->label, entry->type, i);
                        +diff --git a/menu/drivers/menu_generic.c b/menu/drivers/menu_generic.c
                        +index 19753ab..c3d950f 100644
                        +--- a/menu/drivers/menu_generic.c
                        ++++ b/menu/drivers/menu_generic.c
                        +@@ -388,7 +388,7 @@ int generic_menu_entry_action(
                        +                   entry->label, entry->type, i, entry->entry_idx);
                                   break;
                                case MENU_ACTION_SEARCH:
                         -         menu_input_dialog_start_search();
                        -+         // menu_input_dialog_start_search();
                        ++         //menu_input_dialog_start_search();
                                   break;
                        - 
                                case MENU_ACTION_SCAN:
                        +          if (cbs && cbs->action_scan)
                        diff --git a/scriptmodules/system.sh b/scriptmodules/system.sh
                        index f163a40..9792823 100644
                        --- a/scriptmodules/system.sh
                        +++ b/scriptmodules/system.sh
                        @@ -392,6 +392,12 @@ function platform_odroid-xu() {
                             __default_asflags=""
                             __default_makeflags="-j2"
                             __platform_flags="arm armv7 neon mali gles"
                        +    # Add a modifier if we are supposed to use the GBM driver
                        +    if [[ ! -z "$XU_GBM_BUILD" ]];
                        +    then
                        +       echo -e "Enabling GBM build modifier!!"
                        +       __platform_flags+=" xugbm"
                        +    fi
                         }
                         
                         function platform_tinker() {
                        I rebased the patch to disable search for 1.8.x and changed the git clone so that it picks the latest version in the 1.8.x range, right now 1.8.2.
                        If the XU_GBM_BUILD env variable is set, a xugbm modifier will be added to the platform string, which can be used like I changed in the retroarch build spec to modify flags passed to the build system. For retroarch I only disable the --enable-mali_fbdev switch as it was causing problems.
                        I will fgrep for other uses of the 'mali' flag and verify compat.

                        I was able to run retroarch from ES (-dev build), and then quickly launch N64 rom with it. I can't speak for performance as I have no clue how to compare since I lack a baseline. The only issue I found is with controls... my Xbox 360 controller joysticks weren't working well, or that's just operator failure ;P

                        AreaScout
                        Posts: 1455
                        Joined: Sun Jul 07, 2013 3:05 am
                        languages_spoken: german, english
                        ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
                        N1, Go, VU5A, Show2, CloudShell2,
                        H2, N2, VU7A, VuShell, Go2, C4
                        Has thanked: 71 times
                        Been thanked: 226 times
                        Contact:

                        Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

                        Post by AreaScout »

                          @ring-0

                          That looks good, if you have a image post it here or a howto build RetroPie from scratch :)

                          RG

                          ring-0
                          Posts: 28
                          Joined: Fri Jan 03, 2020 4:59 am
                          languages_spoken: english
                          ODROIDs: XU4 and N2
                          Has thanked: 1 time
                          Been thanked: 0
                          Contact:

                          Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

                          Post by ring-0 »

                          AreaScout wrote:
                          Wed Jan 08, 2020 3:23 am
                            @ring-0

                            That looks good, if you have a image post it here or a howto build RetroPie from scratch :)

                            RG
                            The patch is all that is needed at the moment, apply it, install your packages and execute the Retropie setup script following the instructions from their Wiki.

                            There are a few hiccups now though:

                            Code: Select all

                            #0  0xa6ab6f10 in check_addr () at /opt/retropie/libretrocores/lr-mupen64plus/mupen64plus_libretro.so
                            #1  0xa6adcbc8 in new_recompile_block () at /opt/retropie/libretrocores/lr-mupen64plus/mupen64plus_libretro.so
                            #2  0xa6adcbc8 in new_recompile_block () at /opt/retropie/libretrocores/lr-mupen64plus/mupen64plus_libretro.so
                            #3  0xa6adcbc8 in new_recompile_block () at /opt/retropie/libretrocores/lr-mupen64plus/mupen64plus_libretro.so
                            #4  0xa6adcbc8 in new_recompile_block () at /opt/retropie/libretrocores/lr-mupen64plus/mupen64plus_libretro.so
                            #5  0xa6adcbc8 in new_recompile_block () at /opt/retropie/libretrocores/lr-mupen64plus/mupen64plus_libretro.so
                            #6  0xa6adcbc8 in new_recompile_block () at /opt/retropie/libretrocores/lr-mupen64plus/mupen64plus_libretro.so
                            #7  0xa6adcbc8 in new_recompile_block () at /opt/retropie/libretrocores/lr-mupen64plus/mupen64plus_libretro.so
                            #8  0xa6adcbc8 in new_recompile_block () at /opt/retropie/libretrocores/lr-mupen64plus/mupen64plus_libretro.so
                            #9  0xa6adcbc8 in new_recompile_block () at /opt/retropie/libretrocores/lr-mupen64plus/mupen64plus_libretro.so
                            #10 0xa6adcbc8 in new_recompile_block () at /opt/retropie/libretrocores/lr-mupen64plus/mupen64plus_libretro.so
                            #11 0xa6adcbc8 in new_recompile_block () at /opt/retropie/libretrocores/lr-mupen64plus/mupen64plus_libretro.so
                            #12 0xa6adcbc8 in new_recompile_block () at /opt/retropie/libretrocores/lr-mupen64plus/mupen64plus_libretro.so
                            #13 0xa6adcbc8 in new_recompile_block () at /opt/retropie/libretrocores/lr-mupen64plus/mupen64plus_libretro.so
                            #14 0xa6adcbc8 in new_recompile_block () at /opt/retropie/libretrocores/lr-mupen64plus/mupen64plus_libretro.so
                            #15 0xa6adcbc8 in new_recompile_block () at /opt/retropie/libretrocores/lr-mupen64plus/mupen64plus_libretro.so
                            #16 0xa6adcbc8 in new_recompile_block () at /opt/retropie/libretrocores/lr-mupen64plus/mupen64plus_libretro.so
                            #17 0xa6adcbc8 in new_recompile_block () at /opt/retropie/libretrocores/lr-mupen64plus/mupen64plus_libretro.so
                            #18 0xa6adcbc8 in new_recompile_block () at /opt/retropie/libretrocores/lr-mupen64plus/mupen64plus_libretro.so
                            That's mupen64plus, an infinite recursion issue with the (I assume new DYNAREC thing).

                            Hangs the core.

                            User avatar
                            rfrayer
                            Posts: 42
                            Joined: Thu Feb 06, 2020 10:13 am
                            languages_spoken: english
                            ODROIDs: xu4, hc1
                            Location: Rutledge, Tn USA
                            Has thanked: 3 times
                            Been thanked: 1 time
                            Contact:

                            Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

                            Post by rfrayer »

                            I wonder if Retro Arena would compile on this without breaking kodi

                            AreaScout
                            Posts: 1455
                            Joined: Sun Jul 07, 2013 3:05 am
                            languages_spoken: german, english
                            ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
                            N1, Go, VU5A, Show2, CloudShell2,
                            H2, N2, VU7A, VuShell, Go2, C4
                            Has thanked: 71 times
                            Been thanked: 226 times
                            Contact:

                            Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

                            Post by AreaScout »

                            @rfrayer

                            The RetroPie setup script would need some modifications as it was designed for fbdev and not GBM driver, see the post of ring-0

                            RG

                            sikotik
                            Posts: 22
                            Joined: Wed Feb 22, 2017 6:05 am
                            languages_spoken: english
                            ODROIDs: xu4
                            Has thanked: 0
                            Been thanked: 0
                            Contact:

                            Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

                            Post by sikotik »

                            rfrayer wrote:
                            Tue Feb 25, 2020 10:58 am
                            I wonder if Retro Arena would compile on this without breaking kodi
                            I'm a RetroArena developer. This is the direction we're headed with our future XU4 builds

                            paher
                            Posts: 15
                            Joined: Sun May 12, 2019 1:07 am
                            languages_spoken: english
                            ODROIDs: XU4
                            Has thanked: 2 times
                            Been thanked: 1 time
                            Contact:

                            Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

                            Post by paher »

                            Hi! Can you help me with flycast (reicast) libretro core? It was compiled without troubles, but there is error on start rom

                            Code: Select all

                            [libretro ERROR] 00:04:716 libretro/common.cpp:376 E[COMMON]: SIGSEGV @ b49412d2 ... (nil) -> was not in vram (dyna code 0)
                            [libretro INFO] Fatal error : segfault
                             in signal_handler -> core/libretro/common.cpp : 383 
                            
                            [libretro ERROR] 00:04:716 libretro/libretro.cpp:3230 E[COMMON]: DEBUGBREAK!
                            [libretro ERROR] 00:04:716 libretro/common.cpp:376 E[COMMON]: SIGSEGV @ a8967ee8 ... 0xa8967ee8 -> was not in vram (dyna code 0)
                            [libretro INFO] Fatal error : segfault
                             in signal_handler -> core/libretro/common.cpp : 383 
                            
                            [libretro ERROR] 00:04:716 libretro/libretro.cpp:3230 E[COMMON]: DEBUGBREAK!
                            Illegal instruction
                            

                            paher
                            Posts: 15
                            Joined: Sun May 12, 2019 1:07 am
                            languages_spoken: english
                            ODROIDs: XU4
                            Has thanked: 2 times
                            Been thanked: 1 time
                            Contact:

                            Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

                            Post by paher »

                            paher wrote:
                            Thu Apr 23, 2020 10:41 am
                            Hi! Can you help me with flycast (reicast) libretro core? It was compiled without troubles, but there is error on start rom
                            Latest working commit is 07879f7a1161050e40b07b4eaf3f3769a2c3557a from 23 Mar

                            MastaG
                            Posts: 337
                            Joined: Mon Aug 26, 2013 6:05 pm
                            languages_spoken: english
                            Has thanked: 24 times
                            Been thanked: 17 times
                            Contact:

                            Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

                            Post by MastaG »

                            paher wrote:
                            Sun Apr 26, 2020 6:23 am
                            paher wrote:
                            Thu Apr 23, 2020 10:41 am
                            Hi! Can you help me with flycast (reicast) libretro core? It was compiled without troubles, but there is error on start rom
                            Latest working commit is 07879f7a1161050e40b07b4eaf3f3769a2c3557a from 23 Mar
                            Make sure that you use gcc and disable lto, (manually specify HAVE_LTCG=0), also link directly with the libGLESv2 from the mali package rather than the mesa/libglvnd version.
                            Then it will work.

                            Still have to push a fix to correct my last commit for disabling LTO on XU3/4.
                            These users thanked the author MastaG for the post:
                            paher (Fri May 01, 2020 8:19 am)

                            paher
                            Posts: 15
                            Joined: Sun May 12, 2019 1:07 am
                            languages_spoken: english
                            ODROIDs: XU4
                            Has thanked: 2 times
                            Been thanked: 1 time
                            Contact:

                            Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

                            Post by paher »

                            Thanks! It works now

                            User avatar
                            MysteryScience
                            Posts: 32
                            Joined: Sun Dec 23, 2018 9:09 pm
                            languages_spoken: english, spanish
                            ODROIDs: XU4Q, XU4
                            Has thanked: 1 time
                            Been thanked: 0
                            Contact:

                            Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

                            Post by MysteryScience »

                            I'm glad to see this thread is still alive and kicking, I'll try to compile everything again from scratch and I hope we have an X5 in the near future :)

                            User avatar
                            MysteryScience
                            Posts: 32
                            Joined: Sun Dec 23, 2018 9:09 pm
                            languages_spoken: english, spanish
                            ODROIDs: XU4Q, XU4
                            Has thanked: 1 time
                            Been thanked: 0
                            Contact:

                            Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

                            Post by MysteryScience »

                            Hi Guys,

                            Do you know if it's possible to enable 'Per-Pixel Alpha Sorting' in the flycast (reicast) Libretro core?

                            I don't see this option to use it

                            (I don't have this option, this pic it's from a window retroarch build)

                            Image

                            From what I have seen on the internet you need to enable the OIT option, but if I put 1 in the Makefile

                            HAVE_OIT := 1

                            I got a lot of compile errors in the

                            core/rend/gl4/gldraw.cpp and
                            core/rend/gl4/gles.cpp

                            so is unable to build this 2 files

                            There is a way to build those files so maybe we can have this Per-Pixel Alpha Sorting option in our builds?

                            Thanks in advance guys

                            Kind regards

                            User avatar
                            MysteryScience
                            Posts: 32
                            Joined: Sun Dec 23, 2018 9:09 pm
                            languages_spoken: english, spanish
                            ODROIDs: XU4Q, XU4
                            Has thanked: 1 time
                            Been thanked: 0
                            Contact:

                            Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

                            Post by MysteryScience »

                            Ok, forget it about the last question guys, I think this is only possible with the new Vulkan library so no OIT love for us.

                            Do you guys, any of you tried to compile yabasanshiro-libretro (the new Yabause)

                            I tried with the next lines

                            Code: Select all

                            https://github.com/devmiyax/yabause
                            make platform=odroid BOARD=ODROID-XU4 DYNAREC_DEVMIYAX=1
                            
                            but I got the next error

                            ../cdbase.c: At top level:
                            ../cdbase.c:1702:10: fatal error: chd.h: No such file or directory
                            #include "chd.h"
                            ^~~~~~~
                            compilation terminated.
                            Makefile:445: recipe for target '../cdbase.c.o' failed
                            make: *** [../cdbase.c.o] Error 1
                            Maybe someone know what package has the chd.h header?

                            EDIT ....


                            Ok, definitively I'm dumb, I was cloning from the wrong repository the right one is this "https://github.com/libretro/yabause.git -b yabasanshiro"

                            It's compiling Ok but its no working (I have a 'Segmentation fault' error when I launch the games),

                            although you can compile the normal Yabause from retroarch and works decently with some lag.


                            Thanks guys

                            paher
                            Posts: 15
                            Joined: Sun May 12, 2019 1:07 am
                            languages_spoken: english
                            ODROIDs: XU4
                            Has thanked: 2 times
                            Been thanked: 1 time
                            Contact:

                            Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

                            Post by paher »

                            Hi all! I need your help again.
                            I try to repeat all steps from scratch and i had a lot of errors.
                            SDL2 and PPSSPP have been compiled but testgles2 and PPSSPPSDL crashed with message "Couldn't initialize video driver: No available video device"
                            RetroArch requires libx11-xcb-dev and libxxf86vm-dev but has compilation errors "like undefined reference to `XF86VidModeGetModeLine'"

                            AreaScout
                            Posts: 1455
                            Joined: Sun Jul 07, 2013 3:05 am
                            languages_spoken: german, english
                            ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
                            N1, Go, VU5A, Show2, CloudShell2,
                            H2, N2, VU7A, VuShell, Go2, C4
                            Has thanked: 71 times
                            Been thanked: 226 times
                            Contact:

                            Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

                            Post by AreaScout »

                            paher wrote:
                            Tue Sep 08, 2020 6:23 am
                            Hi all! I need your help again.
                            I try to repeat all steps from scratch and i had a lot of errors.
                            SDL2 and PPSSPP have been compiled but testgles2 and PPSSPPSDL crashed with message "Couldn't initialize video driver: No available video device"
                            RetroArch requires libx11-xcb-dev and libxxf86vm-dev but has compilation errors "like undefined reference to `XF86VidModeGetModeLine'"
                            I don't know about RetroArch (what about disable X11 with compiler switches?) but SDL2 GBM backend is under heavy change and current hg will not work anymore with drivers other than Mesa, so the solution is to stick on 2.0.12 ...

                            RG

                            paher
                            Posts: 15
                            Joined: Sun May 12, 2019 1:07 am
                            languages_spoken: english
                            ODROIDs: XU4
                            Has thanked: 2 times
                            Been thanked: 1 time
                            Contact:

                            Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

                            Post by paher »

                            Thanks, i will try the old version

                            Post Reply

                            Return to “Projects”

                            Who is online

                            Users browsing this forum: No registered users and 2 guests