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

    I messed up my settings.

    Scheduled Pinned Locked Moved Help and Support
    runcommandretropie menupython
    21 Posts 5 Posters 2.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.
    • ?
      A Former User
      last edited by

      I hold my hands up, I have been messing/tweaking the runcommand-onstart.sh to see how high I can push the resolution using a Pi2Scart. The highest I have been able to get this is, without losing sync, is 450x270. This seemed to be a good res for vertical games higher than 240, such as 256, and 272 - which would just squeeze into 270 (1 pixel off top and bottom).

      I ended up with - hdmi_timings=450 1 50 33 90 270 1 1 1 30 0 0 0 50 0 9600000 1
      My entry in runcommand-onstart.sh

      "arcade") # Load Arcade Test 450x270 timings
      if [ "$emuName" != "advmame" ]; then
      vcgencmd hdmi_timings 450 1 50 33 90 270 1 1 1 30 0 0 0 50 0 9600000 1
      tvservice -e "DMT 87"
      fbset -depth 32 && fbset -depth 32 -xres 320 -yres 240
      fi
      ;;

      I edited this on my PC, copied over the runcommand-onstart.sh file, rebooted the Pi, and now I can't launch anything. I just get the following error, very briefly.

      python: can't open file '/opt/retropie/configs/all/runcommand-onstart.sh

      This, despite the file being there. If I delete the whole configs/all directory and copy over a backup I did before I started this, I still get the same error. Is there anywhere else a copy of runcommand-onstart.sh is ?

      ClydeC 1 Reply Last reply Reply Quote 0
      • stoney66S
        stoney66
        last edited by

        If the file is there, it's probably a permissions problem on the file. There is a script for resetting rom permissions not sure about configs.

        1 Reply Last reply Reply Quote 0
        • ClydeC
          Clyde @A Former User
          last edited by

          @John_RM_70 Picking up @stoney66's idea, you can check the permissions and the owner of the file by pressing F4 in Emulation Station and then entering this command:

          ls -l /opt/retropie/configs/all/runcommand-onstart.sh   # The "l"s are small "L"s and not ones ("1")
          

          If you are not familiar with the output, you can show it to us. Alas, I'm not at home right now, so I can't show you the correct permissions of that file.

          Alternatively, you could log into Retropie via SSH and run the command in the SSH console.

          ? 1 Reply Last reply Reply Quote 0
          • ?
            A Former User @Clyde
            last edited by A Former User

            @Clyde Yeah, cheers Clyde and stoney. I did wonder if this was a permission thing. Not knowing much about Linux, does this regularly happen, if you copy over files from a Windows PC via WinSCP ?
            I like to backup all my configs to my PC, and then mess/tweak the configs to get the best I can from the Pi2Scart, but always have a fallback if things go wrong - the fallback being the backup. Do permissions get lost when files/folders are copied across to a different platform ?
            Anyway, off to try Clyde's suggestion.

            Edit: Here is the result

            -rw-r--r-- 1 pi pi 625

            mituM stoney66S 2 Replies Last reply Reply Quote 0
            • mituM
              mitu Global Moderator @A Former User
              last edited by

              @John_RM_70 Normally this would not happen, since the file shares are automatically setting the permissions as pi user when you copy files over. Maybe you used the command like and accidentally created the file with sudo (which would make the file owner root).

              1 Reply Last reply Reply Quote 0
              • stoney66S
                stoney66 @A Former User
                last edited by

                @John_RM_70 You can always try changing the permissions see if it works, if not I'd change it back. chmod 777 /opt/retropie/configs/all/runcommand-onstart.sh will allow anything for this file (read write and execute). To change it back (pending what you pasted was the correct permissions) it would be chmod 644 /opt/retropie/configs/all/runcommand-onstart.sh. If setting it to 777 does work, I'd still test some other permissions so its not wide open (maybe 666 the number of the beast or 664)

                Also PI is the owner of the file so I would think it's ok as is right now plus the file should be readable by anyone and only writeable by the owner (pi in this case). You can also just try chmod +x /opt/retropie/configs/all/runcommand-onstart.sh in case the file needs to be executable only. Others here know better than I do though.

                1 Reply Last reply Reply Quote 0
                • ?
                  A Former User
                  last edited by

                  Cheers for all the replies. What I don't understand is, if I just delete the runcommand-onstart.sh, and try without one, I still get the same python error. And it does this on anything I try to launch via ES.
                  I will try the suggestions by stoney66, thanks for those. If not, I'm beginning to think I will have to go back to my image backup of the whole sdcard. Problem with that is, and it's my own fault, I have done a lot of work inbetween backups - so a new backup was pending.
                  One last thing. What does ES first look for when you launch a retroarch/normal emulator ?
                  And, nothing is logged in /dev/shm - so I have nothing to look at, or go by.

                  mituM 1 Reply Last reply Reply Quote 0
                  • mituM
                    mitu Global Moderator @A Former User
                    last edited by

                    @John_RM_70 Try re-installing the runcommand package, that's the command that Emulationstation runs no matter which emulator is used.

                    ? 1 Reply Last reply Reply Quote 0
                    • ?
                      A Former User @mitu
                      last edited by A Former User

                      @mitu Good idea, didn't think of that. I'm just waiting for the Pi to boot. Will try that, next.

                      Edit: Tried all suggestions. Same error.

                      python: can't open file /opt/retropie/configs/all/runcommand-onstart.sh : [Error no 2] No such file or directory.

                      Really stumped.

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

                        That's really weird, python is only used in RetroPie for starting joy2key (from Runcommand) and for Bluetooth controller pairing.
                        Can you get the Emulationstation log from /home/pi/.emulationstation/es_log, after you start the game and get the error, and post it on pastebin.com ?

                        1 Reply Last reply Reply Quote 0
                        • ?
                          A Former User
                          last edited by A Former User

                          @mitu said in I messed up my settings.:

                          es_log

                          The log file was in /opt/retropie/configs/all/emulationstation

                          /opt/retropie/configs/all/emulationstation

                          lvl2: Attempting to launch game...
                          lvl2: python /opt/retropie/configs/all/runcommand-onstart.sh /home/pi/RetroPie/roms/arcade/hypsptsp.zip arcade dummy
                          lvl1: ...launch terminated with nonzero exit code 512!
                          lvl2: Creating surface...
                          lvl2: Created window successfully.
                          lvl2: req sound [detailed.launch]
                          lvl2: (missing)
                          lvl2: Attempting to launch game...
                          lvl2: python /opt/retropie/configs/all/runcommand-onstart.sh /home/pi/RetroPie/roms/arcade/88games.zip arcade dummy
                          lvl1: ...launch terminated with nonzero exit code 512!
                          lvl2: Creating surface...
                          lvl2: Created window successfully.
                          lvl2: Added/Updated 2 entities in '/home/pi/RetroPie/roms/arcade/gamelist.xml'
                          lvl2: EmulationStation cleanly shutting down.

                          that is all it says after trying the first entry in "Arcade".

                          Edit: Wrong log file. Sorry. Uploaded the correct one. I was pasting a log I found online.

                          mituM 1 Reply Last reply Reply Quote 0
                          • mituM
                            mitu Global Moderator @A Former User
                            last edited by mitu

                            @John_RM_70 I'm sorry to say it, but your problem is not in RetroPie, it's the script you have used to replace runcommand

                            lvl2: python /opt/retropie/configs/all/RGB-Pi/Emu_Launcher.py /home/pi/RetroPie/roms/arcade/88games.zip arcade dummy
                            

                            Are you using a RetroPie image or a 3rd party image ?

                            1 Reply Last reply Reply Quote 0
                            • ?
                              A Former User
                              last edited by A Former User

                              My own image. Built from scratch Retropie v4.4
                              I have been using custom runcommand-onstart.sh settings from many Pi2scart forums. But as soon as I found settings that went out of sync on my TV, I wiped them all and started again.
                              Ignore the first paste, I was googling the error and found a similar problem on a different forum. Forgot I had that in the clipboard.

                              mituM 1 Reply Last reply Reply Quote 0
                              • mituM
                                mitu Global Moderator @A Former User
                                last edited by mitu

                                @John_RM_70 And it's still wrong. The command line

                                lvl2: python /opt/retropie/configs/all/runcommand-onstart.sh /home/pi/RetroPie/roms/arcade/hypsptsp.zip arcade dummy
                                

                                makes no sense. The onstart script is not meant to be executable directly, but rather included by RetroPie's Runcommand script.
                                And Pythong and Bash are different scripting languages, so you can't execute a shell script with python.

                                Did you modify your es_systems.cfg file and replaced the Runcommand with the script line above ?

                                cyperghostC ? 2 Replies Last reply Reply Quote 1
                                • cyperghostC
                                  cyperghost @mitu
                                  last edited by cyperghost

                                  @mitu sharp eyes monsieur (or eagle eyes?)

                                  1 Reply Last reply Reply Quote 0
                                  • ?
                                    A Former User @mitu
                                    last edited by A Former User

                                    @mitu said in I messed up my settings.:

                                    Did you modify your es_systems.cfg file and replaced the Runcommand with the script line above ?

                                    Sharp eyes indeed. I don't believe it but there is no es_systems.cfg, just a master file from the original Retropie install, and no back up. Thankfully, I backed this up to my PC last week. So, I'm going to put the backup file back and see if that does it.
                                    I will get back a bit later, but I think mitu has solved this.

                                    Edit:
                                    Ha, that did it, and everything now shows up properly. I didn't have a es_systems.cfg. Copied over a older backup and everything works great. Even my original custom hdmi_timings, the ones I tried before I messed up, now all work. Great.

                                    mitu:- Many thanks for your help. I owe you a beer.

                                    1 Reply Last reply Reply Quote 0
                                    • ClydeC
                                      Clyde
                                      last edited by

                                      Good thing that you have a backup, because …

                                      no backup, no pity.

                                      1 Reply Last reply Reply Quote 0
                                      • ?
                                        A Former User
                                        last edited by

                                        Yep, no backup then we only have ourselves to blame.
                                        I'm wondering if the problems started when I have had to pull the power plug on the Pi, after exiting a game and getting a black screen - My TV goes out of sync. So, I'm basically not doing a clean shut down, and doing this for many times.
                                        The custom settings I have wanted are from the Pi Scart hat - the RGB-Pi. It's not a traditional hat, it's a scart cable with a GPIO pins connection with the electronics in the cable. My Pi2Scart can't use it's settings, it uses 24-bit colour depth, and a different dtoverlay.
                                        But, it does use the superb 1600px/1900px tweaks, which is what I'm determined to get working. Such as this

                                        "megadrive") # Load Sega Megadrive timings

                                        vcgencmd hdmi_timings 1920 1 48 192 240 240 1 3 3 16 0 0 0 59.92 0 37680000 1

                                        tvservice -e "DMT 87"

                                        fbset -depth 32 && fbset -depth 32 -xres 1920 -yres 240

                                        ;;

                                        Those look great, especially scrolling. But I can't get back to ES using runcommand-onend.sh, I just get a black screen. Hence all the illegal shut downs, and wiping it all and starting again.

                                        Anyway, you live and learn, and I've definitely learnt the hard way. Thanks to you all, appreciate it.

                                        mituM 1 Reply Last reply Reply Quote 0
                                        • mituM
                                          mitu Global Moderator @A Former User
                                          last edited by

                                          @John_RM_70 said in I messed up my settings.:

                                          The custom settings I have wanted are from the Pi Scart hat - the RGB-Pi. It's not a traditional hat, it's a scart cable with a GPIO pins connection with the electronics in the cable. My Pi2Scart can't use it's settings, it uses 24-bit colour depth, and a different dtoverlay.

                                          You should just enable SSH and connect to the PI, then try various tvservice and vcgencmd settings to plug into the onend script. If the screen is blank, you'd still have control and try out things and even shutdown/restart, without having to pull the plug and abruptly shutdown the system.

                                          1 Reply Last reply Reply Quote 0
                                          • ?
                                            A Former User
                                            last edited by

                                            mitu, this is my onend script.

                                            vcgencmd hdmi_timings 320 1 6 30 44 240 1 3 3 21 0 0 0 60 0 6400000 1
                                            tvservice -e "DMT 87"
                                            fbset -depth 32 && fbset -depth 32 -xres 320 -yres 240

                                            clear

                                            This doesn't work. Not only do I get a blank screen, the Pi isn't responding via SSH. It's like the Pi locks up, but I can't see why.

                                            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.