A system consisting of two qubits and a resonator is considered in the presence of different sources of noise, bringing to light the possibility for making the two qubits evolve in a synchronized way. A direct qubit-qubit interaction turns out to be a crucial ingredient as well as dissipation processes involving the resonator. The detrimental role of local dephasing of the qubits is also taken into account.