Hi,
The behviour of:
gpio-shutdown
seems to have changed in the last few week.
It now brings up the shutdown dialog, wherease previously just issued a "shutdown now" or "poweroff" command, which is what I require.
I am running a racing yacht instrument system: the displays have no keyboard or mouse, and they are supposed to shut themselves down cleanly when external power is removed. The displays have an internal battery and a small amout of circuitry to handle this.
In config.txt I have:
# Shutdown when GPIO20 (Pin 38) goes HIGH
dtoverlay=gpio-shutdown,gpio_pin=20,active_low=0
which has been working fine for over 4 years.
It contunued to work with Pi 5s under Bookworm, until recently.
Both behavious (i.e. bringing up the shutdown dialog or immediately executing the shutdown) are useful, but there is no parameter I can find by which I can choose which behaviour I want.
I have searched this, and other, forums, for a solution. This question has turned up many times but the solutions I have found are mainly old/redundantant, refering to bits of the OS that no longer exist.
The file /etc/systemd/logind.conf appears to exist to control this behaviour; but either its contents are being ignored or it does not work.
HandlePowerKey= and HandlePowerKeyLongPress= seem to be the relevant parameterts: they can be one of "ignore", "poweroff", "reboot", "halt", "kexec", "suspend", "hibernate", "hybrid-sleep", "suspend-then-hibernate", "lock", and "factory-reset", but the only ones relevant to me are "poweroff" and "halt", which appear to be synonomous.
"poweroff" is of course a complete misnomer, since the one thing is DOES NOT DO is switch the power off. I use:
dtoverlay=gpio-poweroff
to control a power transistor to shut off the internal battery once shutdown is complete.
"halt" is more meaningful since "shutdown now" does indeed simply halt the Pi. However halt, like poweroff, now brings up the shutdown dialog.
I'm sure that what is wanted is ShutdownDialog and ShutdownNow, plus a more pricise description of what the options do; but for now, if anybody knows how to restore the previous behaviour I'd be very grateful.
Cheers
Peter
The behviour of:
gpio-shutdown
seems to have changed in the last few week.
It now brings up the shutdown dialog, wherease previously just issued a "shutdown now" or "poweroff" command, which is what I require.
I am running a racing yacht instrument system: the displays have no keyboard or mouse, and they are supposed to shut themselves down cleanly when external power is removed. The displays have an internal battery and a small amout of circuitry to handle this.
In config.txt I have:
# Shutdown when GPIO20 (Pin 38) goes HIGH
dtoverlay=gpio-shutdown,gpio_pin=20,active_low=0
which has been working fine for over 4 years.
It contunued to work with Pi 5s under Bookworm, until recently.
Both behavious (i.e. bringing up the shutdown dialog or immediately executing the shutdown) are useful, but there is no parameter I can find by which I can choose which behaviour I want.
I have searched this, and other, forums, for a solution. This question has turned up many times but the solutions I have found are mainly old/redundantant, refering to bits of the OS that no longer exist.
The file /etc/systemd/logind.conf appears to exist to control this behaviour; but either its contents are being ignored or it does not work.
HandlePowerKey= and HandlePowerKeyLongPress= seem to be the relevant parameterts: they can be one of "ignore", "poweroff", "reboot", "halt", "kexec", "suspend", "hibernate", "hybrid-sleep", "suspend-then-hibernate", "lock", and "factory-reset", but the only ones relevant to me are "poweroff" and "halt", which appear to be synonomous.
"poweroff" is of course a complete misnomer, since the one thing is DOES NOT DO is switch the power off. I use:
dtoverlay=gpio-poweroff
to control a power transistor to shut off the internal battery once shutdown is complete.
"halt" is more meaningful since "shutdown now" does indeed simply halt the Pi. However halt, like poweroff, now brings up the shutdown dialog.
I'm sure that what is wanted is ShutdownDialog and ShutdownNow, plus a more pricise description of what the options do; but for now, if anybody knows how to restore the previous behaviour I'd be very grateful.
Cheers
Peter
Statistics: Posted by Peter Cyriax — Mon Apr 29, 2024 10:53 am