12. The sum of all real roots of the equation $\left|x^{2}-3 x+2\right|+\left|x^{2}+2 x-3\right|=11$ is $\qquad$
12. $\frac{-19+5 \sqrt{97}}{20}$.

The original equation can be transformed into
$$
|x-1|(|x-2|+|x+3|)=11 \text {. }
$$

When $x \leqslant-3$, equation (1) becomes $2 x^{2}-x-12=0$, and both roots are greater than -3, so there is no solution in this case;
When $-3 < x \leqslant 2$, equation (1) becomes $-x^2 + 4x - 12 = 0$, and the discriminant is negative, so there is no solution in this case;
When $x>2$, equation (1) becomes $2 x^{2}-x-12=0$, one of its roots $x=\frac{1+\sqrt{97}}{4}$ satisfies the condition.
In summary, the sum of all real roots of the equation is
$$
-\frac{6}{5}+\frac{1+\sqrt{97}}{4}=\frac{-19+5 \sqrt{97}}{20} \text {. }
$$