[FIXED] XY skew after firmware update – G-code reset worked

Hi all,

After a recent firmware update, my P1S started printing with a skew in the XY plane.
I wanted to share what fixed it for me — and this might help others too.

I use a P1S, but this fix could apply to other models (X1C, P1P, A1 Mini) that use automatic skew correction.


Symptoms I noticed:

  • Purge line was skewed — closer to the right side of the bed
  • Printhead wasn’t moving in clean straight lines (especially when going to the poop chute)
  • Gantry slightly shifted front-to-back during side-to-side movement
  • Also, weird purge behavior: nozzle temp dropped multiple times, and it pooped several times before starting

What I tried first:

  • Checked belts and hardware (everything was solid)
  • Recalibrated, even did a factory reset — didn’t help

So I suspected a skew compensation issue and tried a G-code level fix.


Here’s what worked:

I created a G-code file and ran it via SD card (no console access):

M1005 I0 ; reset the skew compensation values
M990 Skew_Clear
M991 Skew_Calibrate
M500 ; save the new calibration

Then:

  1. Ran the G-code file
  2. Without restarting the printer, I manually ran skew calibration from the printer menu
  3. Printed a test — the skew and head movement were fixed
  4. Restarted the printer — the fix persisted :white_check_mark:

My notes:

  • I think the key was the M1005 I0 command — might reset internal state before calibration
  • I couldn’t test without it, because the issue was resolved
  • M500 may or may not be needed to save the fix — mine persisted even without it

G-code available on GitHub if you want to try:

https://github.com/kullanici_adin/bambulab-skew-fix


Hope this helps someone! The issue really looked like hardware at first — but it was just a firmware-level calibration bug.

Let me know if it works for you too.

1 Like

I’m glad you corrected your problem, but I think that much of what you did was irrelevant to the solution.

The built-in printer calibration routine cannot check skew. You can only detect skew by measuring an actual print.

Once you have measured and calculated the actual amount of skew in radians, M1005 I(rad) provides skew compensation.

The effect of M1005 I0 is to provide no compensation. This is a persistent value. Once set, there is no need for the M500 command.

I can find no documentation for M990, and a search finds it mentioned only in your posts here, on Reddit, and on Github. Where did you find this? If it is a recognized Bambu command, it would only duplicate the effect of the M1005 I0 command.

In Bambu Lab firmware, the M991 G-code command, with the proper switches, is used to end a smooth timelapse at a safe position or to notify the slicer of a layer change.

Thank you again for your valuable input!

Due to the lack of console access in Bambu Studio, I applied the commands (M1005 I0, M990, M991) all at once via an SD card without testing them separately. Based on my experience, I’m fairly confident that M1005 I0 was the key command to reset skew compensation.

Initially, after running the G-code and restarting the printer, the skew issue persisted — the purge line was still misaligned, and the printhead didn’t move correctly. Then, I ran the same G-code again without restarting and performed the skew calibration manually from the printer’s menu. After that, everything worked perfectly — the purge line was straight, the printhead movement was correct, and the skew disappeared.

I also ran M500 to save the calibration to EEPROM, although this might not have been strictly necessary.

Additionally, I downgraded the firmware to version 01.07.00.00 and have not upgraded it again since. If I upgrade in the future, I plan to run this G-code and recalibrate again. Unfortunately, the problem started immediately after the firmware update.

Since the issue was resolved and hasn’t recurred (nor does it appear on my other printers), I haven’t been able to perform further testing.

Thanks again for your insights — I’ll update my posts to clarify that M1005 I0 is likely the essential command for resolving this skew issue.


1 Like

please friend, send your g-code file to me, please.