Understanding the stellar initial mass function (IMF) is a key aspect to obtain a complete picture of galaxy formation and evolution. In the last years, we have carried out a system-atic census of the IMF in the unresolved stellar populations of (massive) early-type galaxies (ETGs), using optical and NIR spectroscopy from different surveys (e.g. SDSS, CALIFA) and dedicated observing programmes (OSIRIS@GTC, XSHOOTER@VLT). I will show results on a non-universal IMF in ETGs (pointing to an excess of low-mass stars in high-relative to low-mass galaxies) and current constraints on the driver behind observed variations in the stellar IMF.