Homepage › Forums › RetroPie Project › Everything else related to the RetroPie Project › Linux command to quit retropie / emulators.
- This topic has 3 replies, 2 voices, and was last updated 10 years, 7 months ago by cortx.
-
AuthorPosts
-
04/24/2014 at 21:46 #6280cortxParticipant
Hello;
I’d some problem with my save when I shutdown the raspberry; see: https://www.petrockblock.com/forums/topic/saved-game-lost-after-reboot/
All is now OK with a restart every time that I’ve finished to play.I buy a shutdown circuit to shutdown the raspberry pi with a power buton.
With this module, when I push the power buton, the command “sudo poweroff” is send to the system.
I can modify this script with some other command.Is it possible to send a system command to shut down the emulator before shutdown the Raspberry ?
With that, there will be no more problem with my save.
How can I do that ?I run a “sudo ps” but don’t find an explicit process name about retropie or retroarch.
/etc$ sudo ps
PID TTY TIME CMD
1 ? 00:00:01 init
2 ? 00:00:00 kthreadd
3 ? 00:00:00 ksoftirqd/0
5 ? 00:00:00 kworker/0:0H
6 ? 00:00:00 kworker/u:0
7 ? 00:00:00 kworker/u:0H
8 ? 00:00:00 khelper
9 ? 00:00:00 kdevtmpfs
10 ? 00:00:00 netns
12 ? 00:00:00 bdi-default
13 ? 00:00:00 kblockd
14 ? 00:00:00 khubd
15 ? 00:00:00 rpciod
16 ? 00:00:00 khungtaskd
17 ? 00:00:00 kswapd0
18 ? 00:00:00 fsnotify_mark
19 ? 00:00:00 nfsiod
20 ? 00:00:00 crypto
27 ? 00:00:00 kthrotld
28 ? 00:02:21 VCHIQ-0
29 ? 00:00:18 VCHIQr-0
30 ? 00:00:00 VCHIQs-0
31 ? 00:00:00 iscsi_eh
32 ? 00:00:00 dwc_otg
33 ? 00:00:00 DWC Notificatio
35 ? 00:00:03 mmcqd/0
36 ? 00:00:00 deferwq
37 ? 00:00:00 kworker/u:2
39 ? 00:00:00 jbd2/mmcblk0p2-
40 ? 00:00:00 ext4-dio-unwrit
155 ? 00:00:00 udevd
724 ? 00:00:00 udevd
725 ? 00:00:00 udevd
1623 ? 00:00:03 ifplugd
1660 ? 00:00:01 ifplugd
1971 ? 00:00:00 dhclient
2053 ? 00:00:00 rsyslogd
2117 ? 00:00:00 cron
2225 ? 00:00:00 bluetoothd
2241 ? 00:00:00 krfcommd
2250 ? 00:00:00 cupsd
2334 ? 00:00:00 nmbd
2344 ? 00:00:00 sshd
2351 ? 00:00:00 smbd
2371 ? 00:00:00 smbd
2407 ? 00:00:27 switch.sh
2408 ? 00:00:00 startpar
2451 ? 00:00:00 console-kit-dae
2520 ? 00:00:00 polkitd
2546 ? 00:00:00 VCHIQka-0
2697 ? 00:00:00 my_queue
11548 ? 00:00:00 sshd
12036 ? 00:00:00 sshd
13694 ? 00:00:04 kworker/0:2
14297 ? 00:00:05 kworker/0:0
14763 ? 00:00:00 flush-179:0
14884 ? 00:00:02 kworker/0:1
15142 ? 00:00:00 sleep
15143 ? 00:00:00 sudo
15144 ? 00:00:00 ps04/24/2014 at 22:02 #6282cortxParticipantI’m a very newbie in linux command.
But I’ve found that:
/etc$ ps aux | grep *retro*pi 2662 0.0 0.1 1752 508 tty1 S+ 17:53 0:00 sh -c /home/pi/RetroPie/supplementary/runcommand/runcommand.sh 1 “/home/pi/RetroPie/emulators/RetroArch/installdir/bin/retroarch -L /home/pi/RetroPie/emulatorcores/picodrive/picodrive_libretro.so –config /home/pi/RetroPie/configs/all/retroarch.cfg –appendconfig /home/pi/RetroPie/configs/megadrive/retroarch.cfg /home/pi/RetroPie/roms/megadrive/Streets\ of\ Rage.bin”
pi 2663 0.0 0.3 4276 1300 tty1 S+ 17:53 0:00 /bin/bash /home/pi/RetroPie/supplementary/runcommand/runcommand.sh 1 /home/pi/RetroPie/emulators/RetroArch/installdir/bin/retroarch -L /home/pi/RetroPie/emulatorcores/picodrive/picodrive_libretro.so –config /home/pi/RetroPie/configs/all/retroarch.cfg –appendconfig /home/pi/RetroPie/configs/megadrive/retroarch.cfg /home/pi/RetroPie/roms/megadrive/Streets\ of\ Rage.bin
pi 2690 49.7 1.7 76448 6888 tty1 Rl+ 17:54 59:12 /home/pi/RetroPie/emulators/RetroArch/installdir/bin/retroarch -L /home/pi/RetroPie/emulatorcores/picodrive/picodrive_libretro.so –config /home/pi/RetroPie/configs/all/retroarch.cfg –appendconfig /home/pi/RetroPie/configs/megadrive/retroarch.cfg /home/pi/RetroPie/roms/megadrive/Streets of Rage.bin
pi 16527 1.0 0.2 3540 808 ? S 19:53 0:00 grep retroarch.cfg/etc$ ps -u pi
PID TTY TIME CMD
2530 tty1 00:00:00 bash
2539 tty1 00:00:00 emulationstatio
2543 tty1 00:00:16 emulationstatio
2662 tty1 00:00:00 sh
2663 tty1 00:00:00 runcommand.sh
2690 tty1 00:59:35 retroarch
11569 ? 00:00:00 sshd
11570 ? 00:00:00 sftp-server
12057 ? 00:00:00 sshd
12058 ? 00:00:00 bash
16614 ? 00:00:00 psWith the Time start and Time elapsed columns I thinks the process is the PID 2690
But witch one should I kill: The one from “ps -u pi” or the one from “pa aux | grep *retro*”How can I kill a process without know the number ?
04/25/2014 at 04:44 #6293RazorX2014Participanti dont understand why you need to do this all you do is save your game then load up the ingame gui and click quit retroarch and it takes you back to the emulators screen where you can hit the start button on your pad or whatever you have set the menu to then click shutdown and thats it.
if you have an issue with saving make sure the save directory is set to default on the ingame gui and if it is and its still not working run
sudo chmod 777 /home/pi/RetroPie/roms
and then reboot and try to save and see if that fixes it04/25/2014 at 16:50 #6311cortxParticipantHello;
I’m want to do that to never forgot to exit with my gamepad to save.
And I’ve set my raspberry into a NES case. That way I can use the power and reset buton of the case.
If I shutdown the raspberry with my gamepad, the buton power will always stay in “power on” mode and the red LED always active even if the raspberry is shutdown.
*****************Problem solved, a Simple command “sudo poweroff” works.
Even if I have not exit the game. -
AuthorPosts
- The forum ‘Everything else related to the RetroPie Project’ is closed to new topics and replies.