English Forums > Hardware and Performance

[HOWTO] Graciously shutting down APU2D4 with a hardware button

(1/1)

Northguy:
Hi All,

APU Boards and housings do not come with a power button, so when the box becomes unresponsive, the only way to realize a reboot by yanking the power cable from the wall socket and reinsert it. So I decided to install a hardware button in the housing.

Researched topics:
* http://www.pcengines.info/forums/?page=post&id=9F0D3DB1-09F8-4E67-9271-9E29D0CA43B8&fid=DF5ACB70-99C4-4C61-AFA6-4C0E0DB05B2A
* https://doc.astlinux.org/userdoc:board_pcengines_apu2

Requirements:
2 jumpercables with sufficient wire length
1 momentary switch (push-to-make)
some heat shrink tube
7mm drill

Steps:

* Solder the momentary switch to the jumper cables and insulate the contact points

* Install the momentary switch in one of the holes that are reserved for a WiFi antenna. I had to enlarge the hole with a 7mm drill, because the hole is not round. It has a flat side at the bottom.
* Connect the jumper cables to the proper pin header (J2). Make sure you use the 2nd and 3rd pin of the row of pins.
The power button works with a short press and shuts down the system. Long button press is a hard stop. Pressing the button again powers the device again. Mission accomplished.






--- Code: ---login: >>> Invoking stop script 'beep'
>>> Invoking stop script 'freebsd'
Stopping redis.
Waiting for PIDS: 33751.
Stopping php_fpm.
Waiting for PIDS: 617.
Stopping maltrailserver.
Stopping maltrailsensor.
Waiting for PIDS: 78101.
ntopng not running?
Stopping nginx.
Waiting for PIDS: 90908.
Stopping flowd_aggregate...done
Stopping flowd.
Waiting for PIDS: 50464 72791.
>>> Invoking stop script 'backup'
>>> Invoking backup script 'captiveportal'
>>> Invoking backup script 'dhcpleases'
>>> Invoking backup script 'duid'
>>> Invoking backup script 'netflow'
Stopping flowd_aggregate...done
flowd_aggregate already running?  (pid=70631).
>>> Error in backup script 'netflow'
>>> Invoking backup script 'rrd'
>>> Invoking stop script 'config'
ovpns2: link state changed to DOWN
Waiting (max 60 seconds) for system process `vnlru' to stop... done
Waiting (max 60 seconds) for system process `bufdaemon' to stop... done
Waiting (max 60 seconds) for system process `syncer' to stop...
Syncing disks, vnodes remaining... 7 3 0 done
All buffers synced.
Uptime: 3m15s
uhub2: detached
acpi0: Powering system off

--- End code ---

nhtrung:
i have been an APU2D4 and it was a trouble. It is not work and i don't know how to fix it. Can you help me?

Northguy:
Should work in a breeze when following info provided. Don't know what goes wrong?

Patrick M. Hausen:
Works great for my apu4d4 - thanks!

vollans:
Big thanks from me, as well. Works brilliantly, just need to find some push buttons that fit the holes better now.

Navigation

[0] Message Index

Go to full version