  We employ cosmological hydrodynamical simulations to investigate the effects
of AGN feedback on the formation of massive galaxies with present-day stellar
masses of $M_{stel} = 8.8 \times 10^{10} - 6.0 \times 10^{11} M_{sun}$. Using
smoothed particle hydrodynamics simulations with a pressure-entropy formulation
that allows an improved treatment of contact discontinuities and fluid mixing,
we run three sets of simulations of 20 halos with different AGN feedback
models: (1) no feedback, (2) thermal feedback, and (3) mechanical and radiation
feedback. We assume that seed black holes are present at early cosmic epochs at
the centre of emerging dark matter halos and trace their mass growth via gas
accretion and mergers with other black holes. Both feedback models successfully
recover the observed M_BH - sigma relation and black hole-to-stellar mass ratio
for simulated central early-type galaxies. The baryonic conversion efficiencies
are reduced by a factor of two compared to models without any AGN feedback at
all halo masses. However, massive galaxies simulated with thermal AGN feedback
show a factor of ~10-100 higher X-ray luminosities than observed. The
mechanical/radiation feedback model reproduces the observed correlation between
X-ray luminosities and velocity dispersion, e.g. for galaxies with sigma = 200
km/s, the X-ray luminosity is reduced from $10^{42}$ erg/s to $10^{40}$ erg/s.
It also efficiently suppresses late time star formation, reducing the specific
star formation rate from $10^{-10.5}$ $yr^{-1}$ to $10^{-14}$ $yr^{-1}$ on
average and resulting in quiescent galaxies since z=2, whereas the thermal
feedback model shows higher late time in-situ star formation rates than
observed.

Cosmology and Nongalactic Astrophysics