I think that it may be an overheating problem. After a while laptops collect a lot of dust and that blocks the airflow to the graphic card which can result in overheating and may break the card. I would either contact HP support or if you are experienced with laptops you could try opening it and removing the dust (if that's the problem), but that may prove difficult.