The backlight is turned off by a low signal on the backlight pin. When the Pi shuts down that pin is likely going to a floating state (not a low), thus the backlight goes back on.
Thank you. That is to say that there isn’t really a solution for this… unless one constructed a ‘standby saver’ unit, that cuts power completely if the draw is very small.
There is no easy solution. I have a switch wired up on a couple of my builds that have proto boards in the mix. In my case those Pi’s run 24/7 but I sometimes like to turn the displays off.
There is also a dtoverlay that can set a pin low on shutdown, and keep it low. I tinkered with it in the past but it had other side effects that I didn’t like. The main one being the Pi would no longer boot up when GPIO 3 was grounded. I had to unplug the power supply, and plug it back in to get that Pi to boot up.
This is really helpful @alphanumeric, thank you so much.
While the Pi is on (with this particular display), turning the display off while the Pi is on is not a problem:, as noted above - dimming is harder though.
When you say ‘no longer boot’, what do you mean? No longer boot by pulling up a pin? I will only have the Pi on for part of the day, and am thinking of having one of those micro-usb cables with a switch. So fully disconnecting power / reconnecting power would not be an issue for me.
Were there other unintended side effects?
Also, do you have the code for this? I had a quick look, but I couldn’t see any standard overlays that would pull a gpio low or high. Any hints greatly appreciated!
I have some headless setups that I shut down with a button press.
I use the following with my Fan Shim for example. dtoverlay=gpio-shutdown,gpio_pin=17,active_low=1,gpio_pull=up
If you shutdown and leave the power on, grounding GPIO 3 will boot the Pi back up.
On a stock fan shim the fan will just keep running on shutdown until you remove power. The fan control pin needs to be grounded. Thats where I had tried the overlay to keep the pin low on shutdown. It worked, the fan shut off, but I couldn’t boot back up with a button press. I had to unplug the power supply and plug it back in to get the Pi to boot up again.
Name: gpio-poweroff
Info: Drives a GPIO high or low on poweroff (including halt). Enabling this
overlay will prevent the ability to boot by driving GPIO3 low.
Load: dtoverlay=gpio-poweroff,<param>=<val>
Params: gpiopin GPIO for signalling (default 26)
active_low Set if the power control device requires a
high->low transition to trigger a power-down.
Note that this will require the support of a
custom dt-blob.bin to prevent a power-down
during the boot process, and that a reboot
will also cause the pin to go low.
input Set if the gpio pin should be configured as
an input.
export Set to export the configured pin to sysfs