How change display resolution settings using xrandr

Sponsored Link
Xrandr is used to set the size, orientation and/or reflection of the outputs for a screen. It can also set the screen size. There are a few global options; the rest modify a particular output and follow the specification of that output on the command line.
Open the terminal and run the following commands

First you need to enter the following command

$ xrandr

This will display the allowed resolutions

Sample output

Screen 0: minimum 320 x 200, current 1024 x 768, maximum 4096 x 4096
VGA1 connected 800×600+0+0 (normal left inverted right x axis y axis) 267mm x 200mm
800×600 85.1* +
640×480 75.0 60.0
720×400 70.1

If you want to add a mode with resolution 1024X768, you can enter the following command: (The output is shown following.)

$ cvt 1024 768

Sample output

# 1024×768 59.92 Hz (CVT 0.79M3) hsync: 47.82 kHz; pclk: 63.50 MHz
Modeline "1024x768_60.00″ 63.50 1024 1072 1176 1328 768 771 775 798 -hsync +vsync

Now you need to create a modeline

$ xrandr --newmode <Modeline>

copy the modeline of the previous output to the place mode line

$ xrandr --newmode "1024x768_60.00″   63.50  1024 1072 1176 1328  768 771 775 798 -hsync +vsync

Now you need to add the above mode using the following command

$ xrandr --addmode VGA1 1024x768_60.00

here for VGA1 you have to use what ever that was there for $ xrandr output

$ xrandr --output VGA1 --mode 1024x768_60.00

Running these would change your resolution but this is temporary.these steps were done to make sure that these commands work

Now we need to make these changes permanent

Now you need to edit the default file

$gksudo gedit /etc/gdm/Init/Default

Look for the following lines

PATH=/usr/bin:$PATH
OLD_IFS=$IFS

and Add the the following lines below them

xrandr --newmode "1024×768″ 70.00 1024 1072 1176 1328 768 771 775 798 -hsync +vsync

xrandr --addmode VGA1 1024x768_60.00

xrandr --output VGA1 --mode 1024×768

Save and exit the file

Credit goes here

Sponsored Link

Incoming search terms:

Related posts

