crcerror / ES-generic-shutdown

A script that includes a few known standard power switches (MAUSBERRY, SHIM, POLOLU) and gots a default config for a safe shutdown
47 stars 9 forks source link

NESPi+ power off leaves power running to pi #1

Closed Brandoskey closed 6 years ago

Brandoskey commented 6 years ago

With the retroflag script when you press the power button the power is completely cut from the pi, so if you have a fan installed, it too shuts off. With your script the fan stays running. Is this because your script doesn't use the shutdown command?

Brandoskey commented 6 years ago

I think it may keep power running to the pi in the nespi+ because you're not using raspi-gpio set $GPIO_poweronctrl? You've commented it out under the nesplus and mentioned you didn't know what it does. I'm totally guessing but it may be what cuts power to the pi or possibly the pi case completely? My fan is connected to the fan header on the nespi+ and only shuts off using the retroflag script.

crcerror commented 6 years ago

Sorry for being late. What happens if you uncomment the powerctrl line? It's line 184 in script. Just remove the first #

I don't have this case so I can't tell you what's happening nor I can test ;) I was aware of this action but I assumed if I set the GPIO4 Pin to low I've some side effects (sudden shutoff or something alike)

But please can you anser following questions:

  1. If you press POWER ON and the system starts - will LED glow if script is loaded or will it always glow?
  2. If you press POWER OFF inside ES (even with emulators running) and the system performs a saves shutdown (with metadata, favourites .... saved) - LED blinks 4 times and stays off?
  3. If you press RESET with emulator running and you will be returned to ES?
  4. If you press RESET within ES and it restarts ES (NO REBOOT!!!)?
Brandoskey commented 6 years ago

I was going to do your troubleshooting when I got home from work but it looks like you've solved the issue already on your end?

I'm currently using your fork of the retroflag script and it's doing everything I need, so let me know and I can swap back to this one and test if you need.

crcerror commented 6 years ago

Then please feel free to test the current version 0.42 if the fan is shut off. I just uncommented the part code you mentionted. Or you can also use the old version and do the uncomment on your own. You don't have to run this via autostart. Just login via SSH and start with ./multi_switch.sh --nespi+

That would be great. Thank you

PS: If we powerdown GPIO4 do we loose power also to the front USB devices or does this just affect the fan? Sadly I don't have this case in my stock - so I can't test ;(

PPS: Yes the python script uses the multi_switch.sh to read out the events and so we can toogle actions and it's doing it's job in a good style. Furthermore you can ask --rc-pid and --es-pid on reset button action. If both are true you can close running emulator with --closeemu only and you'll be kicked back to ES mainscreen. The python script I made was just a proof on concept ;)

crcerror commented 6 years ago

SOLVED now! Please install shutdown_fan according in README.md instructions!