First try updating your graphics driver and see if this resolves it. NOTE: If the driver was recently updated, then try going back to the prior driver.
If this doesn't resolve it, you may want to check the cable that connects the display to see if it is loose or damage.
Should this not help, then you are looking at either a GPU issue or a display issue. Since you say it works fine on the external monitor, then you need to determine if both the attached display and the external monitor are indeed using the same graphics or not. If they are, then it is likely the display that is the issue. If, however, they aren't using the same graphics then it could be that is the issue.
NOTE: If the laptop is under warranty, then I would just contact the manufacturer for a repair.