Add undetected resolutions in Ubuntu

If a resolution or refresh rate isn’t detected in Ubuntu and you’d like to add it here is how to do it.

Open up terminal. Run this command

cvt <X> <Y> <REFRESH>

So for example:

cvt 1280 768 60

Now copy the modeline to the clipboard.

Then run this command:

xrandr –newmode

Pasting your modeline where the <modeline> tag is.

So for example:

xrandr --newmode "1280x768_60.00" 79.50 1280 1344 1472 1664 768 771 781 798 -hsync +vsync

Now add this new mode so you can select it in monitor preferences:

xrandr --addmode DVI-0 "1280x768_60.00"

Note that the DVI-0 argument might be different depending on your graphics card.

Finally navigate to monitor preferences:

System > Preferences > Monitors

And select your new setting.

Finally add the new mode to your Xorg.conf file in the “Screens” section (yours may look a little different):

SubSection "Display"
  Modes "800x600" "1024x768" "1280x768"
  Virtual 2048 2048
End SubSection

Tags: , , ,

2 Responses to “Add undetected resolutions in Ubuntu”

  1. dp says:

    Hey Garry – thanks for the how-to. It was very useful, and got my VGA working correctly.

    Here’s my question: what are your full instructions for changing the xorg.conf file? Since I have a newer install of Ubuntu (11.04) there is no xorg.conf file. Last time I tried creating one it didn’t work and I had to use a USB startup disk to delete it to be able to login again…

  2. admin says:

    Hi David,

    If you are sure there is no /etc/X11/xorg.conf you can setup xorg.conf file like this:

    ctrl-alt-F1 to console (this will close your X-session, so be sure to save any files you have open).

    The stop the gdm service by running:

    sudo service gdm stop

    After that you run

    Xorg -configure (Note case sensitive, ‘X’ must be capital)

    Now you should have a file xorg.conf in the directory /etc/X11/

    BTW if you ever find xorg.conf stops you being able to login you can run recovery console and simply delete xorg.conf from command line using sudo rm /etc/X11/xorg.conf. In Ubuntu this will simply go back to default settings before you added an Xorg.conf file.

Leave a Reply