Sounds like something is loose and is being misaligned when it is closed. I would start by checking the cable that connects the display to the motherboard. Make sure it isn't pinched, damaged, being pinched when the back is closed, or even loosening the connection when it is closed.
Should that not do it, then you are going to have to see what is being moved (is loose or damaged) when the back is closed.