Hi,
so been trying to get a power button connected AND working on my Odroid C4.
followed the guide on the Odroid wiki for this (with the exception that i have a button without a led). odroid-n2:application_note:gpio:gpio_key_wakeup [ODROID Wiki]
So connected the power button to GPIO pins 9 and 11, added to the kernel parameters gpiopower=479
nothing happens when pushing the button: not powering down, and when power down not powering up.
Been reading (a lot) on what might be the cause of this and there is no decisive conclusion (at least for me),
Could this be DietPi related (not loading a required process / kernel module)?
any tips / advice / etc. are appreciated Thanks in advance,
Ruud.
on the odroid forum where I got the instructions from it became clear that the Odroid ‘stock’ kernel has support for this build in.
So I think that DietPi lacks this and we should go the route of a dtoverlay for this.
When installing WiringPi and doing a gpio readall I see that pressing the button toggles the pin value, so that works
Exactly, gpiopower seems to be no regular Linux command-line parameter. You can check dmesg which at some point shows something like:
[ 2.441314] Run /sbin/init as init process
[ 2.441330] with arguments:
[ 2.441338] /sbin/init
[ 2.441347] with environment:
[ 2.441355] HOME=/
[ 2.441364] TERM=linux
The parameters shown in the environment block are those which are not understood by the kernel itself. It then passes them to the init system.
There seem to be no device tree overlay included in our meson64 kernel. A generic method to communicate with GPIO in userland is libgpio. Can you check whether it works fine, detecting all pins correctly?