Posts: 107
Joined: Tue Apr 29, 2014 6:18 pm

How to debug slow shutdown on Stretch

Fri Feb 15, 2019 5:48 pm

I have hardware that monitors a GPIO defined in a dt-overlay that to determine that the rpi has completed shutdown. When the signal goes active, the five volt supply powering the rpi is turned off.

I initiate a shutdown using:

Code: Select all

 sudo shutdown -hP now
Sometimes the shutdown occurs in just a few seconds, but sometimes it takes many seconds--probably 30 seconds or more.

I can verify the pi has not really shutdown, not only by a LED be driving by a separate power management processor, but also by pinging it. When the pi is slow to shutdown, I can verify it is still up by pinging it (it is wifi connected to a router).

I can repeat the shutdown experiment and about 2/3 of the time, the shutdown is immediate, but in about a third of the cases, the shutdown time is long.

How to I debug what is causing the slow shutdown?

Return to “Raspbian”