g8gkq
Posts: 15
Joined: Thu Mar 30, 2017 10:25 am
Location: Southampton

Solved: Stretch Lite Reboot freezes at "Reached Target Shutdown"

Sun Aug 12, 2018 9:44 pm

I have been maintaining and developing a touchscreen system on an RPi 3B using Jessie Lite and, more recently, Stretch Lite that controls and encodes video for a Digital TV Transmitter. Full code here: https://github.com/davecrump/portsdown

I have touchscreen controlled functions for reboot and shutdown which simply terminate the running C code nicely and then issue the system command "sudo reboot now" or "sudo shutdown now" as appropriate. These work perfectly in the Jessie Lite version, but not in the Stretch lite version.

When I try to reboot or shutdown in Stretch Lite (2018-03-13 or 2018-06-27) the reboot or shutdown nearly always hangs at "Reached target shutdown". I can reduce the occurrence of this down to 1 in 5 by issuing the command "sudo swapoff -a" before attempting to shutdown, but this is not a totally effective cure. The likelihood of occurrence appears to be related to what the RPi has had to run since boot-up.

I realise that the next step is to turn on the systemd debug shell, (as discussed in this similar unsolved post viewtopic.php?p=1171303) but before I go on, I wondered if anyone had seen and solved this issue before.

It never happens with Jessie Lite, only with Stretch Lite; the install on both systems has only very minor differences. When it hangs, the RPi's power consumption increases as though it is working very hard. For this testing, I have no peripherals connected, only network for SSH and a PAL monitor.

Thanks, Dave
Last edited by g8gkq on Wed Aug 15, 2018 8:52 pm, edited 1 time in total.

g8gkq
Posts: 15
Joined: Thu Mar 30, 2017 10:25 am
Location: Southampton

Re: Stretch Lite Reboot freezes at "Reached Target Shutdown"

Mon Aug 13, 2018 4:21 pm

I have now enabled the systemd journal and am looking at the logs in /var/log/journal. The most relevant journal seems to be this one https://pastebin.com/vWzbpnHz, but I can't see anything wrong with it. This is for a failed reboot.

Dave

g8gkq
Posts: 15
Joined: Thu Mar 30, 2017 10:25 am
Location: Southampton

Re: Stretch Lite Reboot freezes at "Reached Target Shutdown"

Wed Aug 15, 2018 8:51 pm

Thanks to the fact that no-one else seemed to have seen this problem, I realised that something in my build was causing the issue.

The problem was that I was loading a custom dt-blob.bin at boot and the file that I was loading had last been compiled from an old dt-blob.dts using a dtc compiler 2 years ago. I loaded the latest dt-blob.dts from https://github.com/raspberrypi/firmware ... t-blob.dts, made the modification that I required (setting PLLD to 2 GHz with a divider of 2) and compiled it on Stretch with the latest version of dtc. I used the instructions here: https://www.raspberrypi.org/documentati ... ce-tree.md.

SOLVED!

Dave

Return to “Troubleshooting”

Who is online

Users browsing this forum: No registered users and 39 guests