@meleu said in Powering off via UI while using a Mausberry Circuit:
Do all the steps I showed on that topic and try to reboot your system. Describe here what happens.
And then perform this command: sudo systemctl disable killes; sudo systemctl stop killes and reboot your system. Describe here what happens.
SO, for starters, I have already done what you prescribed in the other thread to build the service and the killes.sh. Mine is till in the ~/bin folder, which is fine by me for now. After setting the killes.sh as executable, it works great! That is to say, I can do a software shutdown from command line for instance, and it definitely saves my metadata. Favorites and custom collections are awesome. Moreover, my additional line which triggers the NPN transistor does indeed let the Mausberry circuit know that a shutdown is imminent and it properly notices the drop on the GPIO it is monitoring and it cuts power. I really like this clever solution.
It also cuts power when I initiate a reboot. That makes sense to me, and for now I am willing to live with it. The point is that software shutdown requests properly exit ES and no longer lock up my Mausberry circuit.
Seems to me, the improvement to this would be to set a conditional statement before my GPIO command to trigger the transistor such that it checks to see if this is a shutdown/poweroff or if this is a reboot. I just don't know what to check to verify one way or the other--yet.
As for your command above, I initiated the command as you suggested and the system immediately did a shutdown, mausberry circuit powered off.