RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Can't run advmame on Pi4

    Scheduled Pinned Locked Moved Help and Support
    pi4advmamedrm error0.106
    33 Posts 4 Posters 6.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F
      fadangalini
      last edited by fadangalini

      Raspberry Pi 4B with official power supply
      Retropie 4.7.1 downloaded from official site. (retropie-buster-4.7.1-rpi4_400.img.gz)
      500GB SD Card – (Image installed using ApplePi-Baker v2)
      2 x Ultrastik 360s (Analogue mapped)
      8 Way Powered USB Hub

      Hi,

      I'm struggling to get advmame to run. I have a 0.106 non-merged ROMset which I've checked with clrmamepro and all seems ok other than some chd's showing as incorrect versions.

      When a game starts, I see the initial graphics but it is stuttering, then it goes back to emulation station.

      Following something i read I tried launching from terminal and I get the following error message, 3 times...

      DRM_IOCTL_MODE_CREATE_DUMB failed: Cannot allocate memory
      Failed to create scanout resource

      I searched this online but nothing I found helped.

      Someone did say to try "ps -ef", which I did but the output made no sense to me.

      [link text](<iframe src="https://pastebin.com/embed_iframe/AkzeSn0f" style="border:none;width:100%"></iframe>)

      I also don't know how pastebin works so not sure that is readable!

      Any help greatly appreciated.

      stoney66S dankcushionsD 2 Replies Last reply Reply Quote 0
      • stoney66S
        stoney66 @fadangalini
        last edited by stoney66

        @fadangalini Not sure if this is your problem but the .rc file has to be changed on pi4

        I think these were the lines that needed to be edited from advmame.rc file

        device_keyboard sdl (default raw)
        device_mouse sdl (default auto)
        device_video sdl (default fb)

        F 1 Reply Last reply Reply Quote 0
        • F
          fadangalini @stoney66
          last edited by

          @stoney66 said in Can't run advmame on Pi4:

          device_keyboard sdl

          Thanks for your reply stoney. I've just tried that but no luck with my problem.

          mituM 1 Reply Last reply Reply Quote 0
          • mituM
            mitu Global Moderator @fadangalini
            last edited by

            @fadangalini Post your configuration file for advmame and the emulator's log file (/dev/shm/runcommand.log). Make sure you're starting Advmame from EmulationStation and use pastebin.com for both files.

            F 1 Reply Last reply Reply Quote 0
            • F
              fadangalini @mitu
              last edited by

              @mitu

              Hi,
              Here's the run command.log
              link text

              and here's advmame.rc
              link text

              The only parts of advmame.rc that i've changed are the lines to do with the mouse as I was going to try and setup lightguns. The same problem exists even when i revert it back to it's original

              Many thanks for taking a look

              1 Reply Last reply Reply Quote 0
              • mituM
                mitu Global Moderator
                last edited by mitu

                The runcommand log shows you're not running a standard RetroPie image or have some additional configurations added (runcommand-onend.sh looks to be a malformed script and it's not present in a standard image).

                The

                DRM_IOCTL_MODE_CREATE_DUMB failed: Cannot allocate memory
                Failed to create scanout resource
                

                error roughly translates to another application is using the video output/GPU and the emulator cannot open the display. Do you have any other applications - besides EmulationStation, which goes into background when a game is launched - that shows something on the screen or otherwise is using the GPU ?

                F 1 Reply Last reply Reply Quote 0
                • F
                  fadangalini @mitu
                  last edited by

                  @mitu

                  I am using ledspicer to control the button lights and had to edit runcommand-onstart.sh and runcommand-onend.sh to get it to work.

                  I've just modified runcommand-onend.sh to remove those errors and they don't appear in the log anymore.

                  As far as I know I don't have any other applications going into the background. If there is, how do I find out? Other than installing ledspicer and struggling to get controllers working originally, I haven't done anything.

                  I just stopped the ledspicer service to see if that was the issue and have included the new runcommand.log below. The problem hasn't changed.
                  link text

                  Thanks

                  mituM 1 Reply Last reply Reply Quote 0
                  • mituM
                    mitu Global Moderator @fadangalini
                    last edited by mitu

                    @fadangalini Try to remove anything you have in the onstart script and see if you still get the errors.
                    Try also add to runcommand-onstart.sh (at the end of the file):

                    sudo cat /sys/kernel/debug/dri/1/state
                    

                    and then post the runcommand.log again - it should show which program is currently using the GPU.

                    F 1 Reply Last reply Reply Quote 0
                    • dankcushionsD
                      dankcushions Global Moderator @fadangalini
                      last edited by

                      @fadangalini said in Can't run advmame on Pi4:

                      DRM_IOCTL_MODE_CREATE_DUMB failed: Cannot allocate memory

                      i have also seen this error due to a misconfigured memory split. can you please show your /boot/config.txt ?

                      F 1 Reply Last reply Reply Quote 0
                      • F
                        fadangalini @mitu
                        last edited by

                        @mitu

                        I removed everything from the runcommand-onstart.sh and only have the line sudo cat /sys/kernel/debug/dri/1/state

                        here is the runcommand.log below
                        link text

                        There was a lot of text onscreen when trying to run but it is too small and disappears too fast for me to read or take a picture. It doesn't seem to have gone into the log...

                        mituM 1 Reply Last reply Reply Quote 0
                        • F
                          fadangalini @dankcushions
                          last edited by

                          @dankcushions

                          Hi,

                          Here is that file below:
                          link text

                          Many thanks

                          1 Reply Last reply Reply Quote 0
                          • mituM
                            mitu Global Moderator @fadangalini
                            last edited by

                            @fadangalini said in Can't run advmame on Pi4:

                            @mitu

                            I removed everything from the runcommand-onstart.sh and only have the line sudo cat /sys/kernel/debug/dri/1/state

                            here is the runcommand.log below
                            link text

                            There's no extra detail, unfortunately, in the new log - looks like the output is not saved in the runcommand. Replace the command with

                            sudo cat /sys/kernel/debug/dri/1/state >/dev/shm/modinfo.txt
                            

                            and then post the /dev/shm/modinfo.txt log file.

                            F 1 Reply Last reply Reply Quote 0
                            • F
                              fadangalini @mitu
                              last edited by

                              @mitu

                              Ok, I've just tried that, this time the game has frozen rather than go back to EmulationStation.

                              But here is the mod info.txt file below:
                              link text

                              I have to go to work now and won't finish till midnight, so I won't be back on again now until the morning.

                              Look forward to speaking again tomorrow and thanks for your time so far.

                              mituM 1 Reply Last reply Reply Quote 0
                              • mituM
                                mitu Global Moderator @fadangalini
                                last edited by

                                @fadangalini said in Can't run advmame on Pi4:

                                But here is the mod info.txt file below:
                                link text

                                From the log output, there's no other program using the GPU at the time, so in that respect it's ok. Might want to try @dankcushions's suggestion and reserve a bit of GPU ram in config.txt, though on the Pi4 the VRAM for the GPU is dynamically allocated from the RAM and the following stanza shouldn't be necessary for emulators:

                                gpu_mem=128
                                
                                F 1 Reply Last reply Reply Quote 0
                                • F
                                  fadangalini @mitu
                                  last edited by

                                  @mitu

                                  Morning.

                                  I was hoping it would be something doing it that we could shutdown, so that's a shame. I've added that line to config.txt and still having the same issue.

                                  Here's the latest runcommand.log but it looks the same.
                                  link text

                                  1 Reply Last reply Reply Quote 0
                                  • mituM
                                    mitu Global Moderator
                                    last edited by

                                    Not sure what happens with your setup.
                                    I wrote a stock 4.7.1 image and installed just advmame, it works fine. Updated the image (RetroPie and the OS, from the Update menu in RetroPie-Setup), it still works fine. This is with advmame, not the older advmame version (advmame-1.4 or advmame-0.94).

                                    Are you running EmulationStation from the desktop or you're just using the default setup (ES runs at boot) ? Did you update the image ? Any other configurations on the system ?

                                    F 1 Reply Last reply Reply Quote 0
                                    • F
                                      fadangalini @mitu
                                      last edited by

                                      @mitu

                                      I have no idea...
                                      I've just tried similar to you.
                                      I got a fresh MicroSD card, installed the latest 4.7.1 from RetroPie.org.uk.
                                      setup wifi and ssh. installed advmame and put some roms in /home/pi/retropie/roms/mame_advmame

                                      I updated everything I could.

                                      This time they do not crash, but the video and audio are the same, very slow and choppy. Using the tab button in game it says 'advance mame 3.9'.

                                      On my original setup on the other sd card it doesn't say 3.9 in the menu. and none of the folders are labelled with 1.4 or 0.94, just 'advmame'

                                      Do you think it might be to do with the HDMI setup to the screen? Just clutching at straws as i'm clueless really, as mame2003 works fine, along with snes, mega drive, redream... and everything else.

                                      Both setups are the default, ES runs from boot.

                                      F 1 Reply Last reply Reply Quote 0
                                      • F
                                        fadangalini @fadangalini
                                        last edited by fadangalini

                                        @fadangalini

                                        Maybe it's the roms? I got them from a couple different places, they say 0.106 non-merged sets...

                                        here's a quick vid of one running...

                                        No errors in the runcommand.log at the moment.

                                        mituM 1 Reply Last reply Reply Quote 0
                                        • mituM
                                          mitu Global Moderator @fadangalini
                                          last edited by

                                          @fadangalini said in Can't run advmame on Pi4:

                                          Maybe it's the roms? I got them from a couple different places, they say 0.106 non-merged sets...

                                          Is this from the system where you have problems ? Usually a bad ROM will result in a different kind of error - advmame will list the missing ROMs and exit cleanly.

                                          On my original setup on the other sd card it doesn't say 3.9 in the menu. and none of the folders are labelled with 1.4 or 0.94, just 'advmame'

                                          There are no folders labelled with the version and you can't install these older version on a Pi4 anyway, but I just mentioned the version to make sure we're on the same page.

                                          F 1 Reply Last reply Reply Quote 0
                                          • F
                                            fadangalini @mitu
                                            last edited by

                                            @mitu

                                            This is on a fresh new install on the same pi.
                                            Thought i'd see if that worked and if it did I was going to start from scratch.

                                            Ok, so at least the roms are probably ok... just to find the problem haha.

                                            I think we are on the same page with regards to the advmame version.

                                            I've just made a backup of the original sd card with the original problem before fiddling too much.

                                            mituM 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                                            Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.