Toggle Power Button w/ Lakka?

First, sorry if this is not the correct place to post this.

I recently got Lakka on my ODROID XU4, and I love it so much. After struggling for months with other Linux solutions with screen tearing, framerate issues and freezing, Lakka is a breath of fresh air. It just works!

Anyways, I want to finalize my setup by installing my XU4 into an enclosure where I will not have access to the power button. Questions:

  • Which pins would I need to use? Is there a diagram?

  • The XU4’s stock power button is a momentary switch, but would it be possible to use a toggle/maintained switch?

  • If it is possible to use a toggle/maintained switch, could I set it up to turn the device on AND shut it down?

Thanks so much, guys.

Would really like some feedback. Hopefully someone can help. Thanks guys.

Hi !

Same question here…

My only experience in controlling GPIOs was on a raspberry pi with raspbian. With some python scripts, it was pretty easy to read/write on the pi gpios. But here, we’re on an openelec os + odroid xu4…

The true question is : can we access to the XU4 GPIOs ? And if it’s the case, what kind of script can be used ? (bash, python ?)

Thanks guys :wink:

you can check the link here, maybe it will help you

https://www.igorkromin.net/index.php/2016/06/14/adding-an-external-power-button-to-the-odroidxu4/

++ S

Thanks but is not the same case here. In your example, the OS seems to be debian-based, so I assume that a script is constantly running and check the “power” GPIO.

In our case, the os is openelec and I don’t think that a script is running in background. The problem is still the same : access to the GPIOs state through scripting under openelec…

Any ideas ?

UPDATE : Just tested : the embedded power button of the XU4 is working ! Short press will shutdown -almost- instantly the system (not sure if it shutdown properly…), and long press will boot up the system :slight_smile: