How to fix “no screens found”

If getting “no screens found” message when computer boots, the reason can be a wrong GPU driver or the wrong setting. The fix goes like:

1. Log in

2. Check current directory using command

pwd

3. Check that network is on using command

nmcli dev status

4. Check that package management is working using command

sudo apt-get update

5. Check installed graphic card drivers using command

dpkg --get-selections | grep xserver-xorg-video

6. Remove the video driver you want or remove all video drivers using command

sudo apt-get purge xserver-xorg-video-*

7. Remove possible /etc/X11/xorg.conf file using command

sudo rm /etc/X11/xorg.conf

8. Remove ~/.config/monitors.xml file using command

rm .config/monitors.xml

9. Install a video driver you want, or install all video drivers using command

sudo apt-get install xserver-xorg

9 b. If wanting to install only one driver (like xserver-xorg-video-vesa), the command is

sudo apt-get install xserver-xorg-video-vesa

10. Start X (go to the desktop) using command

startx

10 b. If Xserver is active, you need to start different X like

startx -- :1

… or

startx -- :2

.. and so on.