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

    How to setup Safe Shutdown on CM4 without Wifi?

    Scheduled Pinned Locked Moved Help and Support
    safe shutdowncm4gpi case 2
    11 Posts 2 Posters 982 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.
    • mituM
      mitu Global Moderator
      last edited by

      Maybe copy it on the SDcard from your PC ?
      How do you intend to add ROMs/games to the system - you can maybe use the same method ?

      T 1 Reply Last reply Reply Quote 0
      • T
        TheBrianJ @mitu
        last edited by

        @mitu

        What would I copy onto the SDCard?

        And I was wondering the same thing about ROMS. You have to forgive my ignorance, this is the first time I've ever touched anything Raspberry Pi related in my life so I'm completely ignorant about how any of this works.

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

          What would I copy onto the SDCard?

          You can copy the shutdown script itself. I assume the instructions for its installation just download it somewhere on the system and then just set up the script to auto-start. I'm not sure which tutorial/instructions are you following, if you add them here in the topic we'd be able to see how things can be installed without an internet connection.

          And I was wondering the same thing about ROMS. You have to forgive my ignorance, this is the first time I've ever touched anything Raspberry Pi related in my life so I'm completely ignorant about how any of this works.

          Take a look at https://retropie.org.uk/docs/Transferring-Roms/.

          T 1 Reply Last reply Reply Quote 0
          • T
            TheBrianJ @mitu
            last edited by

            @mitu https://github.com/RetroFlag/GPiCase2-Script Here are the instructions I was given to follow.

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

              To get the shutdown script installed, you can try:

              • download the etropie_SafeShutdown_gpi2.py file and place it on the sdcard. Your PC will most likely see only the boot partition, so place it there.
              • boot your RetroPie system, then exit EmulationStation (F4 or just exit from the menu) to access the command line. Add the following lines to the startup script with a text editor.
              • open the file with nano:
                 nano /opt/retropie/configs/all/autostart.sh
                
              • add a line before the emulationstation command:
                 sudo python /boot/SafeShutdown.py &
                
                The contents of the file should look like this:
                sudo python /boot/SafeShutdown.py &
                emulationstation #auto
                
              • exit the text editor (Ctrl+X and then choose to save the file) and then reboot your system.
              T 1 Reply Last reply Reply Quote 0
              • T
                TheBrianJ @mitu
                last edited by

                @mitu I tried this: I was able to enter in everything you said, but when I rebooted the system, it didn't work. I tried going back to the command line and using the nano command again, but this time I'm met with an error that says "Error reading lock file /opt/retropie/configs/all/.autostart.sh.swp: Not Enough"

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

                  @TheBrianJ Do you have enough free space ? The error you posted hints that your sdcard is full.

                  T 1 Reply Last reply Reply Quote 0
                  • T
                    TheBrianJ @mitu
                    last edited by

                    @mitu Definitely have more than enough room, it's a 32GB

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

                      @TheBrianJ said in How to setup Safe Shutdown on CM4 without Wifi?:

                      Error reading lock file

                      Delete the /opt/retropie/configs/all/.autostart.sh.swp file with

                      rm /opt/retropie/configs/all/.autostart.sh.swp
                      

                      and try again editing the file.

                      T 1 Reply Last reply Reply Quote 0
                      • T
                        TheBrianJ @mitu
                        last edited by

                        @mitu Heya! As an update, I got it working! Worked with a friend of mine who is a Linux expert and he walked me through it step by step, which did include the steps that you had pointed out. Thanks so much for your help!

                        1 Reply Last reply Reply Quote 1
                        • 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.