I have a few problems with my laptop (HP 840) randomly freezes or the screen becomes black (it could be because of graphics drivers). After I restart it everything seems to be fine until it happens randomly again.. Laptop is running WIN10. All drivers are updated (I think so). What could it be? If somebody need more information, I will try to provide it.
Could be a loose connection, you would need to check the cable that connects the display. It could also be that the GPU is overheating and/or going bad. However, if the laptop is under warranty, contact the manufacturer rather than opening it up yourself. If not under warranty, you can try checking it yourself, or take it to a local tech.