I installed Ubuntu and the resolution of the desktop is so big that it only shows about 50% of the screen, but is shows up normal while using command line.

What should I type in the command line to change the desktop screen resolution?


This worked for me:

Enumerate the names of all your video outputs, and the possible resolutions for those currently connected to a monitor:

xrandr -q

Choose the name of the output you wish to change the resolution of, and:

xrandr --output <OUTPUT> --mode 1024x768

Note: If running from a text terminal, that is not running in gfx environment, you'll have to add a -d :0 parameter, i.e:

xrandr -d :0 -q
xrandr -d :0 --output <OUTPUT> --mode 1024x768
  • 6
    There was an warning saying VGA1 or LVDS not found – Ramana Reddy Oct 4 '15 at 14:55
  • lookup the screen after first comment, choose the profile appear in the screen – Hoai-Thu Vuong Jul 12 '16 at 18:48
  • 1
    xrandr --output `xrandr | grep " connected"|cut -f1 -d" "` --mode 1920x1080 if you want a one-liner that auto-detects output. – exebook Nov 3 '16 at 20:18

Change screen resolution:

Create a new resolution using cvt

$> cvt 1600 900 75
1600x900 74.89 Hz (CVT 1.44M9) hsync: 70.55 kHz; pclk: 151.25 MHz
Modeline "1600x900_75.00"  151.25  1600 1704 1872 2144  900 903 908     942 -hsync +vsync

Add a new mode to the existing list (newmode is the name and remaining portion is )

$ sudo xrandr --newmode "1600x900_75.00"  151.25  1600 1704 1872 2144  900 903 908 942 -hsync +vsync

Find the current display

$ xrandr | grep -e " connected [^(]" | sed -e "s/\([A-Z0-9]\+\) connected.*/\1/"

Add new display mode where is the output from the previous command

$ sudo xrandr --addmode <Virtual1> 1600x900_75.00

This will add the new resolution to your existing list of supported resolutions. You can then choose the right option from the "display settings" or following command

$ xrandr --output Virtual1 --mode "1600x900_75.00"

To make this change permanent,

$ cat> ~/.xprofile
sudo xrandr --newmode "1600x900_75.00"  151.25  1600 1704 1872 2144      900 903 908 942 -hsync +vsync
sudo xrandr --addmode Virtual1 1600x900_75.00
xrandr --output Virtual1 --mode "1600x900_75.00"
  • Thanks a lot. I thought the cable didn't support it! – Simon Baars Aug 30 '18 at 18:42

I know it is an old question but, for me, the simple stuff was to do:

$ xrandr -q

SZ: Pixels Physical Refresh
0 1024 x 768 ( 271mm x 201mm ) 75 70 60
1 800 x 600 ( 271mm x 201mm ) 85 75 72 60 56
2 640 x 480 ( 271mm x 201mm ) 85 75 72 60
*3 832 x 624 ( 271mm x 201mm ) *74
4 720 x 400 ( 271mm x 201mm ) 85
5 640 x 400 ( 271mm x 201mm ) 85
6 640 x 350 ( 271mm x 201mm ) 85

Or something equivalent. The * marks the screen resolution currently used. To change it to one of the supported resolutions from the list above simply run the command:

xrandr -s 800x600

and the resolution is changed.

Tested on Ubuntu 14.04


Sometimes when there are a lot of refresh rates (the numbers to the right in the above sample results from xrandr -q), you need to specify the refresh rate. In that case, you should run the command:

xrandr -s 800x600 -r 85


If you have multiple outputs on your board, or the device is not reacting, then you can extend the above line with output. The value for the output is still found with xrandr -q, in my case HDMI-0. The command therefore becomes:

xrandr -s 800x600 -r 85 --output HDMI-0
  • 1
    worked fine with me in suse – ofarouk Nov 7 '16 at 13:05
  1. Run xrandr -q | grep "connected primary"

    This command shows all connected devices--feel free to not grep to see the list. HDMI-0 connected primary 1920x1080+0+0 means that my primary display is called "HDMI-0". Use that in the following command:

  2. xrandr --output HDMI-0 --auto

    If you have a specific desired resolution, use, for example:

    xrandr --output HDMI-0 --mode 1920x1080

    For more information, see the wiki

protected by Community Sep 11 '18 at 0:30

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.