  Only ~10% of baryons in the universe are in the form of stars, yet most
models of luminous structure formation have concentrated on the properties of
the luminous stellar matter. In this paper we focus on the "flip side" of
galaxy formation and investigate the properties of the material that is not
presently locked up in galaxies. This "by-product" of galaxy formation can be
observed as an X-ray emitting plasma (the intracluster medium, hereafter ICM)
in groups and clusters, and we present a version of the Durham semi-analytic
galaxy formation model GALFORM that allows us to investigate the properties of
the ICM. As we would expect on the basis of gravitational scaling arguments,
the previous model (presented in Bower et al. 2006) fails to reproduce even the
most basic observed properties of the ICM; however, we present a simple
modification to the model to allow for heat input into the ICM from the AGN
"radio mode" feedback. This heating acts to expel gas from the X-ray luminous
central regions of the host halo. With this modification, the model reproduces
the observed gas mass fractions and luminosity-temperature relation of groups
and clusters. Introducing the heating process into the model requires changes
to a number of model parameters in order to retain a good match to the observed
galaxy properties. With the revised parameters, the best fitting luminosity
function is comparable to that presented in Bower et al. (2006). The new model
makes a fundamental step forward, providing a unified model of galaxy and
cluster ICM formation. However, the detailed comparison with the data is not
completely satisfactory, and we highlight key areas for improvement.
