Turn off the Adafruit Capacitive Touch PiTFT Plus Display (#2423) on power-off

Using a device tree overlay it is easy to turn off the Adafruit display backlight once the Pi goes into power-off state.

Simply add the following line to the end of /boot/config.txt

dtoverlay=gpio-poweroff,gpiopin=18,active_low=“y“

This will drive this particular pin #18 (which is responsible for the backlight on the Adafruit PiTFT display) low on shutdown, and will keep it high during operation.

This can also be used to signal to external power controllers / microcontrollers etc that cutting the power to the Pi is safe.

Change the number to the appropriate pin. Refer to the overlay documentation for more info.

Ref