Installing Klipper on Prusa i3 mk3

Fra Bitraf
Revisjon per 24. sep. 2026 kl. 12:15 av Royk (diskusjon | bidrag) (Installation)
Hopp til navigering Hopp til søk

Installation of the π and printer

Introduction

The Prusa i3 mk3 series originally runs Prusa's own firmware, which is based on Marlin. Marlin works well, but it's a small and by today's standards, old microcontroller in the mk3 (and earlier) are Atmega controllers. In the mk3(s), it's an ATmega2560, the same chip used in the Arduino Mega 2560. Asking such a small thing to do all the heavy lifting, is unfair!

Klipper architecture

Where Marlin is a monolithic build, Klipper is built on a two-level model where the tiny microcontroller in the printer is used for the realtime jobs, but only those. Then another, much larger and several hundred (or thousand) times more power than the tiny microcontroller. We're obviously talking about a Raspberry pi or similar SBC. In this article, I'll focus on the π. According to my and others testing, one should see a performance gain of about 50-100% with such an upgrade.

Installation

The installation is rather straight forward:

  • Our current solution uses a Raspberry Pi Zero W with Octoprint, chosen since it fits neatly behind a cover on the Prusa RAMBo controller. This has a single core clocked at 700MHz and 512MB RAM. This is probably just enough, but may be a bit low if you want to do some video streaming on top of the printing. We chose to switch to a Raspberry Pi Zero 2 W after a a member came by with some. It's way faster CPU-wise, but still only has 512MB RAM. Low, but it'll probably do.
  • Grab an SD card of 16GB or more (64 is nice) and install MainsailOS. It's readily available in the Raspberry Pi Imager. Choose the Raspbery pi you're using from the menus, choose "Other specific-purpose OS", "3D printing" and then "Mainsail OS". Choose the card, accept, fill out everything, accept, blabla, you're done.
  • Start the π from the SD card and login. If you have chosen a temporary hostname (like klippertest42), you'll need to reset cloud-init. If you're on a pi zero, you really, really should reduce the amount of memory reserved for the GPU, since it's a lot.
  • To change the hostname:
    • sudo hostnamectl set-hostname newname
    • sudo sed -i 's/oldname/newname/g' /etc/hosts
    • sudo cloud-init clean
  • Open /boot/firmware/config.txt in some editor and look for [pi0]. Under that, you should find gpu_mem=128. Since a π zero 2 W only has 512MB RAM, giving it 128MB for a GPU that'll be sleeping happily, isn't a good idea and will effectively crash the system during an automatic update (beleive me on that!). So change this to 32 and give it a reboot to regain that memory. If you're curious, type 'free -h' before and after rebooting to see the status.
  • IMPORTANT: Run a full upgrade of everything. This needs to be allowed to run uninterrupted before you continue!
    • sudo apt-get -y update
    • sudo apt-get -y dist-upgrade
    • sudo apt-get autoremove
    • sudo reboot

PS

This HOWTO was written before I ran into issues with using the π 2 zero w for this. It didn't really work at all, except for perhaps an hour or two. After a few reboots, it crashed, lost its network and never regained it. This is probably because of a power issue, memory card getting corrupted etc. I haven't concluded on this yet, more testing is needed, but I'll know, eventually

roy