New image Shutdown Period

Hi, A friend and I have developed a solution for power loss to the
Raspberry Pi 3 and 3B+ using small, cheap supercapacitors
instead of batteries which need periodic replacement.

However, the new Rachel-Pi images take too long to shut down.
They add a shutdown period in some script somewhere. Perhaps in crontab or other place.

This shutdown period exceeds the ability of the supercaps to
provide enough power to the RPi. They have been able to hold
it for the 20 seconds needed for the old images. But this is no
longer the case as the shutdown period now seems to exceed a minute or longer.

Question: can the shutoff script be disabled or modified for us?

Hi @chuckroast.

The reason there’s a long shutdown time is that Kolibri has a stop job that takes anywhere from 30 seconds to over 1 minute depending on the device until the facility is set up. There’s a note about it in the readme file PDF that says you should set up your facility before doing anything else to avoid this. The shutdown command that the RACHEL-Pi uses (‘shutdown now’) is issued instantly once the shutdown button is clicked. Hope that helps.


My co-conspirator says he tried setting up the “facility” on the device first, but it “didn’t work”. We gotta avoid the delay or we
can’t use Kolibri. What does the “stop job” do, anyway?

I don’t know what the stop job does as Kolibri is maintained by Learning Equality. All I know is that in testing it shows up until you go through the process of setting up your Kolibri facility. Once you’ve completed the setup the next time you boot and shutdown it will not have the stop job. If you want to try it without Kolibri then “sudo systemctl stop kolibri” “sudo systemctl disable kolibri” should disable it and you can see how long the shutdown takes.


Yes, that’s kinda what we have done:
We wait until we get a shutdown on one of the RPi
pins and then…[“sudo”, “/bin/systemctl”, “stop”, “kolibri.service”])

Perhaps you’ll have a chance to talk to Learning Equality. I would hate to blow up any of their file updates.

Stopping Kolibri through systemctl is always very slow so I wouldn’t do it in your python script. I only suggested it to be done first before disabling Kolibri to test the shutdown time without Kolibri at all.

How long is it taking to shut down for you after fully setting up the facility? I just tested again and the first boot after fully setting it up the shutdown time is normal.


Our RACHEL Pi custom designed servers described by my friend above are used in remote village schools in Uganda which are mostly powered by 12 volt solar panels; power shutdowns and voltage brownouts can occur randomly. The inexpensive supercaps we use in our design are able to hold power for up to 30 seconds until the Pi completes its shutdown sequence.

The 90 second power shutdown delay that has shown up in the latest images of RACHEL with Kolibri now creates a real problem for future deployments. Our Python script uses a “os.system(sudo shutdown -h now)” command line to shut down the Pi after detecting the push button off signal on a GPIO pin. Before installing Kolibri shutdown always occurred immediately. Shutdown also occurs immediately now when we add the “sudo systemctl stop kolibri” and “sudo systemctl disable kolibri” terminal commands you suggested trying.

After we installed Kolibri we set up the facility first and then imported several Gbs of Khan Academy lessons. Everything runs fine and we are assuming that we set up the facility correctly. However, one or both of the following two messages always comes up and persists for 1 min. 30 secs before shutdown: “A stop job is running for session C1 of LSB Kolibri daemon” or a “A stop job is running for session C1 of user pi”. This continues to show up even after many successive boots and shutdowns. Unfortunately this does not seem to match what you are seeing on your end!

The “systemctl stop kolibri” command line that we have added to our Python script before the “sudo shutdown -h now” line adds about 20 seconds to the power down process. It’s a hack, but we don’t seem to have a better alternative yet. Any suggestions will be appreciated!

I am looking into the issue further and have opened a post at the Learning Equality forums about it. You have to understand that Kolibri is only installed on top of RACHEL-Pi and is not maintained by me. The fix has to be either a hack fix here, or a fix in an updated version of Kolibri which is out ot my control. I am looking into what that stop job actually is to see if it can be removed. I’ll let you know when I have an update.