HomSpace Forum
Power OFF/ Shutdown Button via GPIO Pin? - Printable Version

+- HomSpace Forum (https://homspace.nl/forum)
+-- Forum: SamplerBox (https://homspace.nl/forum/forum-1.html)
+--- Forum: Community (https://homspace.nl/forum/forum-2.html)
+--- Thread: Power OFF/ Shutdown Button via GPIO Pin? (/thread-130.html)



Power OFF/ Shutdown Button via GPIO Pin? - jhschnauzer - 14-02-23

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?



RE: Power OFF/ Shutdown Button via GPIO Pin? - bbishop - 25-02-23

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.


RE: Power OFF/ Shutdown Button via GPIO Pin? - Guest - 26-02-23

(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.