Starting up then immediately shutting down

What is the problem?

I installed the GPIO Shutdown plugin. After playing with the pin settings it uses to illuminate an LED and to initiate a shutdown, it now does a shutdown as soon as the pi starts up and loads OctoPrint. It must be looking at a pin that has some resistance(?) and immediately initiating the shutdown as soon as it boots up. So now I can't get in and change anything. About 15 seconds after I power on the pi, it shuts down. The power light stays on of course, but the network light stops and I can't access anything. I've tried to Putty into it but it is not on network.

How can I change the pin settings that the plugin is monitoring for initiating a shutdown? Or how can I start in safe mode so I can remove/edit the plugin?

What did you already try to solve it?

I created a Linux USB stick so I can boot my laptop into Ubuntu so I could try and edit files on the SD card (in my laptop). But I can't find what should be edited. Also, many of the files are locked and I don't know how to sudo into an SD card that I have plugged into my laptop (while running Ubuntu).

Have you tried running in safe mode?

I wish I could run in safe mode.

Additional information about your setup

OctoPi version=0.18.0, PI=Rasberry Pi 4 B (2GB)

If you can find the file config.yaml and add the id of the gpio shutdown plugin to the _disabled section that would prevent it from running. Otherwise, you'll have to use keyboard/monitor to try and login and stop the octorpint service prior to it getting fully initialized, which in 15 seconds might be difficult. You're almost better off just re-flashing from scratch.

    - GPIOShutdown

The blue word safe mode is a link, and it takes you to a guide on how to activate safe mode for the next boot. Might help to remove the plugin.

Thanks for the suggestions.

  • All the safe mode options require you to first be able to boot so you can get in and change something. So they won't work (expect for the config.yaml approach)
  • I have done a global search for the config.yaml file and can't find it on the SD card. Lot's of other config files found, but not the yaml file. Is this the type of file I can create and it will use it? If so, what directory should I put it in and what all contents should be in the file?

Thanks for the help. If I can't figure out the config.yaml approach then it looks like a re-flash will be in my future.

If you took the SD card out of the Pi, and put it in a Windows PC you won't be able to view the config.yaml file since it is not readable by default on windows. There is EXT partition reader software out there somewhere, or you can boot another Linux instance (could be the same Pi, put the problem SD card in using USB reader). Ah, now I see you had your laptop on Ubuntu. You might have to enable 'view hidden files', the path is /home/pi/.octoprint/config.yaml on the SD card.

This is actually an interesting problem, and one you probably won't be able to solve without really good timing for something you can't tell what it is doing. As suggested, the only way beyond changing config.yaml is to try and force it to 'incomplete boot' which would be something of a challenge to do.

Yep, that is what I figured. Thanks for your help. I can't find the config.yaml file. I'm going to re-flash.