• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
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 891 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.
  • T
    TheBrianJ
    last edited by 4 Dec 2022, 05:35

    Hello! I recently bought a RetroFlag GPi Case 2, and a CM4 without WiFi. I'm attempting to get everything set up, but I've run into a problem: I'm trying to get the Safe Shutdown script installed, but every how-to list says to connect using WiFi to do so; however, the CM4 I am using doesn't in fact have WiFi, as I mentioned!

    So how do I go about getting Safe Shutdown up and running if the system itself doesn't have WiFi? Thanks so much for the help in advance!

    1 Reply Last reply Reply Quote 0
    • M
      mitu Global Moderator
      last edited by 4 Dec 2022, 06:34

      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 4 Dec 2022, 07:12 Reply Quote 0
      • T
        TheBrianJ @mitu
        last edited by 4 Dec 2022, 07:12

        @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.

        M 1 Reply Last reply 4 Dec 2022, 07:52 Reply Quote 0
        • M
          mitu Global Moderator @TheBrianJ
          last edited by mitu 12 Apr 2022, 07:52 4 Dec 2022, 07:52

          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 9 Dec 2022, 04:35 Reply Quote 0
          • T
            TheBrianJ @mitu
            last edited by 9 Dec 2022, 04:35

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

            1 Reply Last reply Reply Quote 0
            • M
              mitu Global Moderator
              last edited by 9 Dec 2022, 04:55

              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 9 Dec 2022, 21:26 Reply Quote 0
              • T
                TheBrianJ @mitu
                last edited by 9 Dec 2022, 21:26

                @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"

                M 1 Reply Last reply 9 Dec 2022, 21:57 Reply Quote 0
                • M
                  mitu Global Moderator @TheBrianJ
                  last edited by 9 Dec 2022, 21:57

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

                  T 1 Reply Last reply 9 Dec 2022, 22:12 Reply Quote 0
                  • T
                    TheBrianJ @mitu
                    last edited by 9 Dec 2022, 22:12

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

                    1 Reply Last reply Reply Quote 0
                    • M
                      mitu Global Moderator
                      last edited by 10 Dec 2022, 05:09

                      @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 12 Dec 2022, 06:44 Reply Quote 0
                      • T
                        TheBrianJ @mitu
                        last edited by 12 Dec 2022, 06:44

                        @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
                        1 out of 11
                        • First post
                          1/11
                          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.

                          This community forum collects and processes your personal information.
                          consent.not_received