If it works sometimes, but not others and is progressively getting worst...
Coloured lines, squares and strips, or a blank screen on startup is a bad sign on laptops normally due to the graphics cable.
Next time it occur, tap gentle the back of the screen and see if it changes. It's it gets worst or better from leaning the monitor back or forwards, then it's a hardware issue which happens a lot with some laptops (the graphic cable flexing between the monitor and computer when open/closing the lid becomes weakened over time and can get damaged). If that's the case, your other 'software' issues might be cause by unsafe shutdowns. If you can't see what it's doing, could be still booting, etc, and you switch it off and on.
Check the video cable and the LCD screen are not mismatching/damaged - the screen is not getting all the data it needs, or getting them on the wrong pins.