Fix OctoPrint Disconnecting & Keeps Printer On
In this article
OctoPrint randomly disconnecting while keeping your printer powered on is usually a USB communication or power issue, not a hardware failure. This guide walks you through the most common fixes—starting with the simplest cable and power checks, then moving to software settings and firmware tweaks. Before you start, make sure you have a USB cable, a computer or Raspberry Pi with OctoPrint installed, and access to the OctoPrint web interface.
What You'll Need
- USB cable (preferably a high-quality, shielded one)
- Computer or Raspberry Pi running OctoPrint
- Access to OctoPrint web interface (admin login)
- Optional: USB hub with external power, ferrite bead or choke
Step-by-Step
- Check the USB cable and connection. A loose or damaged USB cable is the #1 cause of disconnects. Unplug both ends, inspect for bent pins or frayed wires, then firmly reconnect. If possible, swap in a different cable—preferably one that's short (under 1 meter) and has a ferrite bead or shielding. Avoid long, thin, or unshielded cables.
- Eliminate USB power interference. Many printers (like Ender 3, CR-10) draw power from the USB port, which can cause voltage drops and disconnects. The fix: put a piece of electrical tape over the +5V pin on the USB connector (the one that goes into the printer). This stops the printer from back-powering the Pi or computer. Alternatively, use a USB isolator or a powered USB hub.
- Update OctoPrint and plugins. Outdated versions can have bugs. Go to the OctoPrint web interface, click the wrench icon (Settings), then "Software Update". Update OctoPrint and all plugins. Also check for firmware updates for your printer—check the manufacturer's website for the latest version.
- Adjust USB communication settings in OctoPrint. In OctoPrint, go to Settings → Serial Connection. Increase the "Connection timeout" to 10 seconds or more. Also, enable "Auto-connect to printer on server startup" and "Auto-detect baudrate" if not already. Set the baudrate to match your printer's firmware (usually 115200 or 250000). Save and restart OctoPrint.
- Change the USB cable's power management on your computer. If using a Windows PC, go to Device Manager, find the USB Root Hub, right-click → Properties → Power Management, and uncheck "Allow the computer to turn off this device to save power". On a Raspberry Pi, this isn't an issue, but ensure the Pi's power supply is adequate (5V/2.5A minimum).
- Disable the printer's sleep or power-saving features. Some printers (especially those with touchscreens) have a "sleep" or "idle" mode that can interrupt USB communication. Check your printer's settings menu and disable any auto-sleep or auto-off features.
- Add a ferrite bead or choke to the USB cable. This suppresses electromagnetic interference (EMI) from the printer's motors and power supply. Clip a ferrite bead near the printer end of the USB cable. This is a cheap and often effective fix.
- Use a powered USB hub. Connect the printer to a USB hub that has its own power supply, then connect the hub to your OctoPrint device. This isolates the power and can stabilize communication.
- Check the printer's firmware settings. Some firmware (like Marlin) has a setting called "EMI" or "USB" that can be tweaked. For Marlin, look for
#define USB_SERIAL_PAUSEor#define SERIAL_FLOAT—these are advanced, but you can try disabling them if you're comfortable editing firmware. If not, skip this step. - Try a different USB port. On the Pi or computer, use a different USB port, preferably one directly on the motherboard (not a front panel). On a Pi, avoid using a USB port that shares power with other peripherals.
Common Mistakes
- Using a cheap or damaged USB cable. Many disconnects are caused by cables that look fine but have internal breaks. Always test with a known-good cable.
- Not covering the +5V pin. If you skip this, your printer may still back-power the Pi, causing voltage drops and resets.
- Ignoring the baudrate. If the baudrate is wrong, OctoPrint may connect and then drop. Match it to your firmware's setting.
- Leaving power management enabled. Windows can put USB ports to sleep, which disconnects the printer.
- Forgetting to update plugins. A buggy plugin can cause disconnects. Update everything regularly.
Tips
- Use a Raspberry Pi with a good power supply. A Pi underpowered can cause USB issues. Use the official Pi power adapter.
- Keep the USB cable away from power wires. Route the cable away from the printer's power supply and motor wires to reduce interference.
- Monitor the OctoPrint terminal. When a disconnect happens, check the terminal tab for error messages like "SerialException" or "Connection lost". This can point to the cause.
- Consider a USB isolator. If nothing else works, a USB isolator (like the Adafruit one) can completely separate the electrical grounds, eliminating most interference.
Troubleshooting
If disconnects persist after trying all steps:
- Test with a different slicer or host. Try connecting with Pronterface or Repetier-Host. If it disconnects there too, it's a hardware/cable issue, not OctoPrint.
- Check the printer's power supply. A failing PSU can cause voltage fluctuations that affect the USB. Measure the voltage at the printer's mainboard with a multimeter (should be ~5V on the USB pin).
- Inspect the printer's mainboard. Look for bulging capacitors or burnt components on the board. If you see damage, replace the board.
- Try a different computer. If you're using a PC, try a Raspberry Pi or another PC to rule out the host.
- Check the USB port on the printer. Some printers have a mini-USB or micro-USB port that can wear out. Try a new cable and gently wiggle the connector to see if it's loose.
Frequently Asked Questions
Why does OctoPrint say "Connection lost" but the printer stays on?
This means the USB communication dropped, but the printer's power is still on. It's usually a cable, power, or interference issue, not a printer firmware crash.
Can I fix disconnects by changing the baudrate?
Yes, sometimes. If the baudrate is set too high or too low, the connection can be unstable. Try 115200 or 250000, which are common for Marlin-based printers.
Do I need a Raspberry Pi for OctoPrint?
No, you can run OctoPrint on a Windows/Mac/Linux computer, but a Pi is recommended for reliability and low power consumption.
Will a ferrite bead really help?
It can, especially if the disconnects are caused by electromagnetic interference from the printer's motors. It's a cheap fix worth trying.
Is it safe to cover the +5V pin on the USB cable?
Yes, it's safe. It only prevents the printer from sending power back to the host, which is a common cause of disconnects and even Pi resets.
Why does my printer disconnect when I start a print?
This is often caused by a power surge when the motors engage. A powered USB hub or a ferrite bead can help absorb that surge.