We present an efficient method to solve the quantum discord of two-qubit X states exactly. A geometric picture is used to clarify whether and when the general POVM measurement is superior to von Neumann measurement. We show that either the von Neumann measurement or the three-element POVM measurement is optimal, and more interestingly, in the latter case the components of the postmeasurement ensemble are invariant for a class of states.