118 thoughts on “How change display resolution settings using xrandr

  1. I have Linux Mint 14 mate installed on a fit=PC2i SBC which has a DVI display interface to an acer 22* monitor with 1600×1299)_60.00 resolution,

    I was unable to get xrandr –addmode VGA1 1600x1200_60.00 to work.

    I entered “xrandr -q” command and it reported DVI-0 and not LPT1 as my Display Device,
    After entering “xrandr –addmode DVI-0 1600x1200_60.00 the command was accepted.

    The next command ” xrandr –output DVI-0 –mode 1000x1200_60.00 was also accepted and the display resolution changed.

    One strange effect was the desktop shows the original content overlayed by the same image at the new resolution but aligned at the top left corner of the display.

    That display content persists even after editing my “Init/Default? file and rebooting,

    Is this what I should expect to happen?

    Will there be any updates forthcoming to correct this problem?

    [Reply]

  2. My apologies for typos in my earlier initial comment.

    The following has been corrected:

    I have Linux Mint 14 mate installed on a fit=PC2i SBC which has a DVI display interface to an acer 22* monitor with 1600×1299)_60.00 resolution,
    I have Linux Mint 14 mate installed on a fit=PC2i SBC which has a DVI display interface to an acer 22* monitor with 1600×1200_60.00 resolution,

    I was unable to get xrandr –addmode VGA1 1600x1200_60.00 to work.

    I entered “xrandr -q” command and it reported DVI-0 and not LPT1 as my Display Device,
    After entering “xrandr –addmode DVI-0 1600x1200_60.00″ the command was accepted.

    The next command ”xrandr –output DVI-0 –mode 1600x1200_60.00″ was also accepted and the display resolution changed.

    Thanks.

    [Reply]

  3. This worked perfectly, I went from having a 1024×768 resolution to 1600×900. The instructions are clear and concise. I’m new to Linux and this is one page I’m going to keep in my toolbox. Thank you!

    [Reply]

  4. And how about other resolutions? I just got done with the install and my Dell 2405 monitor with 1920×1200 res is aparently stuck at 1600×1200 max. Is there posibly an algorithm for calculating the modeline for other vslues of h & v resolution? A generic one perhaps.

    (Rant mode to on)
    Linux’s adaptability to oder hardware has long been a real strength in the marketplace of ideas. What is happening? There used to be a perfectly good auto-config for monitors that worked fine, why was it not used?

    Hopefully there is a better way, this looks like a shortcut team was on duty when this one was designed. Modelines??? in 2013??? I can & have implemented fixes like this, but I sould like to see this done right.

    (Rant mode off)

    At any rate we need a fix, someone please post some sort of a fix here if available.

    Thanks in advance.
    Jim Rivera

    [Reply]

  5. Hi thanks for the post. I have a doubt is that when running xrandr I get nothing concerning VGA. I have a PC on table with a NVIDIA GeForce 7300 graphics card and a monitor with Ubuntu 12.04 HP w1907v
    The xrandr command output:
    root @ you: ~ # xrandr
    xrandr: Failed to get size of gamma for output default
    Screen 0: minimum 320 x 240, current 1440 x 900, 1440 x 900 maximum
    default connected 1440×900 +0 +0 0mm x 0mm
    1440×900 50.0 *
    1360×768 51.0 52.0
    1152×864 53.0 54.0 55.0 56.0
    1152×720 57.0
    1024×768 58.0 59.0 60.0
    960×600 61.0
    960×540 62.0
    896×672 63.0
    840×525 64.0 65.0 66.0 67.0
    832×624 68.0
    800×600 69.0 70.0 71.0 72.0 73.0 74.0
    800×512 75.0
    720×450 76.0
    680×384 77.0 78.0
    640×512 79.0 80.0
    640×480 81.0 82.0 83.0 84.0 85.0
    576×432 86.0 87.0 88.0 89.0
    512×384 90.0 91.0 92.0
    416×312 93.0
    400×300 94.0 95.0 96.0 97.0
    320×240 98.0 99.0 100.0
    root @ you: ~ #
    I want to fix this because I can not enter the TTY mode (CTRL + ALT + F1) and I can not play “Njam” (Pacman – like) because I get a message that says “Input signal out of range, change settings to 1440 x 900-60 HZ “Thank you.

    [Reply]

  6. Hi,
    Just used you instructions to change the resolution from 1024×768 to 1440×900. Everything worked perfectly, and now I have a perfectly proportioned screen.
    Thanks

    [Reply]

  7. Hi there, thanks for this page, but Im rather confused. Correct me if im wrong. So the existing resulution is 1024×768 and the writer is showing how to add new modes, ie other resolutions. But bothfor “addmode” and “output”, the same 1024×768 figure is typed in. Is this right? Or am I to change the numbers to my preferred resolution figures in one of those places?

    Thanks again.

    [Reply]

  8. #xrandr –output VGA1 –mode 800×480
    #warning: output VGA1 not found; ignoring

    How to find VGA1, DVI-0 or something i have?
    (Notebook with Ubuntu 11.04)

    [Reply]

  9. … other info:

    #xrandr -q
    #Screen 0: minimum 320 x 200, current 800 x 600, maximum 800 x 800 default connected 800×600+0+0 (normal left inverted right x axis y axis) 0mm xx 0mm
    800 x 600 60.3*
    800x480_60.00 (0xeb) 29.5Mhz
    h: width 800 start 824 end 896 total 992 skew 0 clock 29.7KHz
    v: height 480 start 483 end 493 total 500 clock 59.5Hz

    Where VGA1 in this output?

    [Reply]

    hashem Reply:

    use “default” instead of “VGA1″

    you output name is default

    [Reply]

  10. I am also getting the “xrandr: Failed to get size of gamma for output default” error message. I’m running a Lenovo T-61 laptop with Nvidia graphics.

    It was working fine until I installed a system core security update.

    [Reply]

    Peter Talbot Reply:

    Has anyone who’s had this issue found a solution? Thanks in advance!

    [Reply]

  11. Thank you ¡¡ Solved in Linux Mint 15 ‘Olivia’, but using mdm inside gdm as Display Manager. So, the gedit file instruccion must changed to mdm.

    Regads

    [Reply]

  12. I’m using Linux Mint 14 (Nadia) with MDM.
    I typed the xrandr commands in my terminal, and the resolution changed.
    Then I added them to etc/mdm/Init/Default
    After rebooting, the splash screen had the right resolution, but as soon as I logged in, the resolution went back to the old setting, just as stated in this post: http://forums.linuxmint.com/viewtopic.php?f=49&t=118472
    But my new resolution setting does not appear in the ‘Monitors’ control panel. How can I fix that?

    [Reply]

  13. I amusing ubuntu on a laptop using a iso image cd that it boots to as i still have xp onhard drive. i have an acer monitor attahed to the laptop. the laptop resolutionis good. the acer monktor resolution is garbage. how do i change the resolution so that i can see the program on the acer monitor or what do i need to do to gdt the acer monitor to work like the laptop monitor does.

    [Reply]

  14. Thanks for the Article.
    It worked on my Ubuntu 11.10 installation.
    My monitor supports 1920×1080 but ubuntu was showiing only up to 1280.
    This worked like magic..
    Thank you

    [Reply]

Leave a comment

Your email address will not be published. Required fields are marked *