How can I reset my display settings through terminal?

138,028

Solution 1

Removing ~/.config/monitors.xml should do it:

  • Open a terminal window by pressing Ctrl+Alt+T
  • type rm ~/.config/monitors.xml and press Enter
  • immediately log out and back in. It should be reverted now

Alternatively

If you know what resolution your screen supports (e.g. 1440x900), you can run the command:

xrandr -s 1440x900

to at least temporarily set a workable solution, then subsequently change settings from GUI.

Solution 2

I had a similar problem to you but I found the solution here How to scale title bars and menu in Ubuntu 14.04 with the terminal only

dconf reset /com/ubuntu/user-interface/scale-factor

This changes the "scale for menu and title bars" to default.

Solution 3

Just to add to this, since this is the first thread that appeared for me: My solution to reset the display was to use:

xrandr --listactivemonitors
Share:
138,028

Related videos on Youtube

alexanast
Author by

alexanast

Updated on September 18, 2022

Comments

  • alexanast
    alexanast over 1 year

    I am using Ubuntu 15.10. I accidentally changed the size of the interface to maximum. Now my folders and windows are too large and don't fully fit the screen so I cannot revert the effect. Is there any way to reset the display settings to default so this can revert to normal?

  • alexanast
    alexanast about 8 years
    it did not work.
  • alexanast
    alexanast about 8 years
    uhd. It was the highest in the settings and it is already set at that resoloution. i think 3840x2160
  • Jacob Vlijm
    Jacob Vlijm about 8 years
    Hi @alexanast just (re) tested it. Did you forget to log out/in? it works really. Local monitor settings are stored in ~/.config/monitors.xml. There is no way these settings are remembered if you remove the file and immediately log out, unless you must have done something exotic.
  • alexanast
    alexanast about 8 years
    login screen fixed but desktop enviroment didnt. Restarting to check. edit It did not.
  • Jacob Vlijm
    Jacob Vlijm about 8 years
    @alexanast curious to what you did to change the settings?
  • alexanast
    alexanast about 8 years
    well i guess i will mark this as correct since it should work. I fixed it through settings by going in blind using tab so no problem. Thanks for the soloution and you patience
  • Slaughterfish
    Slaughterfish about 7 years
    This worked for ubuntu 16.04 atleast
  • Pablo Bianchi
    Pablo Bianchi almost 7 years
    Also you can use dconf-editor, go to that path, Set to default.
  • bakoyaro
    bakoyaro about 6 years
    also works if you know the resolution you want, edit the monitors.xml file and set the resolution to your desired value
  • gerlos
    gerlos over 5 years
    A quick and effective way to restart the GUI (both Xorg and Wayland) in case of problems like this is to use the Ctrl-Alt-Backspace shortcut. You could remove monitors.xml and restart GUI right away using this shortcut. Unfortunately is disabled by default. You need to run sudo dpkg-reconfigure keyboard-configuration and answer yes when prompted to enable this shortcut.
  • alphabetasoup
    alphabetasoup about 5 years
    But this doesn't reset anything?
  • tommy61157
    tommy61157 almost 5 years
    I'm using Lubuntu 18.04 and ~/.config/monitors.xml does not exist on my machine, what could be some possible alternate locations for this file?
  • Kosta
    Kosta almost 5 years
    I had to restart the computer in order to have it work, but basically removing the monitors.xml did the trick.
  • Anshu
    Anshu almost 5 years
    it 's really good answer..thank
  • Jules Colle
    Jules Colle about 4 years
    if you ended up in the recovery mode with root access the file will not be under ~, but under /home/yourusername instead
  • Eurospoofer
    Eurospoofer almost 4 years
    If you unplug an external monitor and display doesn't reset, running this will reset the monitor config.
  • Henrique Bruno
    Henrique Bruno over 2 years
    I was having some bizarre dual monitor behaviors and this removal fixed it, many thanks!
  • Admin
    Admin almost 2 years
    you rescue me ! this works for ubuntu 20.04