  Evidence is summarized that suggests that when a protogalaxy collapses, a
fraction $f$ of its gas fails to heat to the virial temperature, where $f$ is
large for haloes less massive than the value $M^*$ associated with $L^*$
galaxies. Stars and galaxies form only from the cool gas fraction. Hot gas is
ejected from low-mass systems as in conventional semi-analytic models of galaxy
formation. In high-mass systems it is retained but does not cool and form
stars. Instead it builds up as a largely inert atmosphere, in which cooling is
inhibited by an episodically active galactic nucleus. Cold gas frequently falls
into galactic haloes. In the absence of a dense atmosphere of
virial-temperature gas it builds up on nearly circular orbits and forms stars.
When there is a sufficiently dense hot atmosphere, cold infalling gas tends to
be ablated and absorbed by the hot atmosphere before it can form stars. The
picture nicely explains away the surfeit of high-luminosity galaxies that has
recently plagued semi-analytic models of galaxy formation, replacing them by
systems of moderate luminosity from old stars and large X-ray luminosities from
hot gas.
