AMI-system / ami_setup

AMI configuration files
MIT License
1 stars 2 forks source link

Stop Raspberry Pi from hanging on shutdown #34

Open JonasBchrt opened 1 month ago

JonasBchrt commented 1 month ago

It seems like the Raspberry Pi can occasionally hang on shutdown and won't ever leave this state without a power cut.

Hardware: AgZero+ 2024 (non-Rototherm) Software: agzero_wittypi Time of problem: Aug 30 12:10:15 All batteries (big & small) & timer relay fine when checked on Sep 10. Logs: https://cehacuk-my.sharepoint.com/:f:/g/personal/jonbeu_ceh_ac_uk/EjhxFYnt9IlDvYqiZMyvV6ABpwUrl3ZY_gUAd6NbC7pN0g?e=zmtqJT

No problem immediately visible in the logs. The Witty Pi process seems to have had some hick-up when terminating during the shutdown procedure: Aug 30 12:10:15 raspberrypi wittypi[6961]: /etc/init.d/wittypi: line 25: kill: (448) - No such process, but it is not clear to me whether this is related to the issue or not.

Maybe there is something that can be done in the shutdown.sh script to force a hard shutdown if something goes wrong during the "normal" shutdown command?

JonasBchrt commented 1 month ago

May be caused by something in the shutdown.sh script not running smoothly? https://github.com/AMI-system/ami_setup/blob/agzero_wittypi/wittypi/beforeShutdown.sh#L14 Do we need all the lines there?