We examine the effect of spin-orbit coupling on geometric phases in hydrogenlike atoms exposed to a slowly varying magnetic field. The marginal geometric phases associated with the orbital angular momentum and the intrinsic spin fulfill a sum rule that explicitly relates them to the corresponding geometric phase of the whole system. The marginal geometric phases in the Zeeman and Paschen-Back limit are analyzed. We point out the existence of nodal points in the marginal phases that may be detected by topological means.