checkOutputs(), which will in turn callonLidClosedChanged(closed=true)if necessary
It only does that if there's actually an external monitor connected. If there's none and the system is actually supposed to suspend, that would wrongly leave it running