Networking stays active when 12.3-R "shut down" on RPI B+/2

After doing shutdown -p now or shutdown -h now, serial console says:

Code:
The operating system has halted.
Please press any key to reboot.

...but the device still responds to pings and TCP connect request via ethernet. If no serial console is attached to see the final message, it's impossible to know if it has safely shut down and power can be disconnected.

Seems odd that the kernel seems to be still running, I guess so it can detect a keypress and initiate a reboot - but why not just have a small section of dedicated code for this? Why would ethernet interrupts and TCP/IP packets still need to be handled?

Curious whether this is a Raspberry Pi thing, or it's more generic and happens with all systems that cannot be powered off by the OS. (Perhaps most tier 1 hardware supporting that may explain why there's no dedicated "shut everything down except serial and/or keyboard interrupts" code.)

I notice the power LED switches off during boot. Would be handy if this could stay on, and instead was switched off at the point FreeBSD prints the final halt message to the console?
 
Known issue. You can try raspberrypi-gpioshutdown.
I did see this earlier, but I didn't realise it was a kernel module. I presume you use an LED on a GPIO pin, and the kernel mod will switch it off as it unloads? Not sure this is much better than "initiate shutdown then wait 30 seconds" :)

I do note that when viewing boot with a serial console, the power LED goes off around the time that GPIO is (presumably) initialised, which is strange, since according to the RPI B+ schematics the power LED appears to be connected to a voltage supervisor IC, rather than being controlled by the CPU through a GPIO.

Code:
gpio0: <BCM2708/2835 GPIO controller> mem 0x7e200000-0x7e2000b3 irq 19,20 on simplebus0
gpiobus0: <OFW GPIO bus> on gpio0
 
On the RaspberryPi there are pre-compiled overlays in the sysutils/rpi-firmware port.
Perhaps there is an GPIOLED overlay ready to use.

Notice the different Pi board schemes for PowerLED or pwr_led
Interesting. There's more information here: https://github.com/raspberrypi/firmware/tree/master/boot/overlays

Seems gpio-poweroff is able to drive a GPIO pin at shutdown, but you need external hardware to actually cut the power.

I tried adding this to /boot/msdos/config.txt as an experiment, but the power and status LED behaviour doesn't change (status goes off shortly after power applied, pwr goes off as kernel is probing). Possible the Pi 1 B+ is too old for this.

Code:
dtparam=pwr_led_trigger=heartbeat
dtparam=act_led_trigger=mmc
 
Back
Top