  We consider a light scalar dark matter candidate with mass in the GeV range
whose $p$-wave annihilation is enhanced through a Breit-Wigner resonance. The
annihilation actually proceeds in the $s$-channel via a dark photon mediator
whose mass is nearly equal to the masses of the incoming particles. We compute
the temperature at which kinetic decoupling between dark matter and the
primordial plasma occurs and show that including the effect of kinetic
decoupling can reduce the dark matter relic density by orders of magnitude. For
typical scalar masses ranging from 200 MeV to 5 GeV, we determine the range of
values allowed for the dark photon couplings to the scalar and to the standard
model particles after requiring the relic density to be in agreement with the
value extracted from cosmological observations. We then show that $\mu$ and
$y$-distortions of the CMB spectrum and X-ray data from XMM-Newton strongly
constrain the model and rule out the region where the dark matter annihilation
cross-section is strongly enhanced at small dispersion velocities. Constraints
from direct detection searches and from accelerator searches for dark photons
offer complementary probes of the model.
