@cmscss Yes... the multi_switch.sh script always provides safe shutdowns.
Deepsleep happens if after shutdown the red LED still glows. So you need a power device that cuts power after shutdown. But no script can change the behaviour without the hardware parts.
But deep sleep is a very cheap alternative to those power devices. You may try it out ;) Just connect any switch to GPIO3 and ground (it's pin 5 and 6 on the Pie header) only this GPIO enables a repowering after shutdown ;)
@Lurker thank you for this detail, also super helpful for me. I am considering doing the same thing but using this switch (Pilot Automotive PL-SW26 Performance Toggle Switch with Red Safety Cover https://www.amazon.com/dp/B000GTMUUI/ref=cm_sw_r_cp_api_i_6uZQDbMXHJDGD). I don’t have any electrical experience - can I ask you what the difference would be here given this only has 2 connectors vs the 3 in the other switch?
It is important to note that the switch and the optional status LED need to be connected to the 2x2 pins header in any case. The signal break outs S1 and S2 are not meant for the switch and the LED, but rather for the communication between the PowerBlock and The RPi. Here is a summary for the connection between the break outs and the RPi:
S1: pin 12
S2: pin 11
5V OUT +: pin 2 or pin 4
5V OUT -: pin 6 or pin 9
@caver01 That's true, I am also investigating udev and xrender as I was told by a friend that a rule could probably be defined to handle that behavior. Indeed, since the portable screen will be connected internally (inside the box) to the raspberry pi, we can know for certain which HDMI port is associated to the screen and therefore differentiate it from the other one which would be assumed to be an external screen.
EDIT: Actually, I realize now that contrary to USB ports, HDMI splitters only duplicate the input display to two outputs in an identical way, so I am no longer sure udev understands it is communicating with two different displays.
@caver01@rbaker I am also investigating using a USB Power Bank as a UPS (which I read from over at http://raspi-ups.appspot.com/en/index.jsp). Some models have smart charge features and are able to serve while charging and feature two USB ports (which is useful to provide power to both the Raspberry Pi and the portable screen).
is pretty cheap (~20 bucks),
has a 16.75A capactity,
provides 5V outputs,
provides 3A max on each of its 2 ports,
I am guessing this could be used as a UPS.
Just as a side note I have seen several interesting projects providing UPS boards for the Raspberry Pi. But they seem focused on powering it through the GPIO (as far as I understand) and therefore do not seem very appropriate to me if I want to power a portable screen as well.
Another side note to say that I don't have any stakes at Amazon (and my links aren't sponsored), it just seems convenient to provide examples :)
EDIT: changed the example provided for a more suitable USB Power Bank
@domodan is there anyother way that you found to identify a "bad" board other than just trying it?
like I think the WiFi on one of mine is bad but only because it shows no networks available when I look but my other one with the same cards shows them just fine. That means I'm stuck hanging out next to the router to do any work to this one. lol
You need to reverse that. Most fans are going to need 5v to run. You can also use the 3.3v pin (pin escapes me right now), to run fans quieter, but those are the pins to run fans on for the pi. Also recommended are heatsinks for all of the sensitive chips (including the one on the bottom of the board). Use pins 2 and 9 for the power switch but not recommended for corrupting the sd card. I got one of the push button switches that connect to the micro usb port in between the pi and the power supply. It will also clean up your power feed.