If you haven't disassembled the system, it likely isn't a loose connection. However, if the system has been "serviced" lately it could be.
BTW, a Google Shopping search of "hp dv5 display" will provide multiple sources for a replacement screen for your system.