Connecting causes printer to reboot

Ender 3 with MKS Gen L 1.0, TH3D 2.14 firmware, most recent Octopi on RPi3B+.

This issue I have always seen, so I am not sure if it is expected and I just need to work around or if it is something that can be dealt with.

I normally turn on the printer and Pi, Octoprint starts up and enables a relay with applies 24v to printer. Printer boots up and all is good.

I then open a browser on my PC, go to the Octoprint URL, initial screen shows that I am not connected. I click connect and the printer reboots again. Have tried checking connect automatically but it doesn't stay or stick.

The problem comes, as I did this morning, with a print in progress, go to Optoprint on my smart phone browser, (Using TouchUI), and I need to connect which I do and it rebooted the printer, bombing my print.

If this is normal then fine, I will work around it. I am thinking it is not as there are time when I have a print going on on my PC go to Octoprint and it does auto connect and shows me the print in progress.

Thanks for any hints or help!!


This is not an issue with OctoPrint, more with the printer hardware. When some boards get a USB connection, the USB chip generates a hardware reset. It's the same with the Prusa printers.

Whatever is enabling that relay needs to run when you press a custom Control button, for example, not "everytime OctoPrint starts".

I understand that on the initial boot up of the Octopi RPi 3b+ and that it does.

I am talking about after that when I just click connect when in Octoprint. It does the same server reboot but I would expect it to simply connect to the printer or auto connect as the case may be and display the current activity of the printer.

Again, if this is what other people experience then I will call it "normal" and just remember that.


Most printer boards are based on the Arduino mega 2560. This includes a reset when a USB connection is established. Not just when the plugs are inserted, also when connection is established by software: Arduino Mega 2560 schematics.

Hi Jeff -
Two issues here. One is that I think the autoconnect on startup is slightly broken as it doesn't seem to work when serial port is set to auto for some people (including me). Try setting the serial port and baudrate to their appropriate values for your setup, check-off save and auto-connect and hit connect. This has solved the problem with autoconnect for me.
Also, you can try disabling the reset action on connect by running stty -F /dev/ttyACM0 -hupcl or stty -F /dev/ttyUSB0 -hupcl depending on what port you use. See this FAQ for more detail.

1 Like

Thanks so much!!



I also had the issue with my Anet A8 and id drove me crazy. After trying everything from updating the firmware, over editing the settings in Octoprint to detaching the 5V cable from the USB cord, the only solution that works is putting a 10 ΞΌF resistor between the RESET and the GND pin.

After that no issues at all regarding restarts after establishing or interupting the connection to Octoprint.

I hope, this helps everyone with the same problem!

Best regards from Germany