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

You may also like...

121 Responses

  1. Mohamed Kikia says:

    I have Ubuntu 14.04 installed on my PC. I followed all of the above steps and my secondary screen worked fine with a resolution of 1920 x 1080. LightDM was the default display manager. I made GDM the default display manager. When I reboot the secondary monitor (VGA-1) reverts to 1024 x 768 and I get the following message: also see the xrandr output at the bottom.

    could not assign CRTCs to outputs:
    Trying modes for CRTC 95
    CRTC 95: trying mode 1440×900@60Hz with output at 1440×900@60Hz (pass 0)
    none of the selected modes were compatible with the possible modes:
    Trying modes for CRTC 95
    CRTC 95: trying mode 1024×768@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 95: trying mode 800×600@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 95: trying mode 800×600@56Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 95: trying mode 848×480@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 95: trying mode 640×480@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 95: trying mode 1024×768@60Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 95: trying mode 800×600@60Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 95: trying mode 800×600@56Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 95: trying mode 848×480@60Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 95: trying mode 640×480@60Hz with output at 1920×1080@60Hz (pass 1)
    Trying modes for CRTC 96
    CRTC 96: trying mode 1024×768@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 96: trying mode 800×600@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 96: trying mode 800×600@56Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 96: trying mode 848×480@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 96: trying mode 640×480@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 96: trying mode 1024×768@60Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 96: trying mode 800×600@60Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 96: trying mode 800×600@56Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 96: trying mode 848×480@60Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 96: trying mode 640×480@60Hz with output at 1920×1080@60Hz (pass 1)

    CRTC 95: trying mode 1280×1024@75Hz with output at 1440×900@60Hz (pass 0)
    CRTC 95: trying mode 1280×1024@60Hz with output at 1440×900@60Hz (pass 0)
    CRTC 95: trying mode 1440×900@75Hz with output at 1440×900@60Hz (pass 0)
    CRTC 95: trying mode 1280×960@60Hz with output at 1440×900@60Hz (pass 0)
    CRTC 95: trying mode 1152×864@75Hz with output at 1440×900@60Hz (pass 0)
    CRTC 95: trying mode 1024×768@75Hz with output at 1440×900@60Hz (pass 0)
    CRTC 95: trying mode 1024×768@70Hz with output at 1440×900@60Hz (pass 0)
    CRTC 95: trying mode 1024×768@60Hz with output at 1440×900@60Hz (pass 0)
    CRTC 95: trying mode 832×624@75Hz with output at 1440×900@60Hz (pass 0)
    CRTC 95: trying mode 800×600@72Hz with output at 1440×900@60Hz (pass 0)
    CRTC 95: trying mode 800×600@75Hz with output at 1440×900@60Hz (pass 0)
    CRTC 95: trying mode 800×600@60Hz with output at 1440×900@60Hz (pass 0)
    CRTC 95: trying mode 800×600@56Hz with output at 1440×900@60Hz (pass 0)
    CRTC 95: trying mode 640×480@75Hz with output at 1440×900@60Hz (pass 0)
    CRTC 95: trying mode 640×480@73Hz with output at 1440×900@60Hz (pass 0)
    CRTC 95: trying mode 640×480@67Hz with output at 1440×900@60Hz (pass 0)
    CRTC 95: trying mode 640×480@60Hz with output at 1440×900@60Hz (pass 0)
    CRTC 95: trying mode 720×400@70Hz with output at 1440×900@60Hz (pass 0)
    CRTC 95: trying mode 1440×900@60Hz with output at 1440×900@60Hz (pass 1)
    none of the selected modes were compatible with the possible modes:
    Trying modes for CRTC 95
    CRTC 95: trying mode 1024×768@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 95: trying mode 800×600@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 95: trying mode 800×600@56Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 95: trying mode 848×480@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 95: trying mode 640×480@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 95: trying mode 1024×768@60Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 95: trying mode 800×600@60Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 95: trying mode 800×600@56Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 95: trying mode 848×480@60Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 95: trying mode 640×480@60Hz with output at 1920×1080@60Hz (pass 1)
    Trying modes for CRTC 96
    CRTC 96: trying mode 1024×768@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 96: trying mode 800×600@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 96: trying mode 800×600@56Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 96: trying mode 848×480@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 96: trying mode 640×480@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 96: trying mode 1024×768@60Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 96: trying mode 800×600@60Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 96: trying mode 800×600@56Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 96: trying mode 848×480@60Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 96: trying mode 640×480@60Hz with output at 1920×1080@60Hz (pass 1)

    CRTC 95: trying mode 1280×1024@75Hz with output at 1440×900@60Hz (pass 1)
    CRTC 95: trying mode 1280×1024@60Hz with output at 1440×900@60Hz (pass 1)
    CRTC 95: trying mode 1440×900@75Hz with output at 1440×900@60Hz (pass 1)
    none of the selected modes were compatible with the possible modes:
    Trying modes for CRTC 95
    CRTC 95: trying mode 1024×768@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 95: trying mode 800×600@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 95: trying mode 800×600@56Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 95: trying mode 848×480@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 95: trying mode 640×480@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 95: trying mode 1024×768@60Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 95: trying mode 800×600@60Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 95: trying mode 800×600@56Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 95: trying mode 848×480@60Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 95: trying mode 640×480@60Hz with output at 1920×1080@60Hz (pass 1)
    Trying modes for CRTC 96
    CRTC 96: trying mode 1024×768@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 96: trying mode 800×600@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 96: trying mode 800×600@56Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 96: trying mode 848×480@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 96: trying mode 640×480@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 96: trying mode 1024×768@60Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 96: trying mode 800×600@60Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 96: trying mode 800×600@56Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 96: trying mode 848×480@60Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 96: trying mode 640×480@60Hz with output at 1920×1080@60Hz (pass 1)

    CRTC 95: trying mode 1280×960@60Hz with output at 1440×900@60Hz (pass 1)
    CRTC 95: trying mode 1152×864@75Hz with output at 1440×900@60Hz (pass 1)
    CRTC 95: trying mode 1024×768@75Hz with output at 1440×900@60Hz (pass 1)
    CRTC 95: trying mode 1024×768@70Hz with output at 1440×900@60Hz (pass 1)
    CRTC 95: trying mode 1024×768@60Hz with output at 1440×900@60Hz (pass 1)
    CRTC 95: trying mode 832×624@75Hz with output at 1440×900@60Hz (pass 1)
    CRTC 95: trying mode 800×600@72Hz with output at 1440×900@60Hz (pass 1)
    CRTC 95: trying mode 800×600@75Hz with output at 1440×900@60Hz (pass 1)
    CRTC 95: trying mode 800×600@60Hz with output at 1440×900@60Hz (pass 1)
    CRTC 95: trying mode 800×600@56Hz with output at 1440×900@60Hz (pass 1)
    CRTC 95: trying mode 640×480@75Hz with output at 1440×900@60Hz (pass 1)
    CRTC 95: trying mode 640×480@73Hz with output at 1440×900@60Hz (pass 1)
    CRTC 95: trying mode 640×480@67Hz with output at 1440×900@60Hz (pass 1)
    CRTC 95: trying mode 640×480@60Hz with output at 1440×900@60Hz (pass 1)
    CRTC 95: trying mode 720×400@70Hz with output at 1440×900@60Hz (pass 1)
    Trying modes for CRTC 96
    CRTC 96: trying mode 1440×900@60Hz with output at 1440×900@60Hz (pass 0)
    none of the selected modes were compatible with the possible modes:
    Trying modes for CRTC 95
    CRTC 95: trying mode 1024×768@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 95: trying mode 800×600@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 95: trying mode 800×600@56Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 95: trying mode 848×480@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 95: trying mode 640×480@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 95: trying mode 1024×768@60Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 95: trying mode 800×600@60Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 95: trying mode 800×600@56Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 95: trying mode 848×480@60Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 95: trying mode 640×480@60Hz with output at 1920×1080@60Hz (pass 1)
    Trying modes for CRTC 96
    CRTC 96: trying mode 1024×768@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 96: trying mode 800×600@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 96: trying mode 800×600@56Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 96: trying mode 848×480@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 96: trying mode 640×480@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 96: trying mode 1024×768@60Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 96: trying mode 800×600@60Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 96: trying mode 800×600@56Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 96: trying mode 848×480@60Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 96: trying mode 640×480@60Hz with output at 1920×1080@60Hz (pass 1)

    CRTC 96: trying mode 1280×1024@75Hz with output at 1440×900@60Hz (pass 0)
    CRTC 96: trying mode 1280×1024@60Hz with output at 1440×900@60Hz (pass 0)
    CRTC 96: trying mode 1440×900@75Hz with output at 1440×900@60Hz (pass 0)
    CRTC 96: trying mode 1280×960@60Hz with output at 1440×900@60Hz (pass 0)
    CRTC 96: trying mode 1152×864@75Hz with output at 1440×900@60Hz (pass 0)
    CRTC 96: trying mode 1024×768@75Hz with output at 1440×900@60Hz (pass 0)
    CRTC 96: trying mode 1024×768@70Hz with output at 1440×900@60Hz (pass 0)
    CRTC 96: trying mode 1024×768@60Hz with output at 1440×900@60Hz (pass 0)
    CRTC 96: trying mode 832×624@75Hz with output at 1440×900@60Hz (pass 0)
    CRTC 96: trying mode 800×600@72Hz with output at 1440×900@60Hz (pass 0)
    CRTC 96: trying mode 800×600@75Hz with output at 1440×900@60Hz (pass 0)
    CRTC 96: trying mode 800×600@60Hz with output at 1440×900@60Hz (pass 0)
    CRTC 96: trying mode 800×600@56Hz with output at 1440×900@60Hz (pass 0)
    CRTC 96: trying mode 640×480@75Hz with output at 1440×900@60Hz (pass 0)
    CRTC 96: trying mode 640×480@73Hz with output at 1440×900@60Hz (pass 0)
    CRTC 96: trying mode 640×480@67Hz with output at 1440×900@60Hz (pass 0)
    CRTC 96: trying mode 640×480@60Hz with output at 1440×900@60Hz (pass 0)
    CRTC 96: trying mode 720×400@70Hz with output at 1440×900@60Hz (pass 0)
    CRTC 96: trying mode 1440×900@60Hz with output at 1440×900@60Hz (pass 1)
    none of the selected modes were compatible with the possible modes:
    Trying modes for CRTC 95
    CRTC 95: trying mode 1024×768@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 95: trying mode 800×600@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 95: trying mode 800×600@56Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 95: trying mode 848×480@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 95: trying mode 640×480@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 95: trying mode 1024×768@60Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 95: trying mode 800×600@60Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 95: trying mode 800×600@56Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 95: trying mode 848×480@60Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 95: trying mode 640×480@60Hz with output at 1920×1080@60Hz (pass 1)
    Trying modes for CRTC 96
    CRTC 96: trying mode 1024×768@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 96: trying mode 800×600@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 96: trying mode 800×600@56Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 96: trying mode 848×480@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 96: trying mode 640×480@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 96: trying mode 1024×768@60Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 96: trying mode 800×600@60Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 96: trying mode 800×600@56Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 96: trying mode 848×480@60Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 96: trying mode 640×480@60Hz with output at 1920×1080@60Hz (pass 1)

    CRTC 96: trying mode 1280×1024@75Hz with output at 1440×900@60Hz (pass 1)
    CRTC 96: trying mode 1280×1024@60Hz with output at 1440×900@60Hz (pass 1)
    CRTC 96: trying mode 1440×900@75Hz with output at 1440×900@60Hz (pass 1)
    none of the selected modes were compatible with the possible modes:
    Trying modes for CRTC 95
    CRTC 95: trying mode 1024×768@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 95: trying mode 800×600@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 95: trying mode 800×600@56Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 95: trying mode 848×480@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 95: trying mode 640×480@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 95: trying mode 1024×768@60Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 95: trying mode 800×600@60Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 95: trying mode 800×600@56Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 95: trying mode 848×480@60Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 95: trying mode 640×480@60Hz with output at 1920×1080@60Hz (pass 1)
    Trying modes for CRTC 96
    CRTC 96: trying mode 1024×768@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 96: trying mode 800×600@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 96: trying mode 800×600@56Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 96: trying mode 848×480@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 96: trying mode 640×480@60Hz with output at 1920×1080@60Hz (pass 0)
    CRTC 96: trying mode 1024×768@60Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 96: trying mode 800×600@60Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 96: trying mode 800×600@56Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 96: trying mode 848×480@60Hz with output at 1920×1080@60Hz (pass 1)
    CRTC 96: trying mode 640×480@60Hz with output at 1920×1080@60Hz (pass 1)

    CRTC 96: trying mode 1280×960@60Hz with output at 1440×900@60Hz (pass 1)
    CRTC 96: trying mode 1152×864@75Hz with output at 1440×900@60Hz (pass 1)
    CRTC 96: trying mode 1024×768@75Hz with output at 1440×900@60Hz (pass 1)
    CRTC 96: trying mode 1024×768@70Hz with output at 1440×900@60Hz (pass 1)
    CRTC 96: trying mode 1024×768@60Hz with output at 1440×900@60Hz (pass 1)
    CRTC 96: trying mode 832×624@75Hz with output at 1440×900@60Hz (pass 1)
    CRTC 96: trying mode 800×600@72Hz with output at 1440×900@60Hz (pass 1)
    CRTC 96: trying mode 800×600@75Hz with output at 1440×900@60Hz (pass 1)
    CRTC 96: trying mode 800×600@60Hz with output at 1440×900@60Hz (pass 1)
    CRTC 96: trying mode 800×600@56Hz with output at 1440×900@60Hz (pass 1)
    CRTC 96: trying mode 640×480@75Hz with output at 1440×900@60Hz (pass 1)
    CRTC 96: trying mode 640×480@73Hz with output at 1440×900@60Hz (pass 1)
    CRTC 96: trying mode 640×480@67Hz with output at 1440×900@60Hz (pass 1)
    CRTC 96: trying mode 640×480@60Hz with output at 1440×900@60Hz (pass 1)
    CRTC 96: trying mode 720×400@70Hz with output at 1440×900@60Hz (pass 1)

    xrandr gives me the following:

    Screen 0: minimum 320 x 200, current 2464 x 900, maximum 8192 x 8192
    DVI-I-1 connected primary 1440×900+0+0 (normal left inverted right x axis y axis) 410mm x 257mm
    1440×900 59.9*+ 75.0
    1280×1024 75.0 60.0
    1280×960 60.0
    1152×864 75.0
    1024×768 75.1 70.1 60.0
    832×624 74.6
    800×600 72.2 75.0 60.3 56.2
    640×480 75.0 72.8 66.7 60.0
    720×400 70.1
    HDMI-1 disconnected (normal left inverted right x axis y axis)
    VGA-1 connected 1024×768+1440+0 (normal left inverted right x axis y axis) 0mm x 0mm
    1024×768 60.0*
    800×600 60.3 56.2
    848×480 60.0
    640×480 59.9
    1920×1080 (0x2e2) 70.0MHz
    h: width 1024 start 1072 end 1176 total 1328 skew 0 clock 52.7KHz
    v: height 768 start 771 end 775 total 798 clock 66.1Hz

Leave a Reply

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