Slow Boot and Shutdown On Raspberry Pi3
Hi, i decide to try repetier server as octoprint replacement because i think the touch interface is better, i download the raspberry image v14, install the touchscreen drivers and everithing work great but the start and the shutdown is slow about 1 minute to boot and minute an a half to shut down, i tried diferents sd cards, updating the kernel etc and nothing works
is there a way to improve the boot and shutdown times???
Hardware:
Raspberry Pi3 B
Waveshare 5inch Touchscreen
Comments
Starting basic linux is for me 14 seconds, the rest ist login and start mentioned GUI.
What I wonder is that shutdown takes so long. Normally that is quite fast. Can you see which part is acting slow?
Server can take a bit longer when it is busy processing new uploads, otherwise it will stop quite fast.
Regarding your bluetooth message - do you use bluetooth for anything like a printer? Then that might also be a reason. Failed starts often means also waiting for start.
a minute to boot when is connected via wifi and 35 seconds when is connected via ethernet
shutdown is the same in both cases around a minute and a half
Have you also timed rebooting? Is it also that slow? For me it was quite fast. After display is off it is hard to see if it is still shutting down or if blinking is more hardware related and system is already down.
after reboot
sudo systemctl poweroff --no-block
should give you the fastest possible shutdown. Normally a daemon gets 90 seconds to shutdown before it is forced to do so. Can't say which one in your case is taking so long. You can try to stop them manually to see if one is slow, also some might make system unusable if you do.sudo service RepetierServer stop
for example stops repetier-server. Takes 2-5 seconds for me normally. It can take longer if it is computing something, but when idle it should be fast.As I noted previously, start up was slow but okay, but shut down took a couple minutes...
Two days ago I logged on the PI and downloaded the 0.91.2 ARMHF version and installed it. So whatever that did during the install fixed the slow shut down. Takes about 15 seconds max at shut down on the Pi 3 and it's off and done. Startup is also faster by a small percentage.
Stopped Target NFS Client Services
And we sit there for a minute and a half and then it continues to shut down. Tried the old work around by downloading directly and installing, that didn't fix it this time.
Any suggestions?
Can you test times for starting/stopping server only?
sudo service RepetierServer stop
sudo service RepetierServer start
That would be the same as during startup/shutdown just only measuring time server requires.
Took 4 seconds for the server to start (and connection reestablished).
Anyhow I have found this:
https://medium.com/@sbyang/slow-shut-down-of-ubuntu-18-04-e5fcc31255e2
It looks like default timeout at shutdown for a service is 90 seconds and you can configure linux easily to reduce that e.g. to 4 seconds. Would at least give you fast shutdowns killing the blocking service Maybe this even gives a log entry so you know which service is slow, but I guess the log service gets killed as well early which is why we do not see the log for shutdown.
For a record of it here..ssh into the Pi:
Change the DefaultTimeoutStopSec line to 4 or 5 seconds.
Save the changes and reboot...changes will take place after that.