From 9ca12547c6ba79b0a26750baa75d95ea7cedd18d Mon Sep 17 00:00:00 2001 From: Gabe Knuth Date: Fri, 21 Mar 2025 20:36:23 -0500 Subject: [PATCH] Update retropie_SafeShutdown_gpi2.py to exit ES cleanly Adding -SIGTERM to the killall command exits Emulation Station cleanly. Without this, it won't save configurations it stores in memory and writes to disk on a clean exit (like Last Played). --- retropie_SafeShutdown_gpi2.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/retropie_SafeShutdown_gpi2.py b/retropie_SafeShutdown_gpi2.py index 8de6054..84df08c 100644 --- a/retropie_SafeShutdown_gpi2.py +++ b/retropie_SafeShutdown_gpi2.py @@ -25,8 +25,8 @@ def poweroff(): while True: #self.assertEqual(GPIO.input(powerPin), GPIO.LOW) GPIO.wait_for_edge(powerPin, GPIO.FALLING) - os.system("sudo killall emulationstation") - os.system("sudo killall emulationstatio") #RetroPie 4.6 + os.system("sudo killall -SIGTERM emulationstation") + os.system("sudo killall -SIGTERM emulationstatio") #RetroPie 4.6 os.system("sudo sleep 5s") os.system("sudo shutdown -h now") def lcdrun():