This question already has an answer here:
I really need help. I have Kubuntu 16.10 on my laptop a everything worked. With external hdmi monitor too. But once I unplugged the monitor, then plugged it in again. And now it doesn't work without the external monitor. After login I have only black screen. Any ideas?