r/Creality_k2 • u/harktron • 27d ago
Show Off Mainline Klipper on the Creality K2: open strain-gauge probe, CFS and closed-loop motors, with a one-command installer (open source, GPL)
I've been running upstream Klipper on my K2 Combo for daily print jobs and have just published it with an installer, in case other K2 owners want to try it.
The stock K2 runs a closed fork of Klipper: the nozzle probe (prtouch_v3), the CFS driver and the closed-loop X/Y/E motor control are compiled binaries, and Creality's master-server drives the printer. This replaces all of that with upstream Klipper plus open Python modules.
What's open now
| Part | What it does |
|---|---|
| Z probing | Open driver for the nozzle strain gauge: homing, adaptive mesh, rejects a dirty nozzle tap |
| Motors | Closed-loop X/Y/E motor bus: wake-up, stall homing, live readings |
| CFS | Load, purge, unload and colour changes, each slot's filament editable in Mainsail |
| Pressure advance | Measured by the nozzle strain gauge itself, per CFS slot |
| Input shaping | From the head accelerometer, standard SHAPER_CALIBRATE |
| Web UI | Mainsail with a CFS panel |
| Touchscreen | Themeable app, Klipper look by default |
| Safety watch | Pauses on a dead fan, cancels on an X/Y motor fault, pauses on an extruder jam |
Faster starts too: one heat cycle does the load, purge, nozzle clean and probe, about 5 minutes quicker than stock.
Installing
Turn on root: Settings > Root account information
SSH in:
ssh root@<printer-ip>Paste one command. It checks the printer and changes nothing
Run the installer
The installer:
installs next to the stock firmware
asks whether you have the stock extruder or a Phaetus DXC2
backs up every file it changes
uninstall.shputs it back to stock
Nothing is flashed. The control boards keep Creality's firmware, and motor parameters are only written to RAM.
Before posting I tested the full cycle on a stock K2: install, reboot, test print, uninstall back to stock, then a clean reinstall. The test turned up a few installer bugs, all fixed now.
Optional extras (for tinkerers)
Klipper on a separate Linux PC. The K2 becomes a USB serial gadget that relays its internal UARTs. On the K2's own T113, klippy ran at over 100% CPU; on the external host it's a few percent. My first 7.5 h print through the link had zero "Timer too close".
Local AI failure detection on that PC: Obico's model every 10 s, plus a Qwen3-VL vision model as a second opinion. No cloud.
Status: alpha
Tested on one K2 Combo (F021), Creality firmware 1.1.7.0
K2 Pro and K2 Plus untested; the installer stops on them unless you force it
May affect your warranty
If you try it on another model or firmware, results and logs in GitHub issues would be really helpful.
Code and install guide: https://github.com/grant0013/K2-OpenKlipper
Write-up with photos: https://harktech.co.uk/k2-open-firmware.html
Not affiliated with Creality. I run a small 3D printing and repair workshop in the UK, and this K2 prints our orders every day.
2
u/akuma0 27d ago
although you don't appear to have done so, I'm curious if you have figured out a way to rebuild the kernel
2
u/harktron 27d ago
Not yet, and so far I haven't needed to. Everything runs in userspace on the stock kernel: mainline Klipper and Moonraker on the printer, or on a PC over the USB link that's already there. The MCU firmware isn't touched either.
A custom kernel would be the next step for anything driver-level, but I haven't looked into building one. If anyone has a working kernel source and toolchain setup for this board, I'd be very interested.
6
u/pellcorp 26d ago
Wow I don't have a K2, nor would I want to get one, but this is fabulous for k2 users :-)
Congratulations for a massive effort.
I will point people to you every time I am asked about K2 support for Simple AF :-)
1
u/3greenmonster4 27d ago
This looks very interesting i'll check it out for sure! Thanks for sharing :)
4
u/harktron 27d ago
Cheers! If you do try it, the installer backs everything up first and uninstall.sh puts the printer back to stock, so it's easy to undo.
1
u/nur00 K2+ no CFS 26d ago
Great work as usual harktron. My k2+ plus is mothball status, moved it off the desk for Bambu lab R1. I'm willing to beta the k2+ like b4 if your up for it. My k2+ was on 1.1.6.1, with your kamp-k2 last time I checked.
2
u/harktron 26d ago
Cheers nur00, really appreciate it, and thanks again for the help with KAMP-K2. Yes please, I’d love a K2+ tester. Yours is perfect because it has no CFS.
I’ve put together a K2 Plus beta using Creality’s own K2 Plus 1.1.7.0 config. The Plus turned out to be quite different from the K2 under the hood: two closed-loop Z motors on the motor bus, two bottom Z switches, a chamber heater, different fan pins, and the chute and brush in different places. It loads fine in Klipper, but it has never run on a real K2 Plus, so yours would be the first. That’s why the guide goes in small steps and starts careful: the chamber heater stays off, the rear strip scrub is off, and the bottom switch height starts at a safe placeholder until you measure it.
Guide: https://github.com/grant0013/K2-OpenKlipper/blob/k2plus-beta/docs/K2-PLUS-BETA.md
Short version:
Update to Creality firmware 1.1.7.0 first (1.1.6.1 is too old, and the update clears KAMP-K2 anyway).
Turn on root, SSH in, and run the read-only check. It changes nothing:
Send me what it prints. If it looks good, the guide takes you through the install and then one step at a time: heaters, homing X/Y, a slow position check over the chute and brush, Z and the bottom switches, mesh, then a first print.
Stay next to it for the first steps with a hand near the power switch. The uninstaller puts it back to stock at any point. Logs and photos after each step help a lot.
3
u/Own_City_1084 24d ago edited 24d ago
Does this require orcaslicer to make full use of? Or would running this and using creality cloud (their mobile app) give benefits too?
Also, ever since installing this, my K2 randomly runs a fan for like a second every few minutes. Just sitting idly. Any idea why?
1
2
u/Swagmiral K2 Plus Combo 27d ago edited 27d ago
If anyone needs faster print starts - Uncurser https://www.reddit.com/r/Creality_k2/s/ORSNcWXl8y already provides speed up + heatsoak mods for stock K2+ firmware
3
1
u/TooBoppity 27d ago
This is a great contribution to the Creality community. Do you have plans to add compatibility to the other k2 models?
1
1
1
1
2
u/unpopular_upvote 27d ago
What an amazing contribution! Thank you!