In this paper, we examine the effect of X-ray and Lyα photons on the intergalactic medium (IGM) temperature. We calculate the photon production from a population of stars and microquasars in a set of cosmological hydrodynamic simulations which self-consistently follow the dark matter dynamics, radiative processes as well as star formation, black hole (BH) growth and associated feedback processes. We find that (i) IGM heating is always dominated by X-rays unless the Lyα photon contribution from stars in objects with mass M 8 M⊙ becomes significantly enhanced with respect to the X-ray contribution from BHs in the same halo (which we do not directly model). (ii) Without overproducing the unresolved X-ray background, the gas temperature becomes...