6

I was playing around with Ubuntu 16.04's display features and I accidentally turned off my monitor.

I can still see my screen on the login screen, but my screen disappears the second I log in to my user account. The system guest account is not affected.

Is there any way I can undo this?

Kaz Wolfe
  • 34,680

1 Answers1

9

If you know your account password, this is going to be (thankfully) easy to fix.

  1. Press the Ctrl+Alt+F1 keys on your keyboard all at the same time. You will be transported to a TTY (or a giant terminal without any fancy graphics).
  2. Log in to your user account. Note that you must know your username and password.
  3. Delete the monitor config file:

    rm ~/.config/monitors.xml
    
  4. Log out of the tty with the logout or exit command, and press Ctrl+Alt+F7 to get back to the GUI.

  5. Log in as normal, and enjoy having your screen back.

The monitors.xml file contains practically all information about your own monitor configuration. Unfortunately, this gets annoying. And, as this file is owned by your user, you must either be your user or root.

If for some reason you can't reach the TTY, you'll need to reboot into recovery mode. Follow the instructions in that post until you see root@something:~#. Then, run this command:

rm /home/<your_username>/.config/monitors.xml

Then, reboot your system using the reboot command.

Kaz Wolfe
  • 34,680