Jump to content

Set a wake-up GPIO button


Recommended Posts



I am using Rock Pi 4B and want to be able to turn the system on after sleep (suspend/hibernate or any other state that would allow it). Previously, I have used MRAA library to set an interrupt, and called 

system("shutdown now")

inside interrupt code. I did it according to the following post and according to the MRAA examples. I wrote a shell script, which executes the MRAA program. Shell script, in its turn, is called by a service on a start-up. So, with this method I was able to shutdown the system, but I cannot get out of this state via button press. 


I researched few posts, such as: 12, and 3. It looks like either I have to modify the DTS file and generate new OS image, or perhaps there is a method to set the pin as a wake-up source inside the OS. 


While on Debian, when I go into directory:

cd /sys/kernel/irq/<PIN #>


There is a field called



When doing

 cat wakeup

it shows



Though I didn't find this folder in Armbian, but I suppose they may share similar settings for the pins. Can anyone please help me to achieve my goal? 


I came across another similar post, but unfortunately there was no solution there. 

Link to comment
Share on other sites

When discussing a problem make sure to provide full logs!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...