Asus Tinker Board S Powerbutton for shutdown

Hi,

since the Asus Tinker Board S features this nice power button, that reliably fires up the device, I would like to be able to shut it down the same way. Just a gentle press of the power button while running and have it gracefully shutdown and halted.

Wouldn’t that be a cool energy saving feature?
Just wondering.

BR
Uwe

Just as an addition: A long power button press shuts down the board immediately, like switching the power off. I expect the filesystem to crash by doing so.

That’s why I was wondering about graceful shutdowns.

As the Tinker Board is for tinkering, I tinkered the following:
It is really simple to add shutdown functionality to the Asus Tinker Board S, as it supports ACPI and is from the underlying OS prepared to shut it down via it’s dedicated power button!

In fact you can have a single push button to power it up and down, absolutely easily. It is way easier to achieve than on Raspberry or other platforms. It would be a snatch for Michelangelo to integrate it to the regular release.

And here is the secret recipe in three simple steps:
1) Get access to your volumio via SSH https://volumio.github.io/docs/User_Manual/SSH.html
2) On the shell issue the following command sudo apt install acpi-support-base to install basic ACPI function
3) Edit /etc/acpi/powerbtn-acpi-support.sh to

#!/bin/sh /sbin/shutdown -h -P now "Power button pressed"

And before you ask: The button has to go here (black circle)
pic_gpio.png

*) I did not have time to investigate step 3. I know it is not the nicest solution, but it works reliably and does not harm anything. Some script capable man may give an update for a more elegant solution.

1 Like