At various points, the medieval Holy Roman Emperors were pretty effective at securing noble support, as much as any other medieval monarchs, anyway. What they struggled greatly with was the growing power of the papacy. This was a far greater threat to their legitimacy than nobles. With papal reform in the eleventh century, popes began to challenge kings' right to lay investiture- appointing bishops to their offices. This was resolved, basically in favor of the popes, at Canossa, where HRE Henry IV begged forgiveness by kneeling in the snow before Pope Gregory VII. It was this controversy that basically emboldened nobles to seek to gain more autonomy, by controlling the election of the emperor. This is why the two most famous HRE's of the medieval period, Frederick Barbarossa and Frederick II, attempted to conquer the Italian peninsula. Frederick II was actually excommunicated for his campaign.