  In this work, we explore the phenomenology of generalized dark matter (GDM)
which interacts with photons ($\gamma$). We assume that DM establishes elastic
scattering with $\gamma$ when it has already become nonrelativistic, otherwise
the abundance of DM today is disfavored by current observations. Within this
scenario, the equation of state (EoS) of DM is determined by its mass
($m_\chi$) and the DM-$\gamma$ scattering cross-section. The distinctive
imprints of a nonzero EoS of DM on CMB angular power spectrum allow us to set a
lower limit on $m_\chi$ with Planck 2018 data alone, i.e., $m_{\chi} > 8.7$ keV
at $95\%$ C.L. In the study of cosmic concordance problems, we find that the
GDM scenario preserves the sound horizon ($r_s(z_*)$) predicted in the fiducial
$\Lambda$CDM model, and thus does not solve the $H_0$ tension. When performing
the joint analysis of Planck+LSS datasets, the best-fit $S_8= 0.785\pm 0.017$
closely matches the given $S_8$ prior. This suggests that the GDM scenario can
be counted as a viable candidate to restore the $S_8$ ($\sigma_{8}$) tension.
