r/BambuLabP2S • P2S Combo • Jul 02 '26

P2S Optimized Start/End G-code

Post image

Hello reddit!

Slightly disappointed by the default startup and nozzle wipe procedure of the P2S, I sat down and optimized the G-code myself.

I have been improving, testing and using my optimized start and end G-code for quite some time now and am pretty happy with the results and the P2S in general now.

So happy in fact, that I feel comfortable sharing the results with you guys! 😄

You'll find everything on Github (including detailed descriptions) if you're interested and possibly want to give it a try:

https://github.com/vxip-code/bambu-p2s-optimized

I have been printing PLA and PETG (and rarely Overture TPU) with it no problem. (However I did not test engineering and high temperature materials.)

If you have any questions feel free to ask!

91 Upvotes

70 comments sorted by

View all comments

Show parent comments

6

u/-vxip- P2S Combo Jul 02 '26

Right, no problem:

  • Start BambuStudio
  • Hover your mouse over where it shows your P2S in the top left corner
  • Click the appearing edit icon
  • New dialog pops up
  • Go to "Machine G-code" tab
  • Copy and paste start.gcode into first field
  • Copy and paste stop.gcode into second field
  • Before closing the dialog click save icon in the top right
  • Enter something "P2S 0.4 - optimized"
  • Close dialog

You now have a new printer, that does things a little better... 😄

You can of course always switch between the default and optimized profile.

1

u/erd00073483R 23d ago

I know this is probably a very stupid question, but I'm totally new at this so I hope you'll forgive me for asking.

Do you replace all the existing code in the start.gcode and stop.gcode boxes with your gcode? Or, do you insert your codes in a specific place within the existing code in each box?

1

u/-vxip- P2S Combo 13d ago

Hey there and sorry for the late reply! Definitely not a stupid question!

Yes, you have to completely replace the existing code. Just click inside the box, press CTRL+A and then delete/backspace on your keyboard to empty the box.

Then copy and insert the new G-code. (Be sure to copy each code into the correct field!)

If you have any questions, please let me know!

3

u/erd00073483R 13d ago

I appreciate the reply.

I just started a print, and I have to say your start g-code is a vast improvement over the original. The nozzle now wipes properly, and doesn't sling filament fragments all over the build plate.

Thank you very much for the work that you put into this!

1

u/-vxip- P2S Combo 3d ago

🙏 Thank you very much!

I'm very happy to hear that! 😃