Power OFF/ Shutdown Button via GPIO Pin?
Started by jhschnauzer




2 posts in this topic
jhschnauzer

3 posts 2 threads Joined: Feb 2023
14-02-23, 17:31 -
#1
Hello -

I have SamplerBox up and running on RPi4B/8Gb with Blokas Pisound audio cape. It works perfectly.

I searched the forum for "shutdown" and "pisound"... have not found answer to these questions:

(Note: I have always understood that it's bad practice to simple unplug a linux OS... rather it's better to run:  shutdown -P now )


  1. Is that true for this version of SamplerBox (e.g., I believe that Joseph Ernest's site's version of Debian OS booted read only... to minimize file system corruption if power was unplugged.) should not simply be unplugged?
  2. If I'm running the system "headless"... is there a recommended procedure for shutdown?
  3. If we need to run "shutdown" command... the Pisound board has a single button (GPIO 17)... any objections to monitoring that with interrupt to call "shutdown"on 5-second long press?
This post was last modified: 14-02-23, 17:33 by jhschnauzer. Edit Reason: incomplete sentence
bbishop

33 posts 7 threads Joined: May 2021
25-02-23, 20:56 -
#2
Because Hans has setup samplerbox to boot as Read Only it should be safe to power down just by unplugging (at least, that's what I always do), the only time you need to worry about proper shutdown is if you've entered R/W mode for like, editing the config file or what have you.
Guest

 
26-02-23, 04:09 -
#3
(14-02-23, 17:31)jhschnauzer Wrote: Hello -

I have SamplerBox up and running on RPi4B/8Gb with Blokas Pisound audio cape. It works perfectly.

I searched the forum for "shutdown" and "pisound"... have not found answer to these questions:

(Note: I have always understood that it's bad practice to simple unplug a linux OS... rather it's better to run:  shutdown -P now )


  1. Is that true for this version of SamplerBox (e.g., I believe that Joseph Ernest's site's version of Debian OS booted read only... to minimize file system corruption if power was unplugged.) should not simply be unplugged?
  2. If I'm running the system "headless"... is there a recommended procedure for shutdown?
  3. If we need to run "shutdown" command... the Pisound board has a single button (GPIO 17)... any objections to monitoring that with interrupt to call "shutdown"on 5-second long press?

Hello, You can always use a power adaptor with switch button in the cord. Thats the one i use. Cheers.