Recover from stuck in reboot loop
Clone this wiki locally
This material has been superseded. Visit learn.bela.io for the maintained version.
In case your board is set to run a program on startup and this program is too CPU intensive, you may struggle to get back control of the board. Here are some ways you can do it, assuming your board is in the standard configuration. The basic principle is: press the button on the Bela cape to kill the currently running program. This will temporarily free up some resources, however the project will restart immediately once killed. Holding the button down is not an option, as that will trigger a shutdown of the board if you hold it for more than 2 seconds.
- bash The Button very often. If you are quick enough,
systemctlwill realize that the
bela_startupservice is quitting too quickly and will temporarily disable it (this will NOT work on images before v0.3). This is not guaranteed to succeed (especially if the process does lots of preparation before calling
render(), e.g.: loading many files from disk).
If this fails, go for the following:
- if you have a terminal emulator at hand, run the line
ssh -o StrictHostKeyChecking=no -o ConnectTimeout=1200 email@example.com make -C Bela stop
- otherwise try to load the IDE page in a browser
If the board is actually very busy, none of the above will succeed immediately, but at least you got them started. The game now is to get back CPU time in small chunks, which eventually will be enough for us to
ssh to the board or access the IDE:
Press The Button often, as often as you can (but DON'T hold press it). The Bela program will restart immediately as you press the button, but this will give some breath to the rest of the operating system, so that you may be able to finally load the IDE or manage to
ssh into the board. If the window trying to open the IDE times out, you will have to reload it again.
ssh'ed on the board, run
make -C /root/Bela stop nostartup to disable the program running at startup.
If you are on the IDE, press the stop button (again, this may take some time to be effective). Then go to the settings tab and disable the program that runs at startup.