Dtoverlay, gpio-shutdown and gpio-poweroff options not working?

Hey @rustyeddy. The values should indeed show in /mnt/boot/config.txt, as that’s the in-use config.txt file, the /boot/config.txt is a default one, that got shipped with the OS, and we are considering removing from the future, that it is also confusing. You should be concerned only with the former one, that does contain the values as you mention.

I’ve just tried this out, followin the readme:

Based on this one:

  • gpio-poweroff is a pin that at the end of the shutdown should have a certain voltage value
  • gpio-shutdown is a pin that can be used to initiate a shutdown.

I was playing with the pins a bit, but so far it seems working exactlu as expected. What I tried are these two:

dtoverlay=gpio-shutdown,gpio_pin=4,active_low=1

Touching the relevant pin shuts down the device (quickly). Once managed to catch the message:

Oct 14 11:10:35 010335c systemd-logind[708]: Power key pressed.

and thus that’s further signal that things work as expected

For the gpio-poweroff, reading that readme, it needs a custom dt-blob.bin for active_low to work, so I didn’t enable that, just

dtoverlay=gpio-poweroff,gpiopin=24

At the end of the shutdown, when the device is off, I did measure 3.3V (high) on the relevant pin as expected.

I’ve also tried other pins, and seem to be all working correctly.

Thus I suggest removing the active_low from gpio-poweroff if possible, and try it like that.
Also, in the dashboard, if you want to add multiple dtoverlay values, you can add them as comma-separated strings (similarly how RESIN_HOST_CONFIG_dtparam is by default for multiple values,), ie. setting a configuration variable RESIN_HOST_CONFIG_dtoverlay with value "gpio-poweroff,gpiopin=24","gpio-shutdown,gpio_pin=4,active_low=1" will result in

dtoverlay=gpio-poweroff,gpiopin=24
dtoverlay=gpio-shutdown,gpio_pin=4,active_low=1

at /mnt/boot/config.txt.

Hope this helps, and when you recheck it will work for you properly! Please let us know if you have any questions!