Cornering speed limits: classic jerk, junction deviation and square corner velocity
Short answer
Each firmware caps how fast the toolhead may pass through a change of direction. Marlin 2 uses junction deviation by default, set with M205 J, where d = 0.4 × jerk² ÷ acceleration; classic jerk applies only when CLASSIC_JERK is enabled [1, 2]. Klipper instead sets the speed for a 90° corner with square_corner_velocity, 5 mm/s by default [4]. OrcaSlicer's cornering test raises the value with height so you can read where corners stop being sharp [9].
Three ways firmware describes a corner
When a path turns, the toolhead cannot stop dead at every vertex without wasting time and disturbing extrusion, and it cannot take sharp corners at full speed without shaking the frame. Firmware resolves this with a cornering limit, expressed in one of three ways.
Classic jerk (Marlin). Jerk is the largest change in velocity, in mm/s, that may happen instantly at a junction. Marlin explains the trade-off: too low and the nozzle lingers on small segments and corners and can leave blobs; too high and direction changes apply enough torque to cause ringing or skipped steps. With CLASSIC_JERK enabled the defaults are 10 mm/s for X and Y and 0.3 mm/s for Z, and DEFAULT_EJERK is 5 mm/s, which Linear Advance may use [1].
Junction deviation (Marlin 2 default). Junction deviation is now Marlin’s default cornering mode, and enabling CLASSIC_JERK overrides it. JUNCTION_DEVIATION_MM defaults to 0.013 mm, smaller values corner more slowly, and Marlin converts from jerk with d = 0.4 × jerk² ÷ printing acceleration [1]. With jerk 10 mm/s and 1,000 mm/s², d = 0.4 × 100 ÷ 1,000 = 0.04 mm. At Marlin’s default printing acceleration of 3,000 mm/s², the same jerk gives 0.0133 mm, close to the 0.013 default [1].
Square corner velocity (Klipper). Klipper’s square_corner_velocity is the maximum speed through a 90° corner, 5 mm/s by default. Wider angles get higher speeds and sharper ones lower; 0 makes the toolhead stop at every corner [4]. Klipper’s look-ahead derives the junction speed for each angle from this one value using approximated centripetal acceleration [5]. Change it at run time with SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY=<value> [6].
| Firmware | Setting | Unit | Default | Change at run time |
|---|---|---|---|---|
| Marlin 2 | JUNCTION_DEVIATION_MM |
mm | 0.013 | M205 J<mm> [2] |
| Marlin, classic | DEFAULT_XJERK, DEFAULT_YJERK |
mm/s | 10 | M205 X<mm/s> Y<mm/s> [2] |
| Klipper | square_corner_velocity |
mm/s | 5.0 | SET_VELOCITY_LIMIT [6] |
| RepRapFirmware | Max instantaneous speed change | mm/min | M566 X Y [9] |
Marlin’s run-time values are reported by M503 and saved with M500 when EEPROM storage is enabled [2]. RepRapFirmware works in mm/min, so multiply mm/s by 60: 50 mm/s becomes M566 X3000 Y3000 [9].
Where the slicer fits in
Slicers can send cornering limits in G-code. PrusaSlicer’s machine limits include Maximum jerk for each axis in mm/s and Maximum junction deviation, which is sent as M205 J and only applies on Marlin when greater than zero [14]. OrcaSlicer has the same machine limits under Motion ability → Jerk limitation; for a Marlin 2 printer that uses classic jerk, set Maximum Junction Deviation to 0 [11].
OrcaSlicer also sets per-feature jerk: separate values for outer wall, inner wall, infill, top surface, first layer and travel. Its guidance is lower jerk on outer walls and top surfaces for quality and higher on infill and travel for speed, all capped by the printer’s machine limits. On Marlin 2 with junction deviation, OrcaSlicer applies the same 0.4 × jerk² ÷ acceleration relationship [10].
OrcaSlicer’s cornering test
OrcaSlicer’s guide suggests skipping this test if corners already look fine at the speeds you want [9]. Otherwise it detects the firmware and tests the matching parameter: square_corner_velocity on Klipper; junction deviation on Marlin 2 when Maximum Junction Deviation is above 0 and classic jerk when it is 0; classic jerk on legacy Marlin; and maximum instantaneous speed change on RepRapFirmware. Expect junction deviation between 0.0 and 0.3 mm and jerk from about 1 to 20 mm/s or higher [9].
- On Marlin 2, confirm junction deviation is enabled in the printer’s advanced settings.
- Set acceleration and speed high enough to provoke ringing, for example 2,000 mm/s² and 100 mm/s, and load an opaque, high-gloss filament.
- Run the cornering test with a wide start-to-end range. If quality never drops, raise the end value and repeat.
- Measure the height at which corners start losing sharpness and read the value at that height in OrcaSlicer.
- Print a second test whose maximum sits near that point; the Ringing Tower model is recommended for seeing the limit.
- Save the result, then restore normal acceleration and jerk.
Steps follow OrcaSlicer’s guide [9]. To save, OrcaSlicer recommends its printer profile (Motion ability → Jerk limitation). In firmware, its examples are SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY=5.0 or square_corner_velocity in printer.cfg for Klipper; M205 J0.012 then M500, or #define JUNCTION_DEVIATION_MM 0.012 with CLASSIC_JERK left commented out, for Marlin 2; and M205 X10 Y10 then M500 for classic jerk [9].
How cornering interacts with other calibrations
Cornering settings share the corner with pressure advance and input shaping, so the order matters. OrcaSlicer’s guide puts cornering after flow, pressure advance and retraction, and before input shaping [12], and its jerk page says jerk works together with pressure advance, adaptive pressure advance and input shaping [10].
- Klipper’s pressure advance test temporarily drops
SQUARE_CORNER_VELOCITYto 1 so that pressure effects at corners stand out [7]. A non-zero value normally reduces extruder flow changes in corners [4]. - Klipper’s input shaping guide asks you to put
square_corner_velocityback to 5.0 and not to raise it with input shaping, because it adds smoothing; raise acceleration instead [8]. - Marlin’s Linear Advance respects the extruder jerk limit and lowers acceleration on a move rather than skip extruder steps [3].
- OrcaSlicer lists jerk and junction deviation among contributors to vertical fine artifacts, the ripple its VFA test looks for [13].
Reading symptoms
| Symptom | Cornering-related cause | Source |
|---|---|---|
| Blobs at corners and on short segments | Jerk too low, nozzle lingering | [1] |
| Ringing after corners | Jerk or junction deviation too high | [1, 9] |
| Skipped steps or shifted layers | Jerk too high for the motors | [1] |
| Corners rounded or soft on the test tower | Value above the printer’s useful limit | [9] |
Bulging corners can also come from pressure advance, and shifted layers have causes beyond jerk, covered in layer shifting. Ringing that persists at modest cornering values is a job for input shaping; see ringing and ghosting.
Questions
Should I raise square_corner_velocity on a Klipper printer with input shaping?
Klipper's resonance guide advises against it, saying a higher value can cause more smoothing in parts and that raising acceleration is the better route [8].
Sources
- Configuring Marlin (Configuration.h). Marlin Firmware documentation. Firmware documentation. CLASSIC_JERK defaults, jerk effects, JUNCTION_DEVIATION_MM 0.013 and formula, DEFAULT_ACCELERATION. Accessed October 12, 2026.
- M205 - Set Advanced Settings. Marlin Firmware documentation. Firmware documentation. M205 J, X, Y, Z, E parameters; save with M500. Accessed October 12, 2026.
- Linear Advance. Marlin Firmware documentation. Firmware documentation. Linear Advance respects extruder jerk and lowers acceleration if needed. Accessed October 12, 2026.
- Configuration reference. Klipper documentation. Firmware documentation. square_corner_velocity definition and default. Accessed October 12, 2026.
- Kinematics. Klipper documentation. Firmware documentation. Look-ahead junction speeds from approximated centripetal acceleration. Accessed October 12, 2026.
- G-Codes. Klipper documentation. Firmware documentation. SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY. Accessed October 12, 2026.
- Pressure advance. Klipper documentation. Firmware documentation. PA test lowers square corner velocity to 1. Accessed October 12, 2026.
- Resonance Compensation. Klipper documentation. Firmware documentation. Keep square_corner_velocity at 5.0 with input shaping. Accessed October 12, 2026.
- Cornering. OrcaSlicer Wiki. Slicer documentation. Firmware detection, value ranges, test procedure, commands to save results. Accessed October 12, 2026.
- Jerk XY. OrcaSlicer Wiki. Slicer documentation. Per-feature jerk settings, cornering control types, JD formula. Accessed October 12, 2026.
- Motion Ability. OrcaSlicer Wiki. Slicer documentation. Maximum jerk and Maximum junction deviation machine limits. Accessed October 12, 2026.
- Calibration Guide. OrcaSlicer Wiki. Slicer documentation. Cornering after retraction, before input shaping. Accessed October 12, 2026.
- VFA. OrcaSlicer Wiki. Slicer documentation. Jerk/junction deviation can contribute to vertical fine artifacts. Accessed October 12, 2026.
- ConfigDefsFDM.cpp (setting definitions and tooltips). Prusa Research, PrusaSlicer source on GitHub. Source code. Machine limits: Maximum jerk per axis, Maximum junction deviation (M205 J). Accessed October 12, 2026.