A monitor attached to a Hewlett Packard desktop via a DisplayPort adaptor may flicker or switch on and off repeatedly. (For example, DispayPort → VGA, DisplayPort → HDMI etc.)
This may occur if using various types of unbranded or low-end adaptors.
Use a HP-branded adaptor instead.
(Also see Fuzzy Display / Shimmer on TFT Monitors for other issues.